|
clang
3.8.0
|
Sema - This implements semantic analysis and AST building for C. More...
#include <Sema.h>
Classes | |
| struct | ActiveTemplateInstantiation |
| A template instantiation that is currently in progress. More... | |
| struct | ActOnMemberAccessExtraArgs |
| class | ArgumentPackSubstitutionIndexRAII |
RAII object used to change the argument pack substitution index within a Sema object. More... | |
| class | BoundTypeDiagnoser |
| struct | CodeCompleteExpressionData |
| class | CompoundScopeRAII |
| A RAII object to enter scope of a compound statement. More... | |
| 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 | 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 | FPContractStateRAII |
| Records and restores the FP_CONTRACT state on entry/exit of compound statements. More... | |
| class | FullExprArg |
| struct | FunctionScopeRAII |
| An RAII helper that pops function a function scope on exit. More... | |
| class | ICEConvertDiagnoser |
| class | ImplicitExceptionSpecification |
| Helper class that collects exception specifications for implicitly-declared special member functions. More... | |
| struct | InstantiatingTemplate |
| A stack object to be created when performing template instantiation. More... | |
| struct | LateInstantiatedAttribute |
| class | NameClassification |
| struct | ObjCArgInfo |
| struct | OffsetOfComponent |
| struct | OriginalCallArg |
| brief A function argument from which we performed template argument More... | |
| struct | PragmaStack |
| class | SavePendingInstantiationsAndVTableUsesRAII |
| class | SavePendingLocalImplicitInstantiationsRAII |
| class | SemaDiagnosticBuilder |
| Helper class that creates diagnostics with optional template instantiation stacks. More... | |
| class | SFINAETrap |
| RAII class used to determine whether SFINAE has trapped any errors that occur during template argument deduction. More... | |
| struct | SkipBodyInfo |
| class | SpecialMemberOverloadResult |
| SpecialMemberOverloadResult - The overloading result for a special member function. More... | |
| class | SynthesizedFunctionScope |
| RAII object to handle the state changes required to synthesize a function body. More... | |
| class | TentativeAnalysisScope |
| RAII class used to indicate that we are performing provisional semantic analysis to determine the validity of a construct, so typo-correction and diagnostics in the immediate context (not within implicitly-instantiated templates) should be suppressed. More... | |
| struct | TypeDiagnoser |
| Abstract class used to diagnose incomplete types. More... | |
| struct | TypeTagData |
| class | VerifyICEDiagnoser |
| Abstract base class used for diagnosing integer constant expression violations. More... | |
| class | VtorDispStackRAII |
| Records and restores the vtordisp state on entry/exit of C++ method body. More... | |
Public Member Functions | |
| NamedDecl * | findLocallyScopedExternCDecl (DeclarationName Name) |
| Look for a locally scoped extern "C" declaration by the given name. More... | |
| void | SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P) |
| void | LoadExternalWeakUndeclaredIdentifiers () |
| Load weak undeclared identifiers from the external source. More... | |
| MangleNumberingContext * | getCurrentMangleNumberContext (const DeclContext *DC, Decl *&ManglingContextDecl) |
| Compute the mangling number context for a lambda expression or block literal. More... | |
| void | getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined) |
| Obtain a sorted list of functions that are undefined but ODR-used. More... | |
| const llvm::MapVector < FieldDecl *, DeleteLocs > & | getMismatchingDeleteExpressions () const |
| Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit. More... | |
| void | ReadMethodPool (Selector Sel) |
| Read the contents of the method pool for a given selector from external storage. More... | |
| void | EmitCurrentDiagnostic (unsigned DiagID) |
| Cause the active diagnostic on the DiagosticsEngine to be emitted. More... | |
| void | addImplicitTypedef (StringRef Name, QualType T) |
| Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr) | |
| ~Sema () | |
| void | Initialize () |
| Perform initialization that occurs after the parser has been initialized but before it parses anything. More... | |
| const LangOptions & | getLangOpts () const |
| OpenCLOptions & | getOpenCLOptions () |
| FPOptions & | getFPOptions () |
| DiagnosticsEngine & | getDiagnostics () const |
| SourceManager & | getSourceManager () const |
| Preprocessor & | getPreprocessor () const |
| ASTContext & | getASTContext () const |
| ASTConsumer & | getASTConsumer () const |
| ASTMutationListener * | getASTMutationListener () const |
| ExternalSemaSource * | getExternalSource () const |
| void | addExternalSource (ExternalSemaSource *E) |
| Registers an external source. More... | |
| void | PrintStats () const |
| Print out statistics about the semantic analysis. More... | |
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) |
| Emit a diagnostic. More... | |
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD) |
| Emit a partial diagnostic. More... | |
| PartialDiagnostic | PDiag (unsigned DiagID=0) |
| Build a partial diagnostic. More... | |
| bool | findMacroSpelling (SourceLocation &loc, StringRef name) |
| Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name. More... | |
| std::string | getFixItZeroInitializerForType (QualType T, SourceLocation Loc) const |
| Get a string to suggest for zero-initialization of a type. More... | |
| std::string | getFixItZeroLiteralForType (QualType T, SourceLocation Loc) const |
| SourceLocation | getLocForEndOfToken (SourceLocation Loc, unsigned Offset=0) |
Calls Lexer::getLocForEndOfToken() More... | |
| ModuleLoader & | getModuleLoader () const |
| Retrieve the module loader associated with the preprocessor. More... | |
| void | emitAndClearUnusedLocalTypedefWarnings () |
| void | ActOnEndOfTranslationUnit () |
| ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reached and all but the top-level scope is popped. More... | |
| void | CheckDelegatingCtorCycles () |
| Scope * | getScopeForContext (DeclContext *Ctx) |
| Determines the active Scope associated with the given declaration context. More... | |
| void | PushFunctionScope () |
| Enter a new function scope. More... | |
| void | PushBlockScope (Scope *BlockScope, BlockDecl *Block) |
| sema::LambdaScopeInfo * | PushLambdaScope () |
| void | RecordParsingTemplateParameterDepth (unsigned Depth) |
| This is used to inform Sema what the current TemplateParameterDepth is during Parsing. More... | |
| void | PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) |
| void | PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, const BlockExpr *blkExpr=nullptr) |
| sema::FunctionScopeInfo * | getCurFunction () const |
| sema::FunctionScopeInfo * | getEnclosingFunction () const |
| template<typename ExprT > | |
| void | recordUseOfEvaluatedWeak (const ExprT *E, bool IsRead=true) |
| void | PushCompoundScope () |
| void | PopCompoundScope () |
| sema::CompoundScopeInfo & | getCurCompoundScope () const |
| bool | hasAnyUnrecoverableErrorsInThisFunction () const |
| Determine whether any errors occurred within this function/method/ block. More... | |
| sema::BlockScopeInfo * | getCurBlock () |
| Retrieve the current block, if any. More... | |
| sema::LambdaScopeInfo * | getCurLambda () |
| Retrieve the current lambda scope info, if any. More... | |
| sema::LambdaScopeInfo * | getCurGenericLambda () |
| Retrieve the current generic lambda info, if any. More... | |
| sema::CapturedRegionScopeInfo * | getCurCapturedRegion () |
| Retrieve the current captured region, if any. More... | |
| SmallVectorImpl< Decl * > & | WeakTopLevelDecls () |
| WeakTopLevelDeclDecls - access to #pragma weak-generated Decls. More... | |
| void | ActOnComment (SourceRange Comment) |
| QualType | BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr) |
| QualType | BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVRA, const DeclSpec *DS=nullptr) |
| QualType | BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity) |
| Build a pointer type. More... | |
| QualType | BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity) |
| Build a reference type. More... | |
| QualType | BuildArrayType (QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) |
| Build an array type. More... | |
| QualType | BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc) |
| Build an ext-vector type. More... | |
| bool | CheckFunctionReturnType (QualType T, SourceLocation Loc) |
| QualType | BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) |
| Build a function type. More... | |
| QualType | BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity) |
Build a member pointer type T Class::*. More... | |
| QualType | BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity) |
| Build a block pointer type. More... | |
| QualType | BuildParenType (QualType T) |
Build a paren type including T. More... | |
| QualType | BuildAtomicType (QualType T, SourceLocation Loc) |
| QualType | BuildPipeType (QualType T, SourceLocation Loc) |
| Build a Pipe type. More... | |
| TypeSourceInfo * | GetTypeForDeclarator (Declarator &D, Scope *S) |
| GetTypeForDeclarator - Convert the type for the specified declarator to Type instances. More... | |
| TypeSourceInfo * | GetTypeForDeclaratorCast (Declarator &D, QualType FromTy) |
| TypeSourceInfo * | GetTypeSourceInfoForDeclarator (Declarator &D, QualType T, TypeSourceInfo *ReturnTypeInfo) |
| Create and instantiate a TypeSourceInfo with type source information. More... | |
| ParsedType | CreateParsedType (QualType T, TypeSourceInfo *TInfo) |
| Package the given type and TSI into a ParsedType. More... | |
| DeclarationNameInfo | GetNameForDeclarator (Declarator &D) |
| GetNameForDeclarator - Determine the full declaration name for the given Declarator. More... | |
| DeclarationNameInfo | GetNameFromUnqualifiedId (const UnqualifiedId &Name) |
| Retrieves the declaration name from a parsed unqualified-id. More... | |
| CanThrowResult | canThrow (const Expr *E) |
| const FunctionProtoType * | ResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT) |
| void | UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI) |
| bool | CheckSpecifiedExceptionType (QualType &T, SourceRange Range) |
| CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification. More... | |
| bool | CheckDistantExceptionSpec (QualType T) |
| CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification. More... | |
| bool | CheckEquivalentExceptionSpec (FunctionDecl *Old, FunctionDecl *New) |
| bool | CheckEquivalentExceptionSpec (const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc) |
| CheckEquivalentExceptionSpec - Check if the two types have equivalent exception specifications. More... | |
| bool | CheckEquivalentExceptionSpec (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc, bool *MissingExceptionSpecification=nullptr, bool *MissingEmptyExceptionSpecification=nullptr, bool AllowNoexceptAllMatchWithNoSpec=false, bool IsOperatorNew=false) |
| CheckEquivalentExceptionSpec - Check if the two types have compatible exception specifications. More... | |
| bool | CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc) |
| CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type. More... | |
| bool | CheckParamExceptionSpec (const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc) |
| CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs. More... | |
| TypeResult | ActOnTypeName (Scope *S, Declarator &D) |
| ParsedType | ActOnObjCInstanceType (SourceLocation Loc) |
| The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration. More... | |
| Module * | getOwningModule (Decl *Entity) |
| Get the module owning an entity. More... | |
| void | makeMergedDefinitionVisible (NamedDecl *ND, SourceLocation Loc) |
Make a merged definition of an existing hidden definition ND visible at the specified location. More... | |
| bool | isModuleVisible (Module *M) |
| bool | isVisible (const NamedDecl *D) |
| Determine whether a declaration is visible to name lookup. More... | |
| bool | hasVisibleMergedDefinition (NamedDecl *Def) |
| bool | hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false) |
Determine if D has a visible definition. More... | |
| bool | hasVisibleDefinition (const NamedDecl *D) |
| bool | hasVisibleDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr) |
Determine if the template parameter D has a visible default argument. More... | |
| bool | isEquivalentInternalLinkageDeclaration (const NamedDecl *A, const NamedDecl *B) |
Determine if A and B are equivalent internal linkage declarations from different modules, and thus an ambiguity error can be downgraded to an extension warning. More... | |
| void | diagnoseEquivalentInternalLinkageDeclarations (SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv) |
| bool | isCompleteType (SourceLocation Loc, QualType T) |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) |
| Ensure that the type T is a complete type. More... | |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args) |
| void | completeExprArrayBound (Expr *E) |
| bool | RequireCompleteExprType (Expr *E, TypeDiagnoser &Diagnoser) |
| Ensure that the type of the given expression is complete. More... | |
| bool | RequireCompleteExprType (Expr *E, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireCompleteExprType (Expr *E, unsigned DiagID, const Ts &...Args) |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) |
| Ensure that the type T is a literal type. More... | |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args) |
| QualType | getElaboratedType (ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T) |
| Retrieve a version of the type 'T' that is elaborated by Keyword and qualified by the nested-name-specifier contained in SS. More... | |
| QualType | BuildTypeofExprType (Expr *E, SourceLocation Loc) |
| QualType | BuildDecltypeType (Expr *E, SourceLocation Loc, bool AsUnevaluated=true) |
| If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto). More... | |
| QualType | BuildUnaryTransformType (QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc) |
| DeclGroupPtrTy | ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=nullptr) |
| void | DiagnoseUseOfUnimplementedSelectors () |
| bool | isSimpleTypeSpecifier (tok::TokenKind Kind) const |
| Determine whether the token kind starts a simple-type-specifier. More... | |
| ParsedType | getTypeName (const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=ParsedType(), bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, IdentifierInfo **CorrectedII=nullptr) |
| If the identifier refers to a type name within this scope, return the declaration of that type. More... | |
| TypeSpecifierType | isTagName (IdentifierInfo &II, Scope *S) |
| isTagName() - This method is called for error recovery purposes only to determine if the specified name is a valid tag name ("struct foo"). More... | |
| bool | isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S) |
| isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning. More... | |
| void | DiagnoseUnknownTypeName (IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool AllowClassTemplates=false) |
| ParsedType | ActOnDelayedDefaultTemplateArg (const IdentifierInfo &II, SourceLocation NameLoc) |
| For compatibility with MSVC, we delay parsing of some default template type arguments until instantiation time. More... | |
| NameClassification | ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, bool IsAddressOfOperand, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr) |
| Perform name lookup on the given name, classifying it based on the results of name lookup and the following token. More... | |
| Decl * | ActOnDeclarator (Scope *S, Declarator &D) |
| NamedDecl * | HandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists) |
| void | RegisterLocallyScopedExternCDecl (NamedDecl *ND, Scope *S) |
| Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations. More... | |
| bool | DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info) |
| DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class, then each of the following shall have a name different from T: More... | |
| bool | diagnoseQualifiedDeclaration (CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc) |
| Diagnose a declaration whose declarator-id has the given nested-name-specifier. More... | |
| void | diagnoseIgnoredQualifiers (unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation()) |
| void | DiagnoseFunctionSpecifiers (const DeclSpec &DS) |
| Diagnose function specifiers on a declaration of an identifier that does not identify a function. More... | |
| void | CheckShadow (Scope *S, VarDecl *D, const LookupResult &R) |
| Diagnose variable or built-in function shadowing. More... | |
| void | CheckShadow (Scope *S, VarDecl *D) |
| Check -Wshadow without the advantage of a previous lookup. More... | |
| void | CheckCastAlign (Expr *Op, QualType T, SourceRange TRange) |
| CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements. More... | |
| void | handleTagNumbering (const TagDecl *Tag, Scope *TagScope) |
| void | setTagNameForLinkagePurposes (TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) |
| void | CheckTypedefForVariablyModifiedType (Scope *S, TypedefNameDecl *D) |
| NamedDecl * | ActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous) |
| NamedDecl * | ActOnTypedefNameDecl (Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration) |
| ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'. More... | |
| NamedDecl * | ActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope) |
| bool | CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous) |
| Perform semantic checking on a newly-created variable declaration. More... | |
| void | CheckVariableDeclarationType (VarDecl *NewVD) |
| void | CheckCompleteVariableDeclaration (VarDecl *var) |
| void | MaybeSuggestAddingStaticToDecl (const FunctionDecl *D) |
| NamedDecl * | ActOnFunctionDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope) |
| bool | AddOverriddenMethods (CXXRecordDecl *DC, CXXMethodDecl *MD) |
| AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it. More... | |
| bool | CheckConstexprFunctionDecl (const FunctionDecl *FD) |
| bool | CheckConstexprFunctionBody (const FunctionDecl *FD, Stmt *Body) |
| Check the body for the given constexpr function declaration only contains the permitted types of statement. More... | |
| void | DiagnoseHiddenVirtualMethods (CXXMethodDecl *MD) |
| Diagnose methods which overload virtual methods in a base class without overriding any. More... | |
| void | FindHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods) |
| Check if a method overloads virtual methods in a base class without overriding any. More... | |
| void | NoteHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods) |
| bool | CheckFunctionDeclaration (Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsExplicitSpecialization) |
| Perform semantic checking of a new function declaration. More... | |
| void | CheckMain (FunctionDecl *FD, const DeclSpec &D) |
| void | CheckMSVCRTEntryPoint (FunctionDecl *FD) |
| Decl * | ActOnParamDeclarator (Scope *S, Declarator &D) |
| ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope. More... | |
| ParmVarDecl * | BuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T) |
| Synthesizes a variable for a parameter arising from a typedef. More... | |
| ParmVarDecl * | CheckParameter (DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC) |
| void | ActOnParamDefaultArgument (Decl *param, SourceLocation EqualLoc, Expr *defarg) |
| ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed. More... | |
| void | ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc) |
| ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter, but we can't parse it yet because we're inside a class definition. More... | |
| void | ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc) |
| ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed. More... | |
| bool | SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc) |
| void | AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto) |
| AddInitializerToDecl - Adds the initializer Init to the declaration dcl. More... | |
| void | ActOnUninitializedDecl (Decl *dcl, bool TypeMayContainAuto) |
| void | ActOnInitializerError (Decl *Dcl) |
| ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to return to some form of sanity. More... | |
| void | ActOnPureSpecifier (Decl *D, SourceLocation PureSpecLoc) |
| void | ActOnCXXForRangeDecl (Decl *D) |
| StmtResult | ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs, SourceLocation AttrEnd) |
| void | SetDeclDeleted (Decl *dcl, SourceLocation DelLoc) |
| void | SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc) |
| void | FinalizeDeclaration (Decl *D) |
| FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached. More... | |
| DeclGroupPtrTy | FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group) |
| DeclGroupPtrTy | BuildDeclaratorGroup (MutableArrayRef< Decl * > Group, bool TypeMayContainAuto=true) |
| BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking. More... | |
| void | ActOnDocumentableDecl (Decl *D) |
| Should be called on all declarations that might have attached documentation comments. More... | |
| void | ActOnDocumentableDecls (ArrayRef< Decl * > Group) |
| void | ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls) |
| void | CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr) |
| Decl * | ActOnStartOfFunctionDef (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr) |
| Decl * | ActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr) |
| void | ActOnStartOfObjCMethodDef (Scope *S, Decl *D) |
| ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST. More... | |
| bool | isObjCMethodDecl (Decl *D) |
| bool | canDelayFunctionBody (const Declarator &D) |
| Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function. More... | |
| bool | canSkipFunctionBody (Decl *D) |
| Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function. More... | |
| void | computeNRVO (Stmt *Body, sema::FunctionScopeInfo *Scope) |
| Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization. More... | |
| Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body) |
| Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation) |
| Decl * | ActOnSkippedFunctionBody (Decl *Decl) |
| void | ActOnFinishInlineMethodDef (CXXMethodDecl *D) |
| void | ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs) |
| ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed. More... | |
| void | DiagnoseUnusedParameters (ParmVarDecl *const *Begin, ParmVarDecl *const *End) |
| Diagnose any unused parameters in the given sequence of ParmVarDecl pointers. More... | |
| void | DiagnoseSizeOfParametersAndReturnValue (ParmVarDecl *const *Begin, ParmVarDecl *const *End, QualType ReturnTy, NamedDecl *D) |
| Diagnose whether the size of parameters or return value of a function or obj-c method definition is pass-by-value and larger than a specified threshold. More... | |
| void | DiagnoseInvalidJumps (Stmt *Body) |
| Decl * | ActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc) |
| Decl * | ActOnEmptyDeclaration (Scope *S, AttributeList *AttrList, SourceLocation SemiLoc) |
| Handle a C++11 empty-declaration and attribute-declaration. More... | |
| DeclResult | ActOnModuleImport (SourceLocation AtLoc, SourceLocation ImportLoc, ModuleIdPath Path) |
| The parser has processed a module import declaration. More... | |
| void | ActOnModuleInclude (SourceLocation DirectiveLoc, Module *Mod) |
| The parser has processed a module import translated from a #include or similar preprocessing directive. More... | |
| void | ActOnModuleBegin (SourceLocation DirectiveLoc, Module *Mod) |
| The parsed has entered a submodule. More... | |
| void | ActOnModuleEnd (SourceLocation DirectiveLoc, Module *Mod) |
| The parser has left a submodule. More... | |
| void | diagnoseMisplacedModuleImport (Module *M, SourceLocation ImportLoc) |
| Check if module import may be found in the current context, emit error if not. More... | |
| void | createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod) |
| Create an implicit import of the given module at the given source location, for error recovery, if possible. More... | |
| void | diagnoseMissingImport (SourceLocation Loc, NamedDecl *Decl, bool NeedDefinition, bool Recover=true) |
| Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import that would resolve the problem. More... | |
| void | diagnoseMissingImport (SourceLocation Loc, NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef< Module * > Modules, MissingImportKind MIK, bool Recover) |
| PrintingPolicy | getPrintingPolicy () const |
| Retrieve a suitable printing policy. More... | |
| void | ActOnPopScope (SourceLocation Loc, Scope *S) |
| Scope actions. More... | |
| void | ActOnTranslationUnitScope (Scope *S) |
| Decl * | ParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS) |
| ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. More... | |
| Decl * | ParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation=false) |
| ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. More... | |
| Decl * | BuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) |
| BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union. More... | |
| Decl * | BuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record) |
| BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure. More... | |
| bool | isAcceptableTagRedeclaration (const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) |
| Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration. More... | |
| Decl * | ActOnTag (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, SkipBodyInfo *SkipBody=nullptr) |
| This is invoked when we see 'struct foo' or 'struct {'. More... | |
| Decl * | ActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, MultiTemplateParamsArg TempParamLists) |
| Handle a friend tag declaration where the scope specifier was templated. More... | |
| TypeResult | ActOnDependentTag (Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc) |
| void | ActOnDefs (Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls) |
| Called whenever @defs(ClassName) is encountered in the source. More... | |
| Decl * | ActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth) |
| ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it. More... | |
| FieldDecl * | HandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS) |
| HandleField - Analyze a field of a C struct or a C++ data member. More... | |
| MSPropertyDecl * | HandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, AttributeList *MSPropertyAttr) |
| HandleMSProperty - Analyze a __delcspec(property) field of a C++ class. More... | |
| FieldDecl * | CheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr) |
| Build a new FieldDecl and check its well-formedness. More... | |
| bool | CheckNontrivialField (FieldDecl *FD) |
| void | DiagnoseNontrivial (const CXXRecordDecl *Record, CXXSpecialMember CSM) |
| Diagnose why the specified class does not have a trivial special member of the given kind. More... | |
| bool | SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false) |
| Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25, and C++11 [class.dtor]p5. More... | |
| CXXSpecialMember | getSpecialMember (const CXXMethodDecl *MD) |
| getSpecialMember - get the special member enum for a method. More... | |
| void | ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls) |
| ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions. More... | |
| Decl * | ActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility) |
| ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it. More... | |
| void | ActOnFields (Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList) |
| void | ActOnTagStartDefinition (Scope *S, Decl *TagDecl) |
| ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e.g., for an enumeration, class, struct, or union). More... | |
| SkippedDefinitionContext | ActOnTagStartSkippedDefinition (Scope *S, Decl *TD) |
| Invoked when we enter a tag definition that we're skipping. More... | |
| Decl * | ActOnObjCContainerStartDefinition (Decl *IDecl) |
| void | ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, SourceLocation LBraceLoc) |
| ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations. More... | |
| void | ActOnTagFinishDefinition (Scope *S, Decl *TagDecl, SourceLocation RBraceLoc) |
| ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union). More... | |
| void | ActOnTagFinishSkippedDefinition (SkippedDefinitionContext Context) |
| void | ActOnObjCContainerFinishDefinition () |
| void | ActOnObjCTemporaryExitContainerContext (DeclContext *DC) |
| Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs. More... | |
| void | ActOnObjCReenterContainerContext (DeclContext *DC) |
| void | ActOnTagDefinitionError (Scope *S, Decl *TagDecl) |
| ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag. More... | |
| EnumConstantDecl * | CheckEnumConstant (EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val) |
| bool | CheckEnumUnderlyingType (TypeSourceInfo *TI) |
| Check that this is a valid underlying type for an enum declaration. More... | |
| bool | CheckEnumRedeclaration (SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool EnumUnderlyingIsImplicit, const EnumDecl *Prev) |
| Check whether this is a valid redeclaration of a previous enumeration. More... | |
| SkipBodyInfo | shouldSkipAnonEnumBody (Scope *S, IdentifierInfo *II, SourceLocation IILoc) |
| Determine whether the body of an anonymous enumeration should be skipped. More... | |
| Decl * | ActOnEnumConstant (Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, AttributeList *Attrs, SourceLocation EqualLoc, Expr *Val) |
| void | ActOnEnumBody (SourceLocation EnumLoc, SourceLocation LBraceLoc, SourceLocation RBraceLoc, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, AttributeList *Attr) |
| DeclContext * | getContainingDC (DeclContext *DC) |
| void | PushDeclContext (Scope *S, DeclContext *DC) |
| Set the current declaration context until it gets popped. More... | |
| void | PopDeclContext () |
| void | EnterDeclaratorContext (Scope *S, DeclContext *DC) |
| EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier. More... | |
| void | ExitDeclaratorContext (Scope *S) |
| void | ActOnReenterFunctionContext (Scope *S, Decl *D) |
| Push the parameters of D, which must be a function, into scope. More... | |
| void | ActOnExitFunctionContext () |
| DeclContext * | getFunctionLevelDeclContext () |
| FunctionDecl * | getCurFunctionDecl () |
| getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed. More... | |
| ObjCMethodDecl * | getCurMethodDecl () |
| getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed. More... | |
| NamedDecl * | getCurFunctionOrMethodDecl () |
| getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null. More... | |
| void | PushOnScopeChains (NamedDecl *D, Scope *S, bool AddToContext=true) |
| Add this decl to the scope shadowed decl chains. More... | |
| void | pushExternalDeclIntoScope (NamedDecl *D, DeclarationName Name) |
| Make the given externally-produced declaration visible at the top level scope. More... | |
| bool | isDeclInScope (NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false) |
| isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context. More... | |
| TypedefDecl * | ParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo) |
| Subroutines of ActOnDeclarator(). More... | |
| bool | isIncompatibleTypedef (TypeDecl *Old, TypedefNameDecl *New) |
| AvailabilityAttr * | mergeAvailabilityAttr (NamedDecl *D, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, AvailabilityMergeKind AMK, unsigned AttrSpellingListIndex) |
| Attribute merging methods. Return true if a new attribute was added. More... | |
| TypeVisibilityAttr * | mergeTypeVisibilityAttr (Decl *D, SourceRange Range, TypeVisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex) |
| VisibilityAttr * | mergeVisibilityAttr (Decl *D, SourceRange Range, VisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex) |
| DLLImportAttr * | mergeDLLImportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex) |
| DLLExportAttr * | mergeDLLExportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex) |
| MSInheritanceAttr * | mergeMSInheritanceAttr (Decl *D, SourceRange Range, bool BestCase, unsigned AttrSpellingListIndex, MSInheritanceAttr::Spelling SemanticSpelling) |
| FormatAttr * | mergeFormatAttr (Decl *D, SourceRange Range, IdentifierInfo *Format, int FormatIdx, int FirstArg, unsigned AttrSpellingListIndex) |
| SectionAttr * | mergeSectionAttr (Decl *D, SourceRange Range, StringRef Name, unsigned AttrSpellingListIndex) |
| AlwaysInlineAttr * | mergeAlwaysInlineAttr (Decl *D, SourceRange Range, IdentifierInfo *Ident, unsigned AttrSpellingListIndex) |
| MinSizeAttr * | mergeMinSizeAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex) |
| OptimizeNoneAttr * | mergeOptimizeNoneAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex) |
| InternalLinkageAttr * | mergeInternalLinkageAttr (Decl *D, SourceRange Range, IdentifierInfo *Ident, unsigned AttrSpellingListIndex) |
| CommonAttr * | mergeCommonAttr (Decl *D, SourceRange Range, IdentifierInfo *Ident, unsigned AttrSpellingListIndex) |
| void | mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration) |
| mergeDeclAttributes - Copy attributes from the Old decl to the New one. More... | |
| void | MergeTypedefNameDecl (Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) |
| MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous declaration 'Old'. More... | |
| bool | MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld) |
| MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'. More... | |
| bool | MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld) |
| Completes the merge of two function declarations that are known to be compatible. More... | |
| void | mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old) |
| void | MergeVarDecl (VarDecl *New, LookupResult &Previous) |
| MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. More... | |
| void | MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld) |
| MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. More... | |
| void | MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old) |
| Merge the exception specifications of two variable declarations. More... | |
| bool | MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old, Scope *S) |
| MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that they have the same type. More... | |
| OverloadKind | CheckOverload (Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl) |
| bool | IsOverload (FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl) |
| bool | isFunctionConsideredUnavailable (FunctionDecl *FD) |
| Checks availability of the function depending on the current function context.Inside an unavailable function,unavailability is ignored. More... | |
| ImplicitConversionSequence | TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion) |
| bool | IsIntegralPromotion (Expr *From, QualType FromType, QualType ToType) |
| IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5). More... | |
| bool | IsFloatingPointPromotion (QualType FromType, QualType ToType) |
| IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6). More... | |
| bool | IsComplexPromotion (QualType FromType, QualType ToType) |
| Determine if a conversion is a complex promotion. More... | |
| bool | IsPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC) |
| IsPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a pointer conversion (C++ 4.10). More... | |
| bool | isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC) |
| isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion. More... | |
| bool | isObjCWritebackConversion (QualType FromType, QualType ToType, QualType &ConvertedType) |
| Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting. More... | |
| bool | IsBlockPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType) |
| bool | FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr) |
| FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types. More... | |
| void | HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType) |
| HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types. More... | |
| void | maybeExtendBlockObject (ExprResult &E) |
| Do an explicit extend of the given block pointer if we're in ARC. More... | |
| CastKind | PrepareCastToObjCObjectPointer (ExprResult &E) |
| Prepare a conversion of the given expression to an ObjC object pointer type. More... | |
| bool | CheckPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose=true) |
| CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType. More... | |
| bool | IsMemberPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType) |
| IsMemberPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a member pointer conversion (C++ 4.11). More... | |
| bool | CheckMemberPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess) |
| CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the type ToType. More... | |
| bool | IsQualificationConversion (QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion) |
| IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToType is a qualification conversion (C++ 4.4). More... | |
| bool | IsNoReturnConversion (QualType FromType, QualType ToType, QualType &ResultTy) |
| Determine whether the conversion from FromType to ToType is a valid conversion that strips "noreturn" off the nested function type. More... | |
| bool | DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType) |
| bool | isSameOrCompatibleFunctionType (CanQualType Param, CanQualType Arg) |
| Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions). More... | |
| ExprResult | PerformMoveOrCopyInitialization (const InitializedEntity &Entity, const VarDecl *NRVOCandidate, QualType ResultType, Expr *Value, bool AllowNRVO=true) |
| Perform the initialization of a potentially-movable value, which is the result of return value. More... | |
| bool | CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init) |
| ExprResult | PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false) |
| ExprResult | PerformObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method) |
| PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression. More... | |
| ExprResult | PerformContextuallyConvertToBool (Expr *From) |
| PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3). More... | |
| ExprResult | PerformContextuallyConvertToObjCPointer (Expr *From) |
| PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type. More... | |
| ExprResult | CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE) |
| ExprResult | CheckConvertedConstantExpression (Expr *From, QualType T, APValue &Value, CCEKind CCE) |
| ExprResult | PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter) |
| Perform a contextual implicit conversion. More... | |
| ObjCSubscriptKind | CheckSubscriptingKind (Expr *FromE) |
| CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done. More... | |
| ObjCLiteralKind | CheckLiteralKind (Expr *FromE) |
| ExprResult | PerformObjectMemberConversion (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member) |
| Cast a base object to a member's actual type. More... | |
| void | AddOverloadCandidate (FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=false) |
| AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments. More... | |
| void | AddFunctionCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false) |
| Add all of the function declarations in the given function set to the overload candidate set. More... | |
| void | AddMethodCandidate (DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false) |
| AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set. More... | |
| void | AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false) |
AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object). More... | |
| void | AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false) |
| Add a C++ member function template as a candidate to the candidate set, using template argument deduction to produce an appropriate member function template specialization. More... | |
| void | AddTemplateOverloadCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false) |
| Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization. More... | |
| void | AddConversionCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit) |
| AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over.match.conv], C++ [over.match.copy]). More... | |
| void | AddTemplateConversionCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit) |
| Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]). More... | |
| void | AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet) |
AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a function pointer via the conversion function Conversion, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4). More... | |
| void | AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, SourceRange OpRange=SourceRange()) |
| Add overload candidates for overloaded operators that are member functions. More... | |
| void | AddBuiltinCandidate (QualType ResultTy, QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0) |
| AddBuiltinCandidate - Add a candidate for a built-in operator. More... | |
| void | AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet) |
AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (C++ [over.built]), based on the operator Op and the arguments given. More... | |
| void | AddArgumentDependentLookupCandidates (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false) |
| Add function candidates found via argument-dependent lookup to the set of overloading candidates. More... | |
| void | NoteOverloadCandidate (FunctionDecl *Fn, QualType DestType=QualType(), bool TakingAddress=false) |
| void | NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType(), bool TakingAddress=false) |
| EnableIfAttr * | CheckEnableIf (FunctionDecl *Function, ArrayRef< Expr * > Args, bool MissingImplicitThis=false) |
| Check the enable_if expressions on the given function. More... | |
| bool | checkAddressOfFunctionIsAvailable (const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation()) |
| Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if the address can't be taken. More... | |
| QualType | ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType) |
| FunctionDecl * | ResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr) |
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to. More... | |
| FunctionDecl * | ResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr) |
| Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function. More... | |
| bool | ResolveAndFixSingleFunctionTemplateSpecialization (ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0) |
| Expr * | FixOverloadedFunctionReference (Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn) |
| FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibly with some parentheses and perhaps a '&' around it). More... | |
| ExprResult | FixOverloadedFunctionReference (ExprResult, DeclAccessPair FoundDecl, FunctionDecl *Fn) |
| void | AddOverloadedCallCandidates (UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false) |
| Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set. More... | |
| ForRangeStatus | BuildForRangeBeginEndCall (SourceLocation Loc, SourceLocation RangeLoc, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr) |
| Build a call to 'begin' or 'end' for a C++11 for-range statement. More... | |
| ExprResult | BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true, bool CalleesAddressIsTaken=false) |
| BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the declaration Func) and the call arguments Args/NumArgs, attempt to resolve the function call down to a specific function. More... | |
| bool | buildOverloadedCallSet (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result) |
| Constructs and populates an OverloadedCandidateSet from the given function. More... | |
| ExprResult | CreateOverloadedUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input) |
| Create a unary operation that may resolve to an overloaded operator. More... | |
| ExprResult | CreateOverloadedBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS) |
| Create a binary operation that may resolve to an overloaded operator. More... | |
| ExprResult | CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, Expr *Idx) |
| ExprResult | BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) |
| BuildCallToMemberFunction - Build a call to a member function. More... | |
| ExprResult | BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) |
BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (operator()) or performing a user-defined conversion on the object argument. More... | |
| ExprResult | BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr) |
BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists), where Base is an expression of class type and Member is the name of the member we're trying to find. More... | |
| bool | CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD) |
| CheckCallReturnType - Checks that a call expression's return type is complete. More... | |
| bool | CheckParmsForFunctionDef (ParmVarDecl *const *Param, ParmVarDecl *const *ParamEnd, bool CheckParameterNames) |
| Helpers for dealing with blocks and functions. More... | |
| void | CheckCXXDefaultArguments (FunctionDecl *FD) |
| CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default]. More... | |
| void | CheckExtraCXXDefaultArguments (Declarator &D) |
| CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator, which is not a function declaration or definition and therefore is not permitted to have default arguments. More... | |
| Scope * | getNonFieldDeclScope (Scope *S) |
| getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. More... | |
| ObjCInterfaceDecl * | getObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false) |
| Look for an Objective-C class in the translation unit. More... | |
| NamedDecl * | LazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) |
| LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope. More... | |
| NamedDecl * | ImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S) |
| ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2). More... | |
| void | AddKnownFunctionAttributes (FunctionDecl *FD) |
| Adds any function attributes that we know a priori based on the declaration of this function. More... | |
| void | ProcessPragmaWeak (Scope *S, Decl *D) |
| void | ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD) |
| ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D. More... | |
| void | ProcessDeclAttributeList (Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true) |
| ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes. More... | |
| bool | ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const AttributeList *AttrList) |
| void | checkUnusedDeclAttributes (Declarator &D) |
| checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration, complain about any decl attributes which might be lying around on it. More... | |
| bool | isValidPointerAttrType (QualType T, bool RefOkay=false) |
| Determine if type T is a valid subject for a nonnull and similar attributes. More... | |
| bool | CheckRegparmAttr (const AttributeList &attr, unsigned &value) |
| Checks a regparm attribute, returning true if it is ill-formed and otherwise setting numParams to the appropriate value. More... | |
| bool | CheckCallingConvAttr (const AttributeList &attr, CallingConv &CC, const FunctionDecl *FD=nullptr) |
| bool | CheckNoReturnAttr (const AttributeList &attr) |
| bool | checkStringLiteralArgumentAttr (const AttributeList &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr) |
Check if the argument ArgNum of Attr is a ASCII string literal. More... | |
| bool | checkSectionName (SourceLocation LiteralLoc, StringRef Str) |
| void | checkTargetAttr (SourceLocation LiteralLoc, StringRef Str) |
| bool | checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceAttr::Spelling SemanticSpelling) |
| void | CheckAlignasUnderalignment (Decl *D) |
| void | adjustMemberFunctionCC (QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc) |
| Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly. More... | |
| bool | hasExplicitCallingConv (QualType &T) |
| const AttributedType * | getCallingConvAttributedType (QualType T) const |
| Get the outermost AttributedType node that sets a calling convention. More... | |
| bool | checkNullabilityTypeSpecifier (QualType &type, NullabilityKind nullability, SourceLocation nullabilityLoc, bool isContextSensitive) |
| Check whether a nullability type specifier can be added to the given type. More... | |
| StmtResult | ProcessStmtAttributes (Stmt *Stmt, AttributeList *Attrs, SourceRange Range) |
| Stmt attributes - this routine is the top level dispatcher. More... | |
| void | WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) |
| void | CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl) |
| void | WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) |
| WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration. More... | |
| void | CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc) |
| CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface. More... | |
| void | ImplMethodsVsClassMethods (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false) |
| ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the class or category @implementation. More... | |
| void | DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties) |
| DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation. More... | |
| void | diagnoseNullResettableSynthesizedSetters (const ObjCImplDecl *impDecl) |
| Diagnose any null-resettable synthesized setters. More... | |
| void | DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) |
| DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation. More... | |
| void | DefaultSynthesizeProperties (Scope *S, Decl *D) |
| bool | IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV) |
| IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'. More... | |
| void | DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD) |
| DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor. More... | |
| ObjCIvarDecl * | GetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const |
| GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL. More... | |
| ObjCPropertyDecl * | HandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) |
| Called by ActOnProperty to handle @property declarations in class extensions. More... | |
| ObjCPropertyDecl * | CreatePropertyDecl (Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr) |
| Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface. More... | |
| void | AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) |
| AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property has one but not the other user-declared setter or getter. More... | |
| void | DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D) |
| void | DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD) |
| void | DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID) |
| DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation. More... | |
| bool | MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict) |
| MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly. More... | |
| void | MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false) |
| MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations. More... | |
| void | CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP) |
| CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found. More... | |
| void | addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method) |
| Add the given method to the list of globally-known methods. More... | |
| bool | CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool instance) |
| |
| bool | AreMultipleMethodsInGlobalPool (Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass) |
| void | DiagnoseMultipleMethodInGlobalPool (SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) |
| void | AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false) |
| AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool. More... | |
| void | AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false) |
| AddFactoryMethodToGlobalPool - Same as above, but for factory methods. More... | |
| void | AddAnyMethodToGlobalPool (Decl *D) |
| AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool. More... | |
| ObjCMethodDecl * | LookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false) |
| LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures. More... | |
| ObjCMethodDecl * | LookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false) |
| LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures. More... | |
| const ObjCMethodDecl * | SelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType()) |
| ObjCMethodDecl * | LookupImplementedMethodInGlobalPool (Selector Sel) |
| LookupImplementedMethodInGlobalPool - Returns the method which has an implementation. More... | |
| void | CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars) |
| CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization. More... | |
| FullExprArg | MakeFullExpr (Expr *Arg) |
| FullExprArg | MakeFullExpr (Expr *Arg, SourceLocation CC) |
| FullExprArg | MakeFullDiscardedValueExpr (Expr *Arg) |
| StmtResult | ActOnExprStmt (ExprResult Arg) |
| StmtResult | ActOnExprStmtError () |
| StmtResult | ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false) |
| void | ActOnStartOfCompoundStmt () |
| void | ActOnFinishOfCompoundStmt () |
| StmtResult | ActOnCompoundStmt (SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr) |
| StmtResult | ActOnDeclStmt (DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc) |
| void | ActOnForEachDeclStmt (DeclGroupPtrTy Decl) |
| StmtResult | ActOnForEachLValueExpr (Expr *E) |
| In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expression. More... | |
| StmtResult | ActOnCaseStmt (SourceLocation CaseLoc, Expr *LHSVal, SourceLocation DotDotDotLoc, Expr *RHSVal, SourceLocation ColonLoc) |
| void | ActOnCaseStmtBody (Stmt *CaseStmt, Stmt *SubStmt) |
| ActOnCaseStmtBody - This installs a statement as the body of a case. More... | |
| StmtResult | ActOnDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope) |
| StmtResult | ActOnLabelStmt (SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt) |
| StmtResult | ActOnAttributedStmt (SourceLocation AttrLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt) |
| StmtResult | ActOnIfStmt (SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal) |
| StmtResult | ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, Expr *Cond, Decl *CondVar) |
| StmtResult | ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body) |
| StmtResult | ActOnWhileStmt (SourceLocation WhileLoc, FullExprArg Cond, Decl *CondVar, Stmt *Body) |
| StmtResult | ActOnDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen) |
| StmtResult | ActOnForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, FullExprArg Second, Decl *SecondVar, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body) |
| ExprResult | CheckObjCForCollectionOperand (SourceLocation forLoc, Expr *collection) |
| StmtResult | ActOnObjCForCollectionStmt (SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) |
| StmtResult | FinishObjCForCollectionStmt (Stmt *ForCollection, Stmt *Body) |
| FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement. More... | |
| StmtResult | ActOnCXXForRangeStmt (Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind) |
| ActOnCXXForRangeStmt - Check and build a C++11 for-range statement. More... | |
| StmtResult | BuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation CoawaitLoc, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *BeginEndDecl, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) |
| BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement. More... | |
| StmtResult | FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body) |
| FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement. More... | |
| StmtResult | ActOnGotoStmt (SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl) |
| StmtResult | ActOnIndirectGotoStmt (SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp) |
| StmtResult | ActOnContinueStmt (SourceLocation ContinueLoc, Scope *CurScope) |
| StmtResult | ActOnBreakStmt (SourceLocation BreakLoc, Scope *CurScope) |
| void | ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams) |
| void | ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, ArrayRef< CapturedParamNameType > Params) |
| StmtResult | ActOnCapturedRegionEnd (Stmt *S) |
| void | ActOnCapturedRegionError () |
| RecordDecl * | CreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams) |
| VarDecl * | getCopyElisionCandidate (QualType ReturnType, Expr *E, bool AllowFunctionParameters) |
| Determine whether the given expression is a candidate for copy elision in either a return statement or a throw expression. More... | |
| bool | isCopyElisionCandidate (QualType ReturnType, const VarDecl *VD, bool AllowFunctionParameters) |
| StmtResult | ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope) |
| StmtResult | BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp) |
| StmtResult | ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp) |
| ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes. More... | |
| StmtResult | ActOnGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc) |
| ExprResult | LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, llvm::InlineAsmIdentifierInfo &Info, bool IsUnevaluatedContext) |
| bool | LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc) |
| ExprResult | LookupInlineAsmVarDeclField (Expr *RefExpr, StringRef Member, llvm::InlineAsmIdentifierInfo &Info, SourceLocation AsmLoc) |
| StmtResult | ActOnMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc) |
| LabelDecl * | GetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate) |
| VarDecl * | BuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false) |
| Build a type-check a new Objective-C exception variable declaration. More... | |
| Decl * | ActOnObjCExceptionDecl (Scope *S, Declarator &D) |
| StmtResult | ActOnObjCAtCatchStmt (SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body) |
| StmtResult | ActOnObjCAtFinallyStmt (SourceLocation AtLoc, Stmt *Body) |
| StmtResult | ActOnObjCAtTryStmt (SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally) |
| StmtResult | BuildObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw) |
| StmtResult | ActOnObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw, Scope *CurScope) |
| ExprResult | ActOnObjCAtSynchronizedOperand (SourceLocation atLoc, Expr *operand) |
| StmtResult | ActOnObjCAtSynchronizedStmt (SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody) |
| StmtResult | ActOnObjCAutoreleasePoolStmt (SourceLocation AtLoc, Stmt *Body) |
| VarDecl * | BuildExceptionDeclaration (Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id) |
| Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable. More... | |
| Decl * | ActOnExceptionDeclarator (Scope *S, Declarator &D) |
| ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler. More... | |
| StmtResult | ActOnCXXCatchBlock (SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock) |
| ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them. More... | |
| StmtResult | ActOnCXXTryBlock (SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers) |
| ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them. More... | |
| StmtResult | ActOnSEHTryBlock (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler) |
| StmtResult | ActOnSEHExceptBlock (SourceLocation Loc, Expr *FilterExpr, Stmt *Block) |
| void | ActOnStartSEHFinallyBlock () |
| void | ActOnAbortSEHFinallyBlock () |
| StmtResult | ActOnFinishSEHFinallyBlock (SourceLocation Loc, Stmt *Block) |
| StmtResult | ActOnSEHLeaveStmt (SourceLocation Loc, Scope *CurScope) |
| void | DiagnoseReturnInConstructorExceptionHandler (CXXTryStmt *TryBlock) |
| bool | ShouldWarnIfUnusedFileScopedDecl (const DeclaratorDecl *D) const |
| void | MarkUnusedFileScopedDecl (const DeclaratorDecl *D) |
| If it's a file scoped decl that must warn if not used, keep track of it. More... | |
| void | DiagnoseUnusedExprResult (const Stmt *S) |
| DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn. More... | |
| void | DiagnoseUnusedNestedTypedefs (const RecordDecl *D) |
| void | DiagnoseUnusedDecl (const NamedDecl *ND) |
| DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused). More... | |
| void | DiagnoseEmptyStmtBody (SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID) |
Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body, and it is located on the same line. More... | |
| void | DiagnoseEmptyLoopBody (const Stmt *S, const Stmt *PossibleBody) |
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body. More... | |
| void | DiagnoseSelfMove (const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc) |
| Warn if a value is moved to itself. More... | |
| void | diagnoseNullableToNonnullConversion (QualType DstType, QualType SrcType, SourceLocation Loc) |
| Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one. More... | |
| ParsingDeclState | PushParsingDeclaration (sema::DelayedDiagnosticPool &pool) |
| void | PopParsingDeclaration (ParsingDeclState state, Decl *decl) |
| ParsingClassState | PushParsingClass () |
| void | PopParsingClass (ParsingClassState state) |
| 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. More... | |
| void | EmitAvailabilityWarning (AvailabilityDiagnostic AD, NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) |
| bool | makeUnavailableInSystemHeader (SourceLocation loc, UnavailableAttr::ImplicitReason reason) |
| makeUnavailableInSystemHeader - There is an error in the current context. More... | |
| bool | CanUseDecl (NamedDecl *D) |
| Determine whether the use of this declaration is valid, without emitting diagnostics. More... | |
| bool | DiagnoseUseOfDecl (NamedDecl *D, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false) |
| Determine whether the use of this declaration is valid, and emit any corresponding diagnostics. More... | |
| void | NoteDeletedFunction (FunctionDecl *FD) |
| Emit a note explaining that this function is deleted. More... | |
| std::string | getDeletedOrUnavailableSuffix (const FunctionDecl *FD) |
| Retrieve the message suffix that should be added to a diagnostic complaining about the given function being deleted or unavailable. More... | |
| bool | DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc) |
| void | DiagnoseSentinelCalls (NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args) |
| DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied. More... | |
| void | PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, bool IsDecltype=false) |
| void | PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, bool IsDecltype=false) |
| void | PopExpressionEvaluationContext () |
| void | DiscardCleanupsInEvaluationContext () |
| ExprResult | TransformToPotentiallyEvaluated (Expr *E) |
| ExprResult | HandleExprEvaluationContextForTypeof (Expr *E) |
| ExprResult | ActOnConstantExpression (ExprResult Res) |
| void | MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool OdrUse) |
| Perform marking for a reference to an arbitrary declaration. More... | |
| void | MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func, bool OdrUse=true) |
| Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3) More... | |
| void | MarkVariableReferenced (SourceLocation Loc, VarDecl *Var) |
| Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3). More... | |
| void | MarkDeclRefReferenced (DeclRefExpr *E) |
| Perform reference-marking and odr-use handling for a DeclRefExpr. More... | |
| void | MarkMemberReferenced (MemberExpr *E) |
| Perform reference-marking and odr-use handling for a MemberExpr. More... | |
| void | UpdateMarkingForLValueToRValue (Expr *E) |
| void | CleanupVarDeclMarking () |
| bool | tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt) |
| Try to capture the given variable. More... | |
| bool | tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation()) |
| Try to capture the given variable. More... | |
| bool | NeedToCaptureVariable (VarDecl *Var, SourceLocation Loc) |
| Checks if the variable must be captured. More... | |
| QualType | getCapturedDeclRefType (VarDecl *Var, SourceLocation Loc) |
| Given a variable, determine the type that a reference to that variable will have in the given scope. More... | |
| void | MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T) |
| void | MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false) |
| Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced". More... | |
| bool | tryToRecoverWithCall (ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr) |
| Try to recover by turning the given expression into a call. More... | |
| bool | tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads) |
| Figure out if an expression could be turned into a call. More... | |
| bool | DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD) |
| Conditionally issue a diagnostic based on the current evaluation context. More... | |
| SourceRange | getExprRange (Expr *E) const |
| ExprResult | ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr) |
| void | DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs) |
| Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments. More... | |
| bool | DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, std::unique_ptr< CorrectionCandidateCallback > CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None, TypoExpr **Out=nullptr) |
| Diagnose an empty lookup. More... | |
| ExprResult | LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false) |
| LookupInObjCMethod - The parser has read a name in, and Sema has detected that we're currently inside an ObjC method. More... | |
| ExprResult | ActOnDependentIdExpression (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs) |
| ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed. More... | |
| ExprResult | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr) |
| ExprResult | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr) |
| BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture. More... | |
| ExprResult | BuildAnonymousStructUnionMemberReference (const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation()) |
| ExprResult | BuildPossibleImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S) |
| Builds an expression which might be an implicit member expression. More... | |
| ExprResult | BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S) |
| Builds an implicit member access expression. More... | |
| bool | UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen) |
| ExprResult | BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI=nullptr) |
| BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template instantiation. More... | |
| ExprResult | BuildDependentDeclRefExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) |
| ExprResult | BuildDeclarationNameExpr (const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false) |
| ExprResult | BuildDeclarationNameExpr (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr, bool AcceptInvalidDecl=false) |
| Complete semantic analysis for a reference to the given declaration. More... | |
| ExprResult | BuildLiteralOperatorCall (LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr) |
| BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator described by the provided lookup results. More... | |
| ExprResult | BuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentType IT) |
| ExprResult | ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind) |
| ExprResult | ActOnIntegerConstant (SourceLocation Loc, uint64_t Val) |
| bool | CheckLoopHintExpr (Expr *E, SourceLocation Loc) |
| ExprResult | ActOnNumericConstant (const Token &Tok, Scope *UDLScope=nullptr) |
| ExprResult | ActOnCharacterConstant (const Token &Tok, Scope *UDLScope=nullptr) |
| ExprResult | ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E) |
| ExprResult | ActOnParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val) |
| ExprResult | ActOnStringLiteral (ArrayRef< Token > StringToks, Scope *UDLScope=nullptr) |
| ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g. More... | |
| ExprResult | ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs) |
| ExprResult | CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs) |
| ExprResult | CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr) |
| ExprResult | BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input) |
| ExprResult | ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input) |
| QualType | CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc) |
| CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object. More... | |
| ExprResult | CreateUnaryExprOrTypeTraitExpr (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R) |
| Build a sizeof or alignof expression given a type operand. More... | |
| ExprResult | CreateUnaryExprOrTypeTraitExpr (Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind) |
| Build a sizeof or alignof expression given an expression operand. More... | |
| ExprResult | ActOnUnaryExprOrTypeTraitExpr (SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, SourceRange ArgRange) |
ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __alignof Note that the ArgRange is invalid if isType is false. More... | |
| ExprResult | CheckPlaceholderExpr (Expr *E) |
| Check for operands with placeholder types and complain if found. More... | |
| bool | CheckVecStepExpr (Expr *E) |
| bool | CheckUnaryExprOrTypeTraitOperand (Expr *E, UnaryExprOrTypeTrait ExprKind) |
| Check the constraints on expression operands to unary type expression and type traits. More... | |
| bool | CheckUnaryExprOrTypeTraitOperand (QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind) |
| Check the constraints on operands to unary expression and type traits. More... | |
| ExprResult | ActOnSizeofParameterPackExpr (Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) |
| Called when an expression computing the size of a parameter pack is parsed. More... | |
| ExprResult | ActOnPostfixUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input) |
| ExprResult | ActOnArraySubscriptExpr (Scope *S, Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) |
| ExprResult | CreateBuiltinArraySubscriptExpr (Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) |
| ExprResult | ActOnOMPArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLoc, Expr *Length, SourceLocation RBLoc) |
| ExprResult | BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr) |
| ExprResult | BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, bool SuppressQualifierCheck=false, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr) |
| ExprResult | PerformMemberExprBaseConversion (Expr *Base, bool IsArrow) |
| Perform conversions on the LHS of a member access expression. More... | |
| bool | CheckQualifiedMemberReference (Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R) |
| ExprResult | ActOnDependentMemberExpr (Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) |
| ExprResult | ActOnMemberAccessExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl) |
| The main callback when the parser finds something like expression . More... | |
| void | ActOnDefaultCtorInitializers (Decl *CDtorDecl) |
| bool | ConvertArgumentsForCall (CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false) |
| ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto. More... | |
| void | CheckStaticArrayArgument (SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr) |
| CheckStaticArrayArgument - If the given argument corresponds to a static array parameter, check that it is non-null, and that if it is formed by array-to-pointer decay, the underlying array is sufficiently large. More... | |
| ExprResult | ActOnCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false) |
| ActOnCallExpr - Handle a call to Fn with the specified array of arguments. More... | |
| ExprResult | BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false) |
| BuildResolvedCallExpr - Build a call to a resolved expression, i.e. More... | |
| ExprResult | ActOnCUDAExecConfigExpr (Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc) |
| ExprResult | ActOnCastExpr (Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr) |
| ExprResult | BuildCStyleCastExpr (SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op) |
| CastKind | PrepareScalarCast (ExprResult &src, QualType destType) |
| Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required. More... | |
| ExprResult | BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo) |
| Build an altivec or OpenCL literal. More... | |
| ExprResult | MaybeConvertParenListExprToParenExpr (Scope *S, Expr *ME) |
| This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators. More... | |
| ExprResult | ActOnCompoundLiteral (SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr) |
| ExprResult | BuildCompoundLiteralExpr (SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) |
| ExprResult | ActOnInitList (SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) |
| ExprResult | ActOnDesignatedInitializer (Designation &Desig, SourceLocation Loc, bool GNUSyntax, ExprResult Init) |
| ExprResult | ActOnBinOp (Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr) |
| ExprResult | BuildBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) |
| ExprResult | CreateBuiltinBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) |
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc. More... | |
| ExprResult | ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr) |
| ActOnConditionalOp - Parse a ?: operation. More... | |
| ExprResult | ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl) |
| ActOnAddrLabel - Parse the GNU address of label extension: "&&foo". More... | |
| void | ActOnStartStmtExpr () |
| ExprResult | ActOnStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc) |
| void | ActOnStmtExprError () |
| ExprResult | BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc) |
| __builtin_offsetof(type, a.b[123][456].c) More... | |
| ExprResult | ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc) |
| ExprResult | ActOnChooseExpr (SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc) |
| ExprResult | ActOnVAArg (SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc) |
| ExprResult | BuildVAArgExpr (SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) |
| ExprResult | ActOnGNUNullExpr (SourceLocation TokenLoc) |
| bool | CheckCaseExpression (Expr *E) |
| IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo) |
| IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name) |
| StmtResult | BuildMSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested) |
| StmtResult | ActOnMSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested) |
| void | ActOnBlockStart (SourceLocation CaretLoc, Scope *CurScope) |
| ActOnBlockStart - This callback is invoked when a block literal is started. More... | |
| void | ActOnBlockArguments (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope) |
| ActOnBlockArguments - This callback allows processing of block arguments. More... | |
| void | ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope) |
| ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the information about the block from the action impl. More... | |
| ExprResult | ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope) |
| ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed. More... | |
| ExprResult | ActOnConvertVectorExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc) |
| __builtin_convertvector(...) More... | |
| ExprResult | ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc) |
| __builtin_astype(...) More... | |
| Decl * | ActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, AttributeList *AttrList, UsingDirectiveDecl *&UsingDecl) |
| ActOnStartNamespaceDef - This is called at the start of a namespace definition. More... | |
| void | ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace) |
| ActOnFinishNamespaceDef - This callback is called after a namespace is exited. More... | |
| NamespaceDecl * | getStdNamespace () const |
| NamespaceDecl * | getOrCreateStdNamespace () |
| Retrieve the special "std" namespace, which may require us to implicitly define the namespace. More... | |
| CXXRecordDecl * | getStdBadAlloc () const |
| bool | isStdInitializerList (QualType Ty, QualType *Element) |
| Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL, assigns the element type to Element. More... | |
| QualType | BuildStdInitializerList (QualType Element, SourceLocation Loc) |
| Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found. More... | |
| bool | isInitListConstructor (const CXXConstructorDecl *Ctor) |
| Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2. More... | |
| Decl * | ActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, AttributeList *AttrList) |
| void | PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir) |
| Decl * | ActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) |
| void | HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow) |
| Hides a using shadow declaration. More... | |
| bool | CheckUsingShadowDecl (UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow) |
| Determines whether to create a using shadow decl for a particular decl, given the set of decls existing prior to this using lookup. More... | |
| UsingShadowDecl * | BuildUsingShadowDecl (Scope *S, UsingDecl *UD, NamedDecl *Target, UsingShadowDecl *PrevDecl) |
| Builds a shadow declaration corresponding to a 'using' declaration. More... | |
| bool | CheckUsingDeclRedeclaration (SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous) |
| Checks that the given using declaration is not an invalid redeclaration. More... | |
| bool | CheckUsingDeclQualifier (SourceLocation UsingLoc, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc) |
| Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope. More... | |
| NamedDecl * | BuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, AttributeList *AttrList, bool IsInstantiation, bool HasTypenameKeyword, SourceLocation TypenameLoc) |
| Builds a using declaration. More... | |
| bool | CheckInheritingConstructorUsingDecl (UsingDecl *UD) |
| Additional checks for a using declaration referring to a constructor name. More... | |
| Decl * | ActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, bool HasUsingKeyword, SourceLocation UsingLoc, CXXScopeSpec &SS, UnqualifiedId &Name, AttributeList *AttrList, bool HasTypenameKeyword, SourceLocation TypenameLoc) |
| Decl * | ActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, AttributeList *AttrList, TypeResult Type, Decl *DeclFromDeclSpec) |
| ExprResult | BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange) |
| BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions. More... | |
| ExprResult | BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange) |
| BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions. More... | |
| ExprResult | BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field) |
| ExprResult | BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param) |
| BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed. More... | |
| void | FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType) |
| FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedDefaultCtorExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD) |
| Determine what sort of exception specification a defaulted copy constructor of a class will have. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedCopyCtorExceptionSpec (CXXMethodDecl *MD) |
| Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedCopyAssignmentExceptionSpec (CXXMethodDecl *MD) |
| Determine what sort of exception specification a defautled copy assignment operator of a class will have, and whether the parameter will be const. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedMoveCtorExceptionSpec (CXXMethodDecl *MD) |
| Determine what sort of exception specification a defaulted move constructor of a class will have. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedMoveAssignmentExceptionSpec (CXXMethodDecl *MD) |
| Determine what sort of exception specification a defaulted move assignment operator of a class will have. More... | |
| ImplicitExceptionSpecification | ComputeDefaultedDtorExceptionSpec (CXXMethodDecl *MD) |
| Determine what sort of exception specification a defaulted destructor of a class will have. More... | |
| ImplicitExceptionSpecification | ComputeInheritingCtorExceptionSpec (CXXConstructorDecl *CD) |
| Determine what sort of exception specification an inheriting constructor of a class will have. More... | |
| void | EvaluateImplicitExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD) |
| Evaluate the implicit exception specification for a defaulted special member function. More... | |
| void | checkExceptionSpecification (bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI) |
| Check the given exception-specification and update the exception specification information with the results. More... | |
| bool | isLibstdcxxEagerExceptionSpecHack (const Declarator &D) |
| Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification to work around a libstdc++ bug. More... | |
| void | actOnDelayedExceptionSpecification (Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr) |
| Add an exception-specification to the given member function (or member function template). More... | |
| bool | ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false) |
| Determine if a special member function should have a deleted definition when it is defaulted. More... | |
| CXXConstructorDecl * | DeclareImplicitDefaultConstructor (CXXRecordDecl *ClassDecl) |
| Declare the implicit default constructor for the given class. More... | |
| void | DefineImplicitDefaultConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor) |
| DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor. More... | |
| CXXDestructorDecl * | DeclareImplicitDestructor (CXXRecordDecl *ClassDecl) |
| Declare the implicit destructor for the given class. More... | |
| void | DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor) |
| DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor. More... | |
| void | AdjustDestructorExceptionSpec (CXXRecordDecl *ClassDecl, CXXDestructorDecl *Destructor) |
| Build an exception spec for destructors that don't have one. More... | |
| void | DeclareInheritingConstructors (CXXRecordDecl *ClassDecl) |
| Declare all inheriting constructors for the given class. More... | |
| void | DefineInheritingConstructor (SourceLocation UseLoc, CXXConstructorDecl *Constructor) |
| Define the specified inheriting constructor. More... | |
| CXXConstructorDecl * | DeclareImplicitCopyConstructor (CXXRecordDecl *ClassDecl) |
| Declare the implicit copy constructor for the given class. More... | |
| void | DefineImplicitCopyConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor) |
| DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor. More... | |
| CXXConstructorDecl * | DeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl) |
| Declare the implicit move constructor for the given class. More... | |
| void | DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor) |
| DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor. More... | |
| CXXMethodDecl * | DeclareImplicitCopyAssignment (CXXRecordDecl *ClassDecl) |
| Declare the implicit copy assignment operator for the given class. More... | |
| void | DefineImplicitCopyAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl) |
| Defines an implicitly-declared copy assignment operator. More... | |
| CXXMethodDecl * | DeclareImplicitMoveAssignment (CXXRecordDecl *ClassDecl) |
| Declare the implicit move assignment operator for the given class. More... | |
| void | DefineImplicitMoveAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl) |
| Defines an implicitly-declared move assignment operator. More... | |
| void | ForceDeclarationOfImplicitMembers (CXXRecordDecl *Class) |
| Force the declaration of any implicitly-declared members of this class. More... | |
| bool | isImplicitlyDeleted (FunctionDecl *FD) |
| Determine whether the given function is an implicitly-deleted special member function. More... | |
| bool | checkThisInStaticMemberFunctionType (CXXMethodDecl *Method) |
| Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be. More... | |
| bool | checkThisInStaticMemberFunctionExceptionSpec (CXXMethodDecl *Method) |
| Whether this' shows up in the exception specification of a static member function. More... | |
| bool | checkThisInStaticMemberFunctionAttributes (CXXMethodDecl *Method) |
| Check whether 'this' shows up in the attributes of the given static member function. More... | |
| ExprResult | MaybeBindToTemporary (Expr *E) |
| MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr. More... | |
| bool | CompleteConstructorCall (CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false) |
| Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor. More... | |
| ParsedType | getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name) |
| Handle the result of the special case name lookup for inheriting constructor declarations. More... | |
| ParsedType | getDestructorName (SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext) |
| ParsedType | getDestructorType (const DeclSpec &DS, ParsedType ObjectType) |
| void | CheckCompatibleReinterpretCast (QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range) |
| ExprResult | ActOnCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc) |
| ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's. More... | |
| ExprResult | BuildCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens) |
| ExprResult | BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) |
| Build a C++ typeid expression with a type operand. More... | |
| ExprResult | BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc) |
| Build a C++ typeid expression with an expression operand. More... | |
| ExprResult | ActOnCXXTypeid (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc) |
| ActOnCXXTypeid - Parse typeid( something ). More... | |
| ExprResult | BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) |
| Build a Microsoft __uuidof expression with a type operand. More... | |
| ExprResult | BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc) |
| Build a Microsoft __uuidof expression with an expression operand. More... | |
| ExprResult | ActOnCXXUuidof (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc) |
| ActOnCXXUuidof - Parse __uuidof( something ). More... | |
| ExprResult | ActOnCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) |
| Handle a C++1z fold-expression: ( expr op ... op expr ). More... | |
| ExprResult | BuildCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) |
| ExprResult | BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator) |
| ExprResult | ActOnCXXThis (SourceLocation loc) |
| QualType | getCurrentThisType () |
| Try to retrieve the type of the 'this' pointer. More... | |
| bool | CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr) |
| Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context. More... | |
| bool | isThisOutsideMemberFunctionBody (QualType BaseType) |
| Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined. More... | |
| ExprResult | ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind) |
| ActOnCXXBoolLiteral - Parse {true,false} literals. More... | |
| ExprResult | ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind) |
| ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals. More... | |
| ExprResult | ActOnCXXNullPtrLiteral (SourceLocation Loc) |
| ActOnCXXNullPtrLiteral - Parse 'nullptr'. More... | |
| ExprResult | ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr) |
| ActOnCXXThrow - Parse throw expressions. More... | |
| ExprResult | BuildCXXThrow (SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope) |
| bool | CheckCXXThrowOperand (SourceLocation ThrowLoc, QualType ThrowTy, Expr *E) |
| CheckCXXThrowOperand - Validate the operand of a throw. More... | |
| ExprResult | ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc) |
| ActOnCXXTypeConstructExpr - Parse construction of a specified type. More... | |
| ExprResult | BuildCXXTypeConstructExpr (TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc) |
| ActOnCXXTypeConstructExpr - Parse construction of a specified type. More... | |
| ExprResult | ActOnCXXNew (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer) |
| ActOnCXXNew - Parsed a C++ 'new' expression. More... | |
| ExprResult | BuildCXXNew (SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Expr *ArraySize, SourceRange DirectInitRange, Expr *Initializer, bool TypeMayContainAuto=true) |
| bool | CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R) |
| Checks that a type is suitable as the allocated type in a new-expression. More... | |
| bool | FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, bool UseGlobal, QualType AllocType, bool IsArray, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete) |
| FindAllocationFunctions - Finds the overloads of operator new and delete that are appropriate for the allocation. More... | |
| bool | FindAllocationOverload (SourceLocation StartLoc, SourceRange Range, DeclarationName Name, MultiExprArg Args, DeclContext *Ctx, bool AllowMissing, FunctionDecl *&Operator, bool Diagnose=true) |
| Find an fitting overload for the allocation function in the specified scope. More... | |
| void | DeclareGlobalNewDelete () |
| DeclareGlobalNewDelete - Declare the global forms of operator new and delete. More... | |
| void | DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, QualType Param1, QualType Param2=QualType(), bool addRestrictAttr=false) |
| DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist. More... | |
| bool | FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true) |
| FunctionDecl * | FindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, DeclarationName Name) |
| ExprResult | ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand) |
| ActOnCXXDelete - Parsed a C++ 'delete' expression. More... | |
| DeclResult | ActOnCXXConditionDeclaration (Scope *S, Declarator &D) |
| ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement. More... | |
| ExprResult | CheckConditionVariable (VarDecl *ConditionVar, SourceLocation StmtLoc, bool ConvertToBoolean) |
| Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement. More... | |
| ExprResult | ActOnNoexceptExpr (SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen) |
| ExprResult | BuildCXXNoexceptExpr (SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen) |
| ExprResult | ActOnTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc) |
| Parsed one of the type trait support pseudo-functions. More... | |
| ExprResult | BuildTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc) |
| ExprResult | ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen) |
| ActOnArrayTypeTrait - Parsed one of the bianry type trait support pseudo-functions. More... | |
| ExprResult | BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen) |
| ExprResult | ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen) |
| ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions. More... | |
| ExprResult | BuildExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen) |
| ExprResult | ActOnStartCXXMemberReference (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) |
| ExprResult | BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType) |
| ExprResult | ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName) |
| ExprResult | ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS) |
| Expr * | MaybeCreateExprWithCleanups (Expr *SubExpr) |
| MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node. More... | |
| Stmt * | MaybeCreateStmtWithCleanups (Stmt *SubStmt) |
| ExprResult | MaybeCreateExprWithCleanups (ExprResult SubExpr) |
| ExprResult | ActOnFinishFullExpr (Expr *Expr) |
| ExprResult | ActOnFinishFullExpr (Expr *Expr, SourceLocation CC, bool DiscardedValue=false, bool IsConstexpr=false, bool IsLambdaInitCaptureInitializer=false) |
| StmtResult | ActOnFinishFullStmt (Stmt *Stmt) |
| bool | RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC) |
| Require that the context specified by SS be complete. More... | |
| DeclContext * | computeDeclContext (QualType T) |
| Compute the DeclContext that is associated with the given type. More... | |
| DeclContext * | computeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false) |
| Compute the DeclContext that is associated with the given scope specifier. More... | |
| bool | isDependentScopeSpecifier (const CXXScopeSpec &SS) |
| CXXRecordDecl * | getCurrentInstantiationOf (NestedNameSpecifier *NNS) |
| If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1). More... | |
| bool | ActOnCXXGlobalScopeSpecifier (SourceLocation CCLoc, CXXScopeSpec &SS) |
| The parser has parsed a global nested-name-specifier '::'. More... | |
| bool | ActOnSuperScopeSpecifier (SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS) |
| The parser has parsed a '__super' nested-name-specifier. More... | |
| bool | isAcceptableNestedNameSpecifier (const NamedDecl *SD, bool *CanCorrect=nullptr) |
| Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier. More... | |
| NamedDecl * | FindFirstQualifierInScope (Scope *S, NestedNameSpecifier *NNS) |
| If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup. More... | |
| bool | isNonTypeNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation IdLoc, IdentifierInfo &II, ParsedType ObjectType) |
| bool | BuildCXXNestedNameSpecifier (Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, QualType ObjectType, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr) |
| Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier. More... | |
| bool | ActOnCXXNestedNameSpecifier (Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, ParsedType ObjectType, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr) |
| The parser has parsed a nested-name-specifier 'identifier::'. More... | |
| ExprResult | ActOnDecltypeExpression (Expr *E) |
| Process the expression contained within a decltype. More... | |
| bool | ActOnCXXNestedNameSpecifierDecltype (CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc) |
| bool | IsInvalidUnlessNestedName (Scope *S, CXXScopeSpec &SS, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation ColonLoc, ParsedType ObjectType, bool EnteringContext) |
| IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the specified identifier is only valid as a nested name specifier, for example a namespace name. More... | |
| bool | ActOnCXXNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, SourceLocation CCLoc, bool EnteringContext) |
| The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'. More... | |
| void * | SaveNestedNameSpecifierAnnotation (CXXScopeSpec &SS) |
| Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier. More... | |
| void | RestoreNestedNameSpecifierAnnotation (void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS) |
| Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure. More... | |
| bool | ShouldEnterDeclaratorScope (Scope *S, const CXXScopeSpec &SS) |
| bool | ActOnCXXEnterDeclaratorScope (Scope *S, CXXScopeSpec &SS) |
| ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id. More... | |
| void | ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS) |
| ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished. More... | |
| void | ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl) |
| ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'. More... | |
| void | ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl) |
| ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'. More... | |
| CXXRecordDecl * | createLambdaClosureType (SourceRange IntroducerRange, TypeSourceInfo *Info, bool KnownDependent, LambdaCaptureDefault CaptureDefault) |
| Create a new lambda closure type. More... | |
| CXXMethodDecl * | startLambdaDefinition (CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params) |
| Start the definition of a lambda expression. More... | |
| void | buildLambdaScope (sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable) |
| Endow the lambda scope info with the relevant properties. More... | |
| ParsedType | actOnLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init) |
| Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference. More... | |
| QualType | buildLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, IdentifierInfo *Id, bool DirectInit, Expr *&Init) |
| VarDecl * | createLambdaInitCaptureVarDecl (SourceLocation Loc, QualType InitCaptureType, IdentifierInfo *Id, unsigned InitStyle, Expr *Init) |
| Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture. More... | |
| FieldDecl * | buildInitCaptureField (sema::LambdaScopeInfo *LSI, VarDecl *Var) |
| Build the implicit field for an init-capture. More... | |
| void | finishLambdaExplicitCaptures (sema::LambdaScopeInfo *LSI) |
| Note that we have finished the explicit captures for the given lambda. More... | |
| void | addLambdaParameters (CXXMethodDecl *CallOperator, Scope *CurScope) |
| Introduce the lambda parameters into scope. More... | |
| void | deduceClosureReturnType (sema::CapturingScopeInfo &CSI) |
| Deduce a block or lambda's return type based on the return statements present in the body. More... | |
| void | ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope) |
| ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda. More... | |
| void | ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false) |
| ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda. More... | |
| ExprResult | ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope) |
| ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed. More... | |
| ExprResult | BuildLambdaExpr (SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI) |
| Complete a lambda-expression having processed and attached the lambda body. More... | |
| void | DefineImplicitLambdaToFunctionPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv) |
| Define the "body" of the conversion from a lambda object to a function pointer. More... | |
| void | DefineImplicitLambdaToBlockPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv) |
| Define the "body" of the conversion from a lambda object to a block pointer. More... | |
| ExprResult | BuildBlockForLambdaConversion (SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src) |
| ExprResult | ParseObjCStringLiteral (SourceLocation *AtLocs, ArrayRef< Expr * > Strings) |
| ExprResult | BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S) |
| ExprResult | BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates) |
| Decl * | ActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc) |
| ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'. More... | |
| Decl * | ActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc) |
| ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec. More... | |
| bool | isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr) |
| isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined. More... | |
| bool | isCurrentClassNameTypo (IdentifierInfo *&II, const CXXScopeSpec *SS) |
| Determine whether the identifier II is a typo for the name of the class type currently being defined. More... | |
| bool | ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, AttributeList *Attrs=nullptr) |
| ActOnAccessSpecifier - Parsed an access specifier followed by a colon. More... | |
| NamedDecl * | ActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle) |
| ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed. More... | |
| void | ActOnStartCXXInClassMemberInitializer () |
| Enter a new C++ default initializer scope. More... | |
| void | ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init) |
| This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. More... | |
| MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc) |
| Handle a C++ member initializer using parentheses syntax. More... | |
| MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc) |
| Handle a C++ member initializer using braced-init-list syntax. More... | |
| MemInitResult | BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) |
| Handle a C++ member initializer. More... | |
| MemInitResult | BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc) |
| MemInitResult | BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) |
| MemInitResult | BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl) |
| bool | SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer) |
| bool | SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None) |
| void | SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation) |
| SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized. More... | |
| void | MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record) |
| MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced. More... | |
| void | LoadExternalVTableUses () |
| Load any externally-stored vtable uses. More... | |
| void | MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false) |
| Note that the vtable for the given class was used at the given location. More... | |
| void | MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD) |
| Mark the exception specifications of all virtual member functions in the given class as needed. More... | |
| void | MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD) |
| MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced. More... | |
| bool | DefineUsedVTables () |
| Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables. More... | |
| void | AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl) |
| AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1). More... | |
| void | ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors) |
| ActOnMemInitializers - Handle the member initializers for a constructor. More... | |
| void | checkClassLevelDLLAttribute (CXXRecordDecl *Class) |
| Check class-level dllimport/dllexport attribute. More... | |
| void | propagateDLLAttrToBaseClassTemplate (CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) |
| Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility. More... | |
| void | CheckCompletedCXXClass (CXXRecordDecl *Record) |
| Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc. More... | |
| void | ActOnFinishCXXMemberSpecification (Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList) |
| void | ActOnFinishCXXMemberDecls () |
| Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed. More... | |
| void | ActOnFinishCXXNonNestedClass (Decl *D) |
| void | ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param) |
| This is used to implement the constant expression evaluation part of the attribute enable_if extension. More... | |
| unsigned | ActOnReenterTemplateScope (Scope *S, Decl *Template) |
| void | ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record) |
| void | ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method) |
| ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments. More... | |
| void | ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param) |
| ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration. More... | |
| void | ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record) |
| void | ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method) |
| ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method. More... | |
| void | ActOnFinishDelayedMemberInitializers (Decl *Record) |
| void | MarkAsLateParsedTemplate (FunctionDecl *FD, Decl *FnD, CachedTokens &Toks) |
| void | UnmarkAsLateParsedTemplate (FunctionDecl *FD) |
| bool | IsInsideALocalClassWithinATemplateFunction () |
| Decl * | ActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc) |
| Decl * | BuildStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed) |
| FriendDecl * | CheckFriendTypeDecl (SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) |
| Perform semantic analysis of the given friend type declaration. More... | |
| Decl * | ActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams) |
| Handle a friend type declaration. More... | |
| NamedDecl * | ActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) |
| QualType | CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC) |
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R. More... | |
| void | CheckConstructor (CXXConstructorDecl *Constructor) |
| CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required. More... | |
| QualType | CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC) |
CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator D with type R. More... | |
| bool | CheckDestructor (CXXDestructorDecl *Destructor) |
| CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required. More... | |
| void | CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC) |
CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator D with type R. More... | |
| Decl * | ActOnConversionDeclarator (CXXConversionDecl *Conversion) |
| ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function. More... | |
| void | CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD) |
| void | CheckExplicitlyDefaultedMemberExceptionSpec (CXXMethodDecl *MD, const FunctionProtoType *T) |
| Check whether the exception specification provided for an explicitly-defaulted special member matches the exception specification that would have been generated for an implicit special member, per C++11 [dcl.fct.def.default]p2. More... | |
| void | CheckDelayedMemberExceptionSpecs () |
| CXXBaseSpecifier * | CheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) |
| ActOnBaseSpecifier - Parsed a base specifier. More... | |
| BaseResult | ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, ParsedAttributes &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc) |
| ActOnBaseSpecifier - Parsed a base specifier. More... | |
| bool | AttachBaseSpecifiers (CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier * > Bases) |
| Performs the actual work of attaching the given base class specifiers to a C++ class. More... | |
| void | ActOnBaseSpecifiers (Decl *ClassDecl, MutableArrayRef< CXXBaseSpecifier * > Bases) |
| ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes. More... | |
| bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base) |
Determine whether the type Derived is a C++ class that is derived from the type Base. More... | |
| bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base, CXXBasePaths &Paths) |
Determine whether the type Derived is a C++ class that is derived from the type Base. More... | |
| void | BuildBasePathArray (const CXXBasePaths &Paths, CXXCastPath &BasePath) |
| bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false) |
| bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbigiousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath, bool IgnoreAccess=false) |
| CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible). More... | |
| std::string | getAmbiguousPathsDisplayString (CXXBasePaths &Paths) |
| Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class. More... | |
| bool | CheckOverridingFunctionAttributes (const CXXMethodDecl *New, const CXXMethodDecl *Old) |
| bool | CheckOverridingFunctionReturnType (const CXXMethodDecl *New, const CXXMethodDecl *Old) |
| CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5. More... | |
| bool | CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old) |
| CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec. More... | |
| bool | CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange) |
| Mark the given method pure. More... | |
| void | CheckOverrideControl (NamedDecl *D) |
| CheckOverrideControl - Check C++11 override control semantics. More... | |
| void | DiagnoseAbsenceOfOverrideControl (NamedDecl *D) |
| DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method. More... | |
| bool | CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old) |
| CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4. More... | |
| bool | SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS) |
| SetMemberAccessSpecifier - Set the access specifier of a member. More... | |
| AccessResult | CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl) |
| Perform access-control checking on a previously-unresolved member access which has now been resolved to a member. More... | |
| AccessResult | CheckUnresolvedLookupAccess (UnresolvedLookupExpr *E, DeclAccessPair FoundDecl) |
| AccessResult | CheckAllocationAccess (SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true) |
| Checks access to an overloaded operator new or delete. More... | |
| AccessResult | CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, bool IsCopyBindingRefToTemp=false) |
| Checks access to a constructor. More... | |
| AccessResult | CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, const PartialDiagnostic &PDiag) |
| Checks access to a constructor. More... | |
| AccessResult | CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType()) |
| AccessResult | CheckFriendAccess (NamedDecl *D) |
| Checks access to the target of a friend declaration. More... | |
| AccessResult | CheckMemberAccess (SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found) |
| Checks access to a member. More... | |
| AccessResult | CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl) |
| Checks access to an overloaded member operator, including conversion operators. More... | |
| AccessResult | CheckAddressOfMemberAccess (Expr *OvlExpr, DeclAccessPair FoundDecl) |
| AccessResult | CheckBaseClassAccess (SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false) |
| Checks access for a hierarchy conversion. More... | |
| void | CheckLookupAccess (const LookupResult &R) |
| Checks access to all the declarations in the given result set. More... | |
| bool | IsSimplyAccessible (NamedDecl *decl, DeclContext *Ctx) |
| Checks access to Decl from the given class. More... | |
| bool | isSpecialMemberAccessibleForDeletion (CXXMethodDecl *decl, AccessSpecifier access, QualType objectType) |
| Is the given special member function accessible for the purposes of deciding whether to define a special member function as deleted? More... | |
| void | HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs) |
| void | PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs) |
| void | HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx) |
| bool | isAbstractType (SourceLocation Loc, QualType T) |
| bool | RequireNonAbstractType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) |
| template<typename... Ts> | |
| bool | RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args) |
| void | DiagnoseAbstractType (const CXXRecordDecl *RD) |
| bool | CheckOverloadedOperatorDeclaration (FunctionDecl *FnDecl) |
| CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is well-formed. More... | |
| bool | CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl) |
| CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed. More... | |
| void | FilterAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true) |
| bool | hasAnyAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true) |
| void | LookupTemplateName (LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization) |
| TemplateNameKind | isTemplateName (Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization) |
| bool | DiagnoseUnknownTemplateName (const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind) |
| void | DiagnoseTemplateParameterShadow (SourceLocation Loc, Decl *PrevDecl) |
| DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc. More... | |
| TemplateDecl * | AdjustDeclIfTemplate (Decl *&Decl) |
| AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration. More... | |
| Decl * | ActOnTypeParameter (Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg) |
| ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed. More... | |
| QualType | CheckNonTypeTemplateParameterType (QualType T, SourceLocation Loc) |
| Check that the type of a non-type template parameter is well-formed. More... | |
| Decl * | ActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg) |
| Decl * | ActOnTemplateTemplateParameter (Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg) |
| ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g. More... | |
| TemplateParameterList * | ActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< Decl * > Params, SourceLocation RAngleLoc) |
| ActOnTemplateParameterList - Builds a TemplateParameterList that contains the template parameters in Params/NumParams. More... | |
| bool | CheckTemplateParameterList (TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC) |
| Checks the validity of a template parameter list, possibly considering the template parameter list from a previous declaration. More... | |
| TemplateParameterList * | MatchTemplateParametersToScopeSpecifier (SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsExplicitSpecialization, bool &Invalid) |
| Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name. More... | |
| DeclResult | CheckClassTemplate (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr) |
| void | translateTemplateArguments (const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out) |
| Translates template arguments as provided by the parser into template arguments used by semantic analysis. More... | |
| void | NoteAllFoundTemplates (TemplateName Name) |
| QualType | CheckTemplateIdType (TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) |
| TypeResult | ActOnTemplateIdType (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false) |
| TypeResult | ActOnTagTemplateIdType (TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) |
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply<U>. More... | |
| DeclResult | ActOnVarTemplateSpecialization (Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) |
| DeclResult | CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs) |
| ExprResult | CheckVarTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, VarTemplateDecl *Template, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs) |
| ExprResult | BuildTemplateIdExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs) |
| ExprResult | BuildQualifiedTemplateIdExpr (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) |
| TemplateNameKind | ActOnDependentTemplateName (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template) |
| Form a dependent template name. More... | |
| DeclResult | ActOnClassTemplateSpecialization (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, TemplateIdAnnotation &TemplateId, AttributeList *Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr) |
| Decl * | ActOnTemplateDeclarator (Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D) |
| bool | CheckSpecializationInstantiationRedecl (SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew) |
| Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect. More... | |
| bool | CheckDependentFunctionTemplateSpecialization (FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous) |
| Perform semantic analysis for the given dependent function template specialization. More... | |
| bool | CheckFunctionTemplateSpecialization (FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous) |
| Perform semantic analysis for the given function template specialization. More... | |
| bool | CheckMemberSpecialization (NamedDecl *Member, LookupResult &Previous) |
| Perform semantic analysis for the given non-template member specialization. More... | |
| DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, AttributeList *Attr) |
| DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr) |
| DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) |
| TemplateArgumentLoc | SubstDefaultTemplateArgumentIfAvailable (TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg) |
| If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument. More... | |
| bool | CheckTemplateArgument (NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified) |
| Check that the given template argument corresponds to the given template parameter. More... | |
| bool | CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted) |
| Check that the given template arguments can be be provided to the given template, converting the arguments along the way. More... | |
| bool | CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted) |
| bool | CheckTemplateArgument (TemplateTypeParmDecl *Param, TypeSourceInfo *Arg) |
| Check a template argument against its corresponding template type parameter. More... | |
| ExprResult | CheckTemplateArgument (NonTypeTemplateParmDecl *Param, QualType InstantiatedParamType, Expr *Arg, TemplateArgument &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified) |
| Check a template argument against its corresponding non-type template parameter. More... | |
| bool | CheckTemplateArgument (TemplateTemplateParmDecl *Param, TemplateArgumentLoc &Arg, unsigned ArgumentPackIndex) |
| Check a template argument against its corresponding template template parameter. More... | |
| ExprResult | BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc) |
| Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration. More... | |
| ExprResult | BuildExpressionFromIntegralTemplateArgument (const TemplateArgument &Arg, SourceLocation Loc) |
| Construct a new expression that refers to the given integral template argument with the given source-location information. More... | |
| bool | TemplateParameterListsAreEqual (TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation()) |
| Determine whether the given template parameter lists are equivalent. More... | |
| bool | CheckTemplateDeclScope (Scope *S, TemplateParameterList *TemplateParams) |
| Check whether a template can be declared within this scope. More... | |
| TypeResult | ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc) |
| Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type". More... | |
| TypeResult | ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateLoc, TemplateTy TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc) |
| Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>". More... | |
| QualType | CheckTypenameType (ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc) |
| Build the type that describes a C++ typename specifier, e.g., "typename T::type". More... | |
| TypeSourceInfo * | RebuildTypeInCurrentInstantiation (TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name) |
| Rebuilds a type within the context of the current instantiation. More... | |
| bool | RebuildNestedNameSpecifierInCurrentInstantiation (CXXScopeSpec &SS) |
| ExprResult | RebuildExprInCurrentInstantiation (Expr *E) |
| bool | RebuildTemplateParamsInCurrentInstantiation (TemplateParameterList *Params) |
| Rebuild the template parameters now that we know we're in a current instantiation. More... | |
| std::string | getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgumentList &Args) |
| Produces a formatted string that describes the binding of template parameters to template arguments. More... | |
| std::string | getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgument *Args, unsigned NumArgs) |
| bool | isUnexpandedParameterPackPermitted () |
| Determine whether an unexpanded parameter pack might be permitted in this location. More... | |
| bool | DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded) |
| Diagnose unexpanded parameter packs. More... | |
| bool | DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC) |
| If the given type contains an unexpanded parameter pack, diagnose the error. More... | |
| bool | DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression) |
| If the given expression contains an unexpanded parameter pack, diagnose the error. More... | |
| bool | DiagnoseUnexpandedParameterPack (const CXXScopeSpec &SS, UnexpandedParameterPackContext UPPC) |
| If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error. More... | |
| bool | DiagnoseUnexpandedParameterPack (const DeclarationNameInfo &NameInfo, UnexpandedParameterPackContext UPPC) |
| If the given name contains an unexpanded parameter pack, diagnose the error. More... | |
| bool | DiagnoseUnexpandedParameterPack (SourceLocation Loc, TemplateName Template, UnexpandedParameterPackContext UPPC) |
| If the given template name contains an unexpanded parameter pack, diagnose the error. More... | |
| bool | DiagnoseUnexpandedParameterPack (TemplateArgumentLoc Arg, UnexpandedParameterPackContext UPPC) |
| If the given template argument contains an unexpanded parameter pack, diagnose the error. More... | |
| void | collectUnexpandedParameterPacks (TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given template argument. More... | |
| void | collectUnexpandedParameterPacks (TemplateArgumentLoc Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given template argument. More... | |
| void | collectUnexpandedParameterPacks (QualType T, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given type. More... | |
| void | collectUnexpandedParameterPacks (TypeLoc TL, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given type. More... | |
| void | collectUnexpandedParameterPacks (CXXScopeSpec &SS, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given nested-name-specifier. More... | |
| void | collectUnexpandedParameterPacks (const DeclarationNameInfo &NameInfo, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given name. More... | |
| ParsedTemplateArgument | ActOnPackExpansion (const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc) |
| Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion. More... | |
| TypeResult | ActOnPackExpansion (ParsedType Type, SourceLocation EllipsisLoc) |
| Invoked when parsing a type followed by an ellipsis, which creates a pack expansion. More... | |
| TypeSourceInfo * | CheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions) |
| Construct a pack expansion type from the pattern of the pack expansion. More... | |
| QualType | CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions) |
| Construct a pack expansion type from the pattern of the pack expansion. More... | |
| ExprResult | ActOnPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc) |
| Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion. More... | |
| ExprResult | CheckPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions) |
| Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion. More... | |
| bool | CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions) |
| Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern. More... | |
| Optional< unsigned > | getNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Determine the number of arguments in the given pack expansion type. More... | |
| bool | containsUnexpandedParameterPacks (Declarator &D) |
| Determine whether the given declarator contains any unexpanded parameter packs. More... | |
| TemplateArgumentLoc | getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const |
| Returns the pattern of the pack expansion for a template argument. More... | |
| QualType | adjustCCAndNoReturn (QualType ArgFunctionType, QualType FunctionType) |
| TemplateDeductionResult | DeduceTemplateArguments (ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info) |
| Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match]. More... | |
| TemplateDeductionResult | DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info) |
| Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match]. More... | |
| TemplateDeductionResult | SubstituteExplicitTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info) |
| Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit]. More... | |
| TemplateDeductionResult | FinishTemplateArgumentDeduction (FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false) |
| Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization. More... | |
| TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool PartialOverloading=false) |
| Perform template argument deduction from a function call (C++ [temp.deduct.call]). More... | |
| TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false) |
| Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template. More... | |
| TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info) |
| Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization. More... | |
| TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false) |
| Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3). More... | |
| QualType | SubstAutoType (QualType TypeWithAuto, QualType Replacement) |
Substitute Replacement for auto in TypeWithAuto. More... | |
| TypeSourceInfo * | SubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement) |
| Substitute Replacement for auto in TypeWithAuto. More... | |
| DeduceAutoResult | DeduceAutoType (TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result) |
| DeduceAutoResult | DeduceAutoType (TypeLoc AutoTypeLoc, Expr *&Initializer, QualType &Result) |
| Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6) More... | |
| void | DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init) |
| bool | DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true) |
| QualType | deduceVarTypeFromInitializer (VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) |
| TypeLoc | getReturnTypeLoc (FunctionDecl *FD) const |
| bool | DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT) |
| Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6. More... | |
| FunctionTemplateDecl * | getMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2) |
| Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]). More... | |
| UnresolvedSetIterator | getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType()) |
| Retrieve the most specialized of the given function template specializations. More... | |
| ClassTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc) |
| Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]). More... | |
| VarTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (VarTemplatePartialSpecializationDecl *PS1, VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc) |
| TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type. More... | |
| void | MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used) |
| Mark which template parameters can be deduced from a given template argument list. More... | |
| void | MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced) |
| MultiLevelTemplateArgumentList | getTemplateInstantiationArgs (NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr) |
| Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration. More... | |
| llvm::DenseSet< Module * > & | getLookupModules () |
| Get the set of additional modules that should be checked during name lookup. More... | |
| void | PrintInstantiationStack () |
| Prints the current instantiation stack through a series of notes. More... | |
| Optional < sema::TemplateDeductionInfo * > | isSFINAEContext () const |
| Determines whether we are currently in a context where template argument substitution failures are not considered errors. More... | |
| bool | isUnevaluatedContext () const |
| Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5. More... | |
| void | PerformPendingInstantiations (bool LocalOnly=false) |
| Performs template instantiation for all implicit template instantiations we have seen until this point. More... | |
| TypeSourceInfo * | SubstType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity) |
| Perform substitution on the type T with a given set of template arguments. More... | |
| QualType | SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity) |
| Deprecated form of the above. More... | |
| TypeSourceInfo * | SubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity) |
| TypeSourceInfo * | SubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, unsigned ThisTypeQuals) |
| A form of SubstType intended specifically for instantiating the type of a FunctionDecl. More... | |
| void | SubstExceptionSpec (FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args) |
| ParmVarDecl * | SubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack) |
| bool | SubstParmTypes (SourceLocation Loc, ParmVarDecl **Params, unsigned NumParams, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams=nullptr) |
| Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution. More... | |
| ExprResult | SubstExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs) |
| bool | SubstExprs (ArrayRef< Expr * > Exprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs) |
| Substitute the given template arguments into a list of expressions, expanding pack expansions if required. More... | |
| StmtResult | SubstStmt (Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Decl * | SubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs) |
| ExprResult | SubstInitializer (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit) |
| bool | SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Perform substitution on the base class specifiers of the given class template specialization. More... | |
| bool | InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true) |
| Instantiate the definition of a class from a given pattern. More... | |
| bool | InstantiateEnum (SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK) |
| Instantiate the definition of an enum from a given pattern. More... | |
| bool | InstantiateInClassInitializer (SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Instantiate the definition of a field from the given pattern. More... | |
| void | InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr) |
| bool | InstantiateClassTemplateSpecialization (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true) |
| void | InstantiateClassMembers (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK) |
| Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template. More... | |
| void | InstantiateClassTemplateSpecializationMembers (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK) |
| Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation. More... | |
| NestedNameSpecifierLoc | SubstNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs) |
| DeclarationNameInfo | SubstDeclarationNameInfo (const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Do template substitution on declaration name info. More... | |
| TemplateName | SubstTemplateName (NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs) |
| bool | Subst (const TemplateArgumentLoc *Args, unsigned NumArgs, TemplateArgumentListInfo &Result, const MultiLevelTemplateArgumentList &TemplateArgs) |
| void | InstantiateExceptionSpec (SourceLocation PointOfInstantiation, FunctionDecl *Function) |
| void | InstantiateFunctionDefinition (SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false) |
| Instantiate the definition of the given function from its template. More... | |
| VarTemplateSpecializationDecl * | BuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, void *InsertPos, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr) |
| VarTemplateSpecializationDecl * | CompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Instantiates a variable template specialization by completing it with appropriate type information and initializer. More... | |
| void | BuildVariableInstantiation (VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false) |
| BuildVariableInstantiation - Used after a new variable has been created. More... | |
| void | InstantiateVariableInitializer (VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Instantiate the initializer of a variable. More... | |
| void | InstantiateVariableDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false) |
| void | InstantiateStaticDataMemberDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false) |
| Instantiate the definition of the given variable from its template. More... | |
| void | InstantiateMemInitializers (CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs) |
| NamedDecl * | FindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Find the instantiation of the given declaration within the current instantiation. More... | |
| DeclContext * | FindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Finds the instantiation of the given declaration context within the current instantiation. More... | |
| ObjCContainerKind | getObjCContainerKind () const |
| DeclResult | actOnObjCTypeParam (Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound) |
| ObjCTypeParamList * | actOnObjCTypeParamList (Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc) |
| void | popObjCTypeParamList (Scope *S, ObjCTypeParamList *typeParamList) |
| Decl * | ActOnStartClassInterface (Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList) |
| void | ActOnSuperClassOfClassInterface (Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange) |
| void | ActOnTypedefedProtocols (SmallVectorImpl< Decl * > &ProtocolRefs, IdentifierInfo *SuperName, SourceLocation SuperLoc) |
| ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols. More... | |
| Decl * | ActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation) |
| ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration. More... | |
| bool | CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList) |
| Decl * | ActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList) |
| Decl * | ActOnStartCategoryInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc) |
| Decl * | ActOnStartClassImplementation (SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc) |
| Decl * | ActOnStartCategoryImplementation (SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc) |
| ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object. More... | |
| DeclGroupPtrTy | ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls) |
| DeclGroupPtrTy | ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts) |
| DeclGroupPtrTy | ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, AttributeList *attrList) |
| ActOnForwardProtocolDeclaration - Handle @protocol foo;. More... | |
| void | FindProtocolDeclaration (bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl * > &Protocols) |
| FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared. More... | |
| void | actOnObjCTypeArgsOrProtocolQualifiers (Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) |
| Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate. More... | |
| TypeResult | actOnObjCProtocolQualifierType (SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc) |
| Build a an Objective-C protocol-qualified 'id' type where no base type was specified. More... | |
| TypeResult | actOnObjCTypeArgsAndProtocolQualifiers (Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc) |
| Build a specialized and/or protocol-qualified Objective-C type. More... | |
| QualType | BuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false) |
| Build an Objective-C object pointer type. More... | |
| bool | checkObjCKindOfType (QualType &type, SourceLocation loc) |
| Check the application of the Objective-C '__kindof' qualifier to the given type. More... | |
| void | CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) |
| Ensure attributes are consistent with type. More... | |
| void | ProcessPropertyDecl (ObjCPropertyDecl *property) |
| Process the specified property declaration and create decls for the setters and getters as needed. More... | |
| void | DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty) |
| DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies. More... | |
| void | DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID) |
| DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension. More... | |
| Decl * | ActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None) |
| Decl * | ActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr) |
| Decl * | ActOnPropertyImplDecl (Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc) |
| ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic. More... | |
| Decl * | ActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition) |
| bool | CheckARCMethodDecl (ObjCMethodDecl *method) |
| Check a method declaration for compatibility with the Objective-C ARC conventions. More... | |
| bool | inferObjCARCLifetime (ValueDecl *decl) |
| bool | ConversionToObjCStringLiteralCheck (QualType DstType, Expr *&SrcExpr, bool Diagnose=true) |
| bool | checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall) |
| Check whether the given method, which must be in the 'init' family, is a valid member of that family. More... | |
| void | CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) |
| Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited. More... | |
| void | CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC) |
| void | ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) |
| ActOnPragmaOptionsAlign - Called on well formed #pragma options align. More... | |
| void | ActOnPragmaPack (PragmaPackKind Kind, IdentifierInfo *Name, Expr *Alignment, SourceLocation PragmaLoc, SourceLocation LParenLoc, SourceLocation RParenLoc) |
| ActOnPragmaPack - Called on well formed #pragma pack(...). More... | |
| void | ActOnPragmaMSStruct (PragmaMSStructKind Kind) |
| ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off]. More... | |
| void | ActOnPragmaMSComment (PragmaMSCommentKind Kind, StringRef Arg) |
| ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg"). More... | |
| void | ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc) |
| ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]). More... | |
| void | ActOnPragmaMSVtorDisp (PragmaVtorDispKind Kind, SourceLocation PragmaLoc, MSVtorDispAttr::Mode Value) |
| Called on well formed #pragma vtordisp(). More... | |
| bool | UnifySection (StringRef SectionName, int SectionFlags, DeclaratorDecl *TheDecl) |
| bool | UnifySection (StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation) |
| void | ActOnPragmaMSSeg (SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName) |
| Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg. More... | |
| void | ActOnPragmaMSSection (SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName) |
| Called on well formed #pragma section(). More... | |
| void | ActOnPragmaMSInitSeg (SourceLocation PragmaLocation, StringLiteral *SegmentName) |
| Called on well-formed #pragma init_seg(). More... | |
| void | ActOnPragmaDump (Scope *S, SourceLocation Loc, IdentifierInfo *II) |
| Called on #pragma clang __debug dump II. More... | |
| void | ActOnPragmaDetectMismatch (StringRef Name, StringRef Value) |
| ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch. More... | |
| void | ActOnPragmaUnused (const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc) |
| ActOnPragmaUnused - Called on well-formed '#pragma unused'. More... | |
| void | ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc) |
| ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... . More... | |
| NamedDecl * | DeclClonePragmaWeak (NamedDecl *ND, IdentifierInfo *II, SourceLocation Loc) |
| DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition decl and source may not have one. More... | |
| void | DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, WeakInfo &W) |
| DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias. More... | |
| void | ActOnPragmaWeakID (IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc) |
| ActOnPragmaWeakID - Called on well formed #pragma weak ident. More... | |
| void | ActOnPragmaRedefineExtname (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc) |
| ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname. More... | |
| void | ActOnPragmaWeakAlias (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc) |
| ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident. More... | |
| void | ActOnPragmaFPContract (tok::OnOffSwitch OOS) |
| ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT. More... | |
| void | AddAlignmentAttributesForRecord (RecordDecl *RD) |
| AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'. More... | |
| void | AddMsStructLayoutForRecord (RecordDecl *RD) |
| AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record. More... | |
| void | FreePackedContext () |
| FreePackedContext - Deallocate and null out PackContext. More... | |
| void | PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc) |
| PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute. More... | |
| void | AddPushedVisibilityAttribute (Decl *RD) |
| AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute. More... | |
| void | PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc) |
| PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces. More... | |
| void | FreeVisContext () |
| FreeVisContext - Deallocate and null out VisContext. More... | |
| void | AddCFAuditedAttribute (Decl *D) |
| AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute. More... | |
| void | ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc) |
| Called on well formed #pragma clang optimize. More... | |
| SourceLocation | getOptimizeOffPragmaLocation () const |
| Get the location for the currently active "\#pragma clang optimize
off". If this location is invalid, then the state of the pragma is "on". More... | |
| void | AddRangeBasedOptnone (FunctionDecl *FD) |
| Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone. More... | |
| void | AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc) |
| Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma). More... | |
| void | AddAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion) |
| AddAlignedAttr - Adds an aligned attribute to a particular declaration. More... | |
| void | AddAlignedAttr (SourceRange AttrRange, Decl *D, TypeSourceInfo *T, unsigned SpellingListIndex, bool IsPackExpansion) |
| void | AddAssumeAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, Expr *OE, unsigned SpellingListIndex) |
| AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration. More... | |
| void | AddAlignValueAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex) |
| AddAlignValueAttr - Adds an align_value attribute to a particular declaration. More... | |
| void | AddLaunchBoundsAttr (SourceRange AttrRange, Decl *D, Expr *MaxThreads, Expr *MinBlocks, unsigned SpellingListIndex) |
| AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration. More... | |
| ExprResult | ActOnCoawaitExpr (Scope *S, SourceLocation KwLoc, Expr *E) |
| ExprResult | ActOnCoyieldExpr (Scope *S, SourceLocation KwLoc, Expr *E) |
| StmtResult | ActOnCoreturnStmt (SourceLocation KwLoc, Expr *E) |
| ExprResult | BuildCoawaitExpr (SourceLocation KwLoc, Expr *E) |
| ExprResult | BuildCoyieldExpr (SourceLocation KwLoc, Expr *E) |
| StmtResult | BuildCoreturnStmt (SourceLocation KwLoc, Expr *E) |
| void | CheckCompletedCoroutineBody (FunctionDecl *FD, Stmt *&Body) |
| bool | IsOpenMPCapturedByRef (VarDecl *VD, const sema::CapturedRegionScopeInfo *RSI) |
| Return true if the provided declaration VD should be captured by reference in the provided scope RSI. More... | |
| bool | IsOpenMPCapturedVar (VarDecl *VD) |
| Check if the specified variable is used in one of the private clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP constructs. More... | |
| bool | isOpenMPPrivateVar (VarDecl *VD, unsigned Level) |
| Check if the specified variable is used in 'private' clause. More... | |
| bool | isOpenMPTargetCapturedVar (VarDecl *VD, unsigned Level) |
| Check if the specified variable is captured by 'target' directive. More... | |
| ExprResult | PerformOpenMPImplicitIntegerConversion (SourceLocation OpLoc, Expr *Op) |
| void | StartOpenMPDSABlock (OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc) |
| Called on start of new data sharing attribute block. More... | |
| void | StartOpenMPClause (OpenMPClauseKind K) |
| Start analysis of clauses. More... | |
| void | EndOpenMPClause () |
| End analysis of clauses. More... | |
| void | EndOpenMPDSABlock (Stmt *CurDirective) |
| Called on end of data sharing attribute block. More... | |
| void | ActOnOpenMPLoopInitialization (SourceLocation ForLoc, Stmt *Init) |
Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in Init for loop initialization, as private by default. More... | |
| ExprResult | ActOnOpenMPIdExpression (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) |
| Called on correct id-expression from the '#pragma omp threadprivate'. More... | |
| DeclGroupPtrTy | ActOnOpenMPThreadprivateDirective (SourceLocation Loc, ArrayRef< Expr * > VarList) |
| Called on well-formed '#pragma omp threadprivate'. More... | |
| OMPThreadPrivateDecl * | CheckOMPThreadPrivateDecl (SourceLocation Loc, ArrayRef< Expr * > VarList) |
| Builds a new OpenMPThreadPrivateDecl and checks its correctness. More... | |
| void | ActOnOpenMPRegionStart (OpenMPDirectiveKind DKind, Scope *CurScope) |
| Initialization of captured region for OpenMP region. More... | |
| StmtResult | ActOnOpenMPRegionEnd (StmtResult S, ArrayRef< OMPClause * > Clauses) |
| End of OpenMP region. More... | |
| StmtResult | ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| StmtResult | ActOnOpenMPParallelDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp parallel' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp simd' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp for' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp for simd' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp sections' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPSectionDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp section' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPSingleDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp single' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPMasterDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp master' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPCriticalDirective (const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp critical' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPParallelForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp parallel for' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPParallelForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPParallelSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTaskDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp task' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTaskyieldDirective (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp taskyield'. More... | |
| StmtResult | ActOnOpenMPBarrierDirective (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp barrier'. More... | |
| StmtResult | ActOnOpenMPTaskwaitDirective (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp taskwait'. More... | |
| StmtResult | ActOnOpenMPTaskgroupDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp taskgroup'. More... | |
| StmtResult | ActOnOpenMPFlushDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp flush'. More... | |
| StmtResult | ActOnOpenMPOrderedDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp ordered' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPAtomicDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp atomic' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTargetDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp target' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTargetDataDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp target data' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTeamsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed '#pragma omp teams' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPCancellationPointDirective (SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion) |
| Called on well-formed '#pragma omp cancellation point'. More... | |
| StmtResult | ActOnOpenMPCancelDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion) |
| Called on well-formed '#pragma omp cancel'. More... | |
| StmtResult | ActOnOpenMPTaskLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp taskloop' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPTaskLoopSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement. More... | |
| StmtResult | ActOnOpenMPDistributeDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA) |
| Called on well-formed '#pragma omp distribute' after parsing of the associated statement. More... | |
| OMPClause * | ActOnOpenMPSingleExprClause (OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| OMPClause * | ActOnOpenMPIfClause (OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc) |
| Called on well-formed 'if' clause. More... | |
| OMPClause * | ActOnOpenMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'final' clause. More... | |
| OMPClause * | ActOnOpenMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'num_threads' clause. More... | |
| OMPClause * | ActOnOpenMPSafelenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'safelen' clause. More... | |
| OMPClause * | ActOnOpenMPSimdlenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'simdlen' clause. More... | |
| OMPClause * | ActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'collapse' clause. More... | |
| OMPClause * | ActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr) |
| Called on well-formed 'ordered' clause. More... | |
| OMPClause * | ActOnOpenMPGrainsizeClause (Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'grainsize' clause. More... | |
| OMPClause * | ActOnOpenMPNumTasksClause (Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'num_tasks' clause. More... | |
| OMPClause * | ActOnOpenMPHintClause (Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'hint' clause. More... | |
| OMPClause * | ActOnOpenMPSimpleClause (OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| OMPClause * | ActOnOpenMPDefaultClause (OpenMPDefaultClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'default' clause. More... | |
| OMPClause * | ActOnOpenMPProcBindClause (OpenMPProcBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'proc_bind' clause. More... | |
| OMPClause * | ActOnOpenMPSingleExprWithArgClause (OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc) |
| OMPClause * | ActOnOpenMPScheduleClause (OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc) |
| Called on well-formed 'schedule' clause. More... | |
| OMPClause * | ActOnOpenMPClause (OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc) |
| OMPClause * | ActOnOpenMPNowaitClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'nowait' clause. More... | |
| OMPClause * | ActOnOpenMPUntiedClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'untied' clause. More... | |
| OMPClause * | ActOnOpenMPMergeableClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'mergeable' clause. More... | |
| OMPClause * | ActOnOpenMPReadClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'read' clause. More... | |
| OMPClause * | ActOnOpenMPWriteClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'write' clause. More... | |
| OMPClause * | ActOnOpenMPUpdateClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'update' clause. More... | |
| OMPClause * | ActOnOpenMPCaptureClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'capture' clause. More... | |
| OMPClause * | ActOnOpenMPSeqCstClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'seq_cst' clause. More... | |
| OMPClause * | ActOnOpenMPThreadsClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'threads' clause. More... | |
| OMPClause * | ActOnOpenMPSIMDClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'simd' clause. More... | |
| OMPClause * | ActOnOpenMPNogroupClause (SourceLocation StartLoc, SourceLocation EndLoc) |
| Called on well-formed 'nogroup' clause. More... | |
| OMPClause * | ActOnOpenMPVarListClause (OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *TailExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, OpenMPDependClauseKind DepKind, OpenMPLinearClauseKind LinKind, OpenMPMapClauseKind MapTypeModifier, OpenMPMapClauseKind MapType, SourceLocation DepLinMapLoc) |
| OMPClause * | ActOnOpenMPPrivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'private' clause. More... | |
| OMPClause * | ActOnOpenMPFirstprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'firstprivate' clause. More... | |
| OMPClause * | ActOnOpenMPLastprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'lastprivate' clause. More... | |
| OMPClause * | ActOnOpenMPSharedClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'shared' clause. More... | |
| OMPClause * | ActOnOpenMPReductionClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId) |
| Called on well-formed 'reduction' clause. More... | |
| OMPClause * | ActOnOpenMPLinearClause (ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc) |
| Called on well-formed 'linear' clause. More... | |
| OMPClause * | ActOnOpenMPAlignedClause (ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc) |
| Called on well-formed 'aligned' clause. More... | |
| OMPClause * | ActOnOpenMPCopyinClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'copyin' clause. More... | |
| OMPClause * | ActOnOpenMPCopyprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'copyprivate' clause. More... | |
| OMPClause * | ActOnOpenMPFlushClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'flush' pseudo clause. More... | |
| OMPClause * | ActOnOpenMPDependClause (OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'depend' clause. More... | |
| OMPClause * | ActOnOpenMPDeviceClause (Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'device' clause. More... | |
| OMPClause * | ActOnOpenMPMapClause (OpenMPMapClauseKind MapTypeModifier, OpenMPMapClauseKind MapType, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'map' clause. More... | |
| OMPClause * | ActOnOpenMPNumTeamsClause (Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'num_teams' clause. More... | |
| OMPClause * | ActOnOpenMPThreadLimitClause (Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'thread_limit' clause. More... | |
| OMPClause * | ActOnOpenMPPriorityClause (Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) |
| Called on well-formed 'priority' clause. More... | |
| ExprResult | ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion) |
| ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast. More... | |
| ExprResult | IgnoredValueConversions (Expr *E) |
| IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required. More... | |
| ExprResult | UsualUnaryConversions (Expr *E) |
| UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3). More... | |
| ExprResult | CallExprUnaryConversions (Expr *E) |
| CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression. More... | |
| ExprResult | DefaultFunctionArrayConversion (Expr *E, bool Diagnose=true) |
| DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4). More... | |
| ExprResult | DefaultFunctionArrayLvalueConversion (Expr *E, bool Diagnose=true) |
| ExprResult | DefaultLvalueConversion (Expr *E) |
| ExprResult | DefaultArgumentPromotion (Expr *E) |
| DefaultArgumentPromotion (C99 6.5.2.2p6). More... | |
| VariadicCallType | getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn) |
| VarArgKind | isValidVarArgType (const QualType &Ty) |
| Determine the degree of POD-ness for an expression. More... | |
| void | checkVariadicArgument (const Expr *E, VariadicCallType CT) |
| Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not. More... | |
| bool | hasCStrMethod (const Expr *E) |
| Check to see if a given expression could have '.c_str()' called on it. More... | |
| bool | GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false) |
| GatherArgumentsForCall - Collector argument expressions for various form of call prototypes. More... | |
| ExprResult | DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl) |
| DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type. More... | |
| QualType | UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, bool IsCompAssign=false) |
| UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8). More... | |
| bool | DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr) |
| DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy. More... | |
| bool | IsValueInFlagEnum (const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const |
| IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum. More... | |
| void | DiagnoseAssignmentEnum (QualType DstType, QualType SrcType, Expr *SrcExpr) |
| DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values. More... | |
| AssignConvertType | CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType) |
| CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values. More... | |
| AssignConvertType | CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind, bool ConvertRHS=true) |
| Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type. More... | |
| AssignConvertType | CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true) |
| AssignConvertType | CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS) |
| bool | IsStringLiteralToNonConstPointerConversion (Expr *From, QualType ToType) |
| Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively). More... | |
| bool | CheckExceptionSpecCompatibility (Expr *From, QualType ToType) |
| ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false) |
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType. More... | |
| ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit, ImplicitConversionSequence &ICS) |
| ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, const ImplicitConversionSequence &ICS, AssignmentAction Action, CheckedConversionKind CCK=CCK_ImplicitConversion) |
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS. More... | |
| ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK) |
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS. More... | |
| QualType | InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) |
| the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued). More... | |
| QualType | CheckPointerToMemberOperands (ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect) |
| QualType | CheckMultiplyDivideOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide) |
| QualType | CheckRemainderOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false) |
| QualType | CheckAdditionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr) |
| QualType | CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr) |
| QualType | CheckShiftOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false) |
| QualType | CheckCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool isRelational) |
| QualType | CheckBitwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false) |
| QualType | CheckLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
| QualType | CheckAssignmentOperands (Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType) |
| ExprResult | checkPseudoObjectIncDec (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op) |
| Check an increment or decrement of a pseudo-object expression. More... | |
| ExprResult | checkPseudoObjectAssignment (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS) |
| ExprResult | checkPseudoObjectRValue (Expr *E) |
| Expr * | recreateSyntacticForm (PseudoObjectExpr *E) |
| Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs. More... | |
| QualType | CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) |
| Note that LHS is not null here, even if this is the gnu "x ?: y" extension. More... | |
| QualType | CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc) |
| Check the operands of ?: under C++ semantics. More... | |
| QualType | FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool *NonStandardCompositeType=nullptr) |
| Find a merged pointer type and convert the two expressions to it. More... | |
| QualType | FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool *NonStandardCompositeType=nullptr) |
| QualType | FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) |
| FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions. More... | |
| bool | DiagnoseConditionalForNull (Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc) |
| Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer. More... | |
| void | DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range) |
| Diagnose pointers that are always non-null. More... | |
| QualType | CheckVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion) |
| type checking for vector binary operators. More... | |
| QualType | GetSignedVectorType (QualType V) |
| QualType | CheckVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool isRelational) |
| CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types. More... | |
| QualType | CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) |
| bool | areLaxCompatibleVectorTypes (QualType srcType, QualType destType) |
| Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size? More... | |
| bool | isLaxVectorConversion (QualType srcType, QualType destType) |
| Is this a legal conversion between two types, one of which is known to be a vector type? More... | |
| bool | CheckForConstantInitializer (Expr *e, QualType t) |
| type checking declaration initializers (C99 6.7.8) More... | |
| ReferenceCompareResult | CompareReferenceRelationship (SourceLocation Loc, QualType T1, QualType T2, bool &DerivedToBase, bool &ObjCConversion, bool &ObjCLifetimeConversion) |
| CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are reference-related, reference-compatible, reference-compatible with added qualification, or incompatible, for use in C++ initialization by reference (C++ [dcl.ref.init]p4). More... | |
| ExprResult | checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path) |
| Check a cast of an unknown-any type. More... | |
| ExprResult | forceUnknownAnyToType (Expr *E, QualType ToType) |
| Force an expression with unknown-type to an expression of the given type. More... | |
| ExprResult | checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType ¶mType) |
| Type-check an expression that's being passed to an __unknown_anytype parameter. More... | |
| bool | CheckVectorCast (SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind) |
| ExprResult | prepareVectorSplat (QualType VectorTy, Expr *SplattedExpr) |
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary. More... | |
| ExprResult | CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind) |
| ExprResult | BuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc) |
| void | checkRetainCycles (ObjCMessageExpr *msg) |
| checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle. More... | |
| void | checkRetainCycles (Expr *receiver, Expr *argument) |
| Check a property assign to see if it's likely to cause a retain cycle. More... | |
| void | checkRetainCycles (VarDecl *Var, Expr *Init) |
| bool | checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS) |
| checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type. More... | |
| void | checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS) |
| checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression. More... | |
| ExprResult | CheckBooleanCondition (Expr *E, SourceLocation Loc) |
| CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g. More... | |
| ExprResult | ActOnBooleanCondition (Scope *S, SourceLocation Loc, Expr *SubExpr) |
| void | DiagnoseAssignmentAsCondition (Expr *E) |
| DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment. More... | |
| void | DiagnoseEqualityWithExtraParens (ParenExpr *ParenE) |
| Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition. More... | |
| ExprResult | CheckCXXBooleanCondition (Expr *CondExpr) |
| CheckCXXBooleanCondition - Returns true if conversion to bool is invalid. More... | |
| void | ConvertIntegerToTypeWarnOnOverflow (llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID) |
| ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign. More... | |
| bool | CheckObjCDeclScope (Decl *D) |
| Checks that the Objective-C declaration is declared in the global scope. More... | |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true) |
| VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics. More... | |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, bool AllowFold=true) |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr) |
| ExprResult | VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr) |
| VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid. More... | |
| CUDAFunctionTarget | IdentifyCUDATarget (const FunctionDecl *D) |
| IdentifyCUDATarget - Determine the CUDA compilation target for this function. More... | |
| CUDAFunctionPreference | IdentifyCUDAPreference (const FunctionDecl *Caller, const FunctionDecl *Callee) |
| Identifies relative preference of a given Caller/Callee combination, based on their host/device attributes. More... | |
| bool | CheckCUDATarget (const FunctionDecl *Caller, const FunctionDecl *Callee) |
| void | EraseUnwantedCUDAMatches (const FunctionDecl *Caller, SmallVectorImpl< FunctionDecl * > &Matches) |
Finds a function in Matches with highest calling priority from Caller context and erases all functions with lower calling priority. More... | |
| void | EraseUnwantedCUDAMatches (const FunctionDecl *Caller, SmallVectorImpl< DeclAccessPair > &Matches) |
| void | EraseUnwantedCUDAMatches (const FunctionDecl *Caller, SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl * >> &Matches) |
| bool | inferCUDATargetForImplicitSpecialMember (CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose) |
| Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members. More... | |
| SourceLocation | getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const |
| ExprResult | SemaBuiltinShuffleVector (CallExpr *TheCall) |
| SemaBuiltinShuffleVector - Handle __builtin_shufflevector. More... | |
| ExprResult | SemaConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc) |
| SemaConvertVectorExpr - Handle __builtin_convertvector. More... | |
| void | CheckFormatString (const StringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, bool inFunctionCall, VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs) |
| bool | FormatStringHasSArg (const StringLiteral *FExpr) |
| void | RegisterTypeTagForDatatype (const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull) |
| Register a magic integral constant to be used as a type tag. More... | |
| IdentifierInfo * | getNullabilityKeyword (NullabilityKind nullability) |
| Retrieve the keyword associated. More... | |
| IdentifierInfo * | getNSErrorIdent () |
| Retrieve the identifier "NSError". More... | |
| Scope * | getCurScope () const |
| Retrieve the parser's current scope. More... | |
| void | incrementMSManglingNumber () const |
| IdentifierInfo * | getSuperIdentifier () const |
| IdentifierInfo * | getFloat128Identifier () const |
| Decl * | getObjCDeclContext () const |
| DeclContext * | getCurLexicalContext () const |
| AvailabilityResult | getCurContextAvailability () const |
| const DeclContext * | getCurObjCLexicalContext () const |
| bool | isSelfExpr (Expr *RExpr) |
| Private Helper predicate to check for 'self'. More... | |
| bool | isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method) |
| ExprResult | BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number) |
| BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression. More... | |
| ExprResult | ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value) |
| ExprResult | BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements) |
| ExprResult | BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr) |
| BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression. More... | |
| ExprResult | BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod) |
| Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime. More... | |
| ExprResult | BuildObjCDictionaryLiteral (SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements) |
| ExprResult | BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc) |
| ExprResult | ParseObjCEncodeExpression (SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc) |
| ExprResult | ParseObjCSelectorExpression (Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) |
| ParseObjCSelectorExpression - Build selector expression for @selector. More... | |
| ExprResult | ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) |
| ParseObjCProtocolExpression - Build protocol expression for @protocol. More... | |
| ObjCMethodDecl * | LookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance) |
| LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type. More... | |
| ObjCMethodDecl * | LookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance) |
| LookupMethodInType - Look up a method in an ObjCObjectType. More... | |
| ExprResult | HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) |
| HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface. More... | |
| ExprResult | ActOnClassPropertyRefExpr (IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) |
| ObjCMethodDecl * | tryCaptureObjCSelf (SourceLocation Loc) |
| Try to capture an implicit reference to 'self'. More... | |
| ObjCMessageKind | getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) |
| ExprResult | ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
| ExprResult | BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false) |
| Build an Objective-C class message expression. More... | |
| ExprResult | BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args) |
| ExprResult | ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
| ExprResult | BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false) |
| Build an Objective-C instance message expression. More... | |
| ExprResult | BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args) |
| ExprResult | ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) |
| ExprResult | BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) |
| ExprResult | ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr) |
| void | CheckTollFreeBridgeCast (QualType castType, Expr *castExpr) |
| void | CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr) |
| bool | CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind) |
| bool | checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true) |
| bool | CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true) |
| ARCConversionResult | CheckObjCARCConversion (SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD) |
| Checks for invalid conversions and casts between retainable pointers and other pointer kinds. More... | |
| Expr * | stripARCUnbridgedCast (Expr *e) |
| stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast. More... | |
| void | diagnoseARCUnbridgedCast (Expr *e) |
| Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly. More... | |
| bool | CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType) |
| bool | CheckMessageArgumentTypes (QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) |
| CheckMessageArgumentTypes - Check types in an Obj-C message send. More... | |
| QualType | getMessageSendResultType (QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage) |
| Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send. More... | |
| void | EmitRelatedResultTypeNote (const Expr *E) |
| If the given expression involves a message send to a method with a related result type, emit a note describing what happened. More... | |
| void | EmitRelatedResultTypeNoteForReturn (QualType destType) |
| Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened. More... | |
Static Public Member Functions | |
| static QualType | GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr) |
| static int | getPrintable (int I) |
| static unsigned | getPrintable (unsigned I) |
| static bool | getPrintable (bool B) |
| static const char * | getPrintable (const char *S) |
| static StringRef | getPrintable (StringRef S) |
| static const std::string & | getPrintable (const std::string &S) |
| static const IdentifierInfo * | getPrintable (const IdentifierInfo *II) |
| static DeclarationName | getPrintable (DeclarationName N) |
| static QualType | getPrintable (QualType T) |
| static SourceRange | getPrintable (SourceRange R) |
| static SourceRange | getPrintable (SourceLocation L) |
| static SourceRange | getPrintable (const Expr *E) |
| static SourceRange | getPrintable (TypeLoc TL) |
| static bool | adjustContextForLocalExternDecl (DeclContext *&DC) |
Adjust the DeclContext for a function or variable that might be a function-local external declaration. More... | |
| static PrintingPolicy | getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP) |
| Retrieve a suitable printing policy. More... | |
| static Scope * | getScopeForDeclContext (Scope *S, DeclContext *DC) |
| Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope. More... | |
| static void | MarkDeducedTemplateParameters (ASTContext &Ctx, const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced) |
| Marks all of the template parameters that will be deduced by a call to the given function template. More... | |
| static CastKind | ScalarTypeToBooleanCastKind (QualType ScalarTy) |
| ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type. More... | |
| static FormatStringType | GetFormatStringType (const FormatAttr *Format) |
| static bool | GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx) |
| static bool | TooManyArguments (size_t NumParams, size_t NumArgs, bool PartialOverloading=false) |
| To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it. More... | |
Public Attributes | |
| OpenCLOptions | OpenCLFeatures |
| FPOptions | FPFeatures |
| const LangOptions & | LangOpts |
| Preprocessor & | PP |
| ASTContext & | Context |
| ASTConsumer & | Consumer |
| DiagnosticsEngine & | Diags |
| SourceManager & | SourceMgr |
| bool | CollectStats |
| Flag indicating whether or not to collect detailed statistics. More... | |
| CodeCompleteConsumer * | CodeCompleter |
| Code-completion consumer. More... | |
| DeclContext * | CurContext |
| CurContext - This is the current declaration context of parsing. More... | |
| DeclContext * | OriginalLexicalContext |
| Generally null except when we temporarily switch decl contexts, like in. More... | |
| DeclarationName | VAListTagName |
| VAListTagName - The declaration name corresponding to __va_list_tag. More... | |
| void * | PackContext |
| PackContext - Manages the stack for #pragma pack. More... | |
| bool | MSStructPragmaOn |
| LangOptions::PragmaMSPointersToMembersKind | MSPointerToMemberRepresentationMethod |
| Controls member pointer representation format under the MS ABI. More... | |
| SmallVector < MSVtorDispAttr::Mode, 2 > | VtorDispModeStack |
| Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. More... | |
| SmallVector< Scope *, 2 > | CurrentSEHFinally |
| Stack of active SEH __finally scopes. Can be empty. More... | |
| SourceLocation | ImplicitMSInheritanceAttrLoc |
| Source location for newly created implicit MSInheritanceAttrs. More... | |
| PragmaStack< StringLiteral * > | DataSegStack |
| PragmaStack< StringLiteral * > | BSSSegStack |
| PragmaStack< StringLiteral * > | ConstSegStack |
| PragmaStack< StringLiteral * > | CodeSegStack |
| FileNullabilityMap | NullabilityMap |
| A mapping that describes the nullability we've seen in each header file. More... | |
| StringLiteral * | CurInitSeg |
| Last section used with #pragma init_seg. More... | |
| SourceLocation | CurInitSegLoc |
| void * | VisContext |
| VisContext - Manages the stack for #pragma GCC visibility. More... | |
| SourceLocation | OptimizeOffPragmaLocation |
| This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet. More... | |
| bool | IsBuildingRecoveryCallExpr |
| Flag indicating if Sema is building a recovery call expression. More... | |
| bool | ExprNeedsCleanups |
| ExprNeedsCleanups - True if the current evaluation context requires cleanups to be run at its conclusion. More... | |
| SmallVector< BlockDecl *, 8 > | ExprCleanupObjects |
| ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression. More... | |
| llvm::SmallPtrSet< Expr *, 2 > | MaybeODRUseExprs |
| Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression. More... | |
| SmallVector < sema::FunctionScopeInfo *, 4 > | FunctionScopes |
| Stack containing information about each of the nested function, block, and method scopes that are currently active. More... | |
| ExtVectorDeclsType | ExtVectorDecls |
| ExtVectorDecls - This is a list all the extended vector types. More... | |
| std::unique_ptr < CXXFieldCollector > | FieldCollector |
| FieldCollector - Collects CXXFieldDecls during parsing of C++ classes. More... | |
| NamedDeclSetType | UnusedPrivateFields |
| Set containing all declared private fields that are not used. More... | |
| llvm::SmallSetVector< const TypedefNameDecl *, 4 > | UnusedLocalTypedefNameCandidates |
| Set containing all typedefs that are likely unused. More... | |
| llvm::MapVector< FieldDecl *, DeleteLocs > | DeleteExprs |
| std::unique_ptr< RecordDeclSetTy > | PureVirtualClassDiagSet |
| PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions. More... | |
| llvm::SmallPtrSet< const Decl *, 4 > | ParsingInitForAutoVars |
| ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer. More... | |
| TentativeDefinitionsType | TentativeDefinitions |
| All the tentative definitions encountered in the TU. More... | |
| UnusedFileScopedDeclsType | UnusedFileScopedDecls |
| The set of file scoped decls seen so far that have not been used and must warn if not used. More... | |
| DelegatingCtorDeclsType | DelegatingCtorDecls |
| All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU. More... | |
| SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > | DelayedExceptionSpecChecks |
| All the overriding functions seen during a class definition that had their exception spec checks delayed, plus the overridden function. More... | |
| SmallVector< std::pair < CXXMethodDecl *, const FunctionProtoType * >, 2 > | DelayedDefaultedMemberExceptionSpecs |
| All the members seen during a class definition which were both explicitly defaulted and had explicitly-specified exception specifications, along with the function type containing their user-specified exception specification. More... | |
| LateParsedTemplateMapT | LateParsedTemplateMap |
| LateTemplateParserCB * | LateTemplateParser |
| LateTemplateParserCleanupCB * | LateTemplateParserCleanup |
| void * | OpaqueParser |
| class clang::Sema::DelayedDiagnostics | DelayedDiagnostics |
| llvm::MapVector < IdentifierInfo *, WeakInfo > | WeakUndeclaredIdentifiers |
| WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared. More... | |
| llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > | ExtnameUndeclaredIdentifiers |
| ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared. More... | |
| SmallVector< Decl *, 2 > | WeakTopLevelDecl |
| WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls. More... | |
| IdentifierResolver | IdResolver |
| Scope * | TUScope |
| Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace. More... | |
| LazyDeclPtr | StdNamespace |
| The C++ "std" namespace, where the standard library resides. More... | |
| LazyDeclPtr | StdBadAlloc |
| The C++ "std::bad_alloc" class, which is defined by the C++ standard library. More... | |
| ClassTemplateDecl * | StdInitializerList |
| The C++ "std::initializer_list" template, which is defined in <initializer_list>. More... | |
| RecordDecl * | CXXTypeInfoDecl |
| The C++ "type_info" declaration, which is defined in <typeinfo>. More... | |
| RecordDecl * | MSVCGuidDecl |
| The MSVC "_GUID" struct, which is defined in MSVC header files. More... | |
| std::unique_ptr< NSAPI > | NSAPIObj |
| Caches identifiers/selectors for NSFoundation APIs. More... | |
| ObjCInterfaceDecl * | NSNumberDecl |
| The declaration of the Objective-C NSNumber class. More... | |
| ObjCInterfaceDecl * | NSValueDecl |
| The declaration of the Objective-C NSValue class. More... | |
| QualType | NSNumberPointer |
| Pointer to NSNumber type (NSNumber *). More... | |
| QualType | NSValuePointer |
| Pointer to NSValue type (NSValue *). More... | |
| ObjCMethodDecl * | NSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods] |
| The Objective-C NSNumber methods used to create NSNumber literals. More... | |
| ObjCInterfaceDecl * | NSStringDecl |
| The declaration of the Objective-C NSString class. More... | |
| QualType | NSStringPointer |
| Pointer to NSString type (NSString *). More... | |
| ObjCMethodDecl * | StringWithUTF8StringMethod |
| The declaration of the stringWithUTF8String: method. More... | |
| ObjCMethodDecl * | ValueWithBytesObjCTypeMethod |
| The declaration of the valueWithBytes:objCType: method. More... | |
| ObjCInterfaceDecl * | NSArrayDecl |
| The declaration of the Objective-C NSArray class. More... | |
| ObjCMethodDecl * | ArrayWithObjectsMethod |
| The declaration of the arrayWithObjects:count: method. More... | |
| ObjCInterfaceDecl * | NSDictionaryDecl |
| The declaration of the Objective-C NSDictionary class. More... | |
| ObjCMethodDecl * | DictionaryWithObjectsMethod |
| The declaration of the dictionaryWithObjects:forKeys:count: method. More... | |
| QualType | QIDNSCopying |
| id<NSCopying> type. More... | |
| Selector | RespondsToSelectorSel |
| will hold 'respondsToSelector:' More... | |
| unsigned | MSAsmLabelNameCounter |
| counter for internal MS Asm label names. More... | |
| bool | GlobalNewDeleteDeclared |
| A flag to remember whether the implicit forms of operator new and delete have been declared. More... | |
| bool | AllowAbstractFieldReference |
| A flag to indicate that we're in a context that permits abstract references to fields. More... | |
| SmallVector < ExpressionEvaluationContextRecord, 8 > | ExprEvalContexts |
| A stack of expression evaluation contexts. More... | |
| llvm::FoldingSet < SpecialMemberOverloadResult > | SpecialMemberCache |
| A cache of special member function overload resolution results for C++ records. More... | |
| llvm::DenseMap< const EnumDecl *, llvm::APInt > | FlagBitsCache |
| A cache of the flags available in enumerations with the flag_bits attribute. More... | |
| TranslationUnitKind | TUKind |
| The kind of translation unit we are processing. More... | |
| llvm::BumpPtrAllocator | BumpAlloc |
| unsigned | NumSFINAEErrors |
| The number of SFINAE diagnostics that have been trapped. More... | |
| UnparsedDefaultArgInstantiationsMap | UnparsedDefaultArgInstantiations |
| A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter. More... | |
| llvm::DenseMap< ParmVarDecl *, SourceLocation > | UnparsedDefaultArgLocs |
| llvm::DenseMap< NamedDecl *, SourceLocation > | UndefinedButUsed |
| UndefinedInternals - all the used, undefined objects which require a definition in this translation unit. More... | |
| GlobalMethodPool | MethodPool |
| Method Pool - allows efficient lookup when typechecking messages to "id". More... | |
| llvm::MapVector< Selector, SourceLocation > | ReferencedSelectors |
| Method selectors used in a @selector expression. More... | |
| llvm::SmallSet < SpecialMemberDecl, 4 > | SpecialMembersBeingDeclared |
| The C++ special members which we are currently in the process of declaring. More... | |
| std::vector< NamedDecl * > | DeclsInPrototypeScope |
| List of decls defined in a function prototype. More... | |
| QualType | CXXThisTypeOverride |
| When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function. More... | |
| SmallVector< VTableUse, 16 > | VTableUses |
| The list of vtables that are required but have not yet been materialized. More... | |
| llvm::DenseMap< CXXRecordDecl *, bool > | VTablesUsed |
| The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation). More... | |
| bool | AccessCheckingSFINAE |
| When true, access checking violations are treated as SFINAE failures rather than hard errors. More... | |
| SmallVector < ActiveTemplateInstantiation, 16 > | ActiveTemplateInstantiations |
| List of active template instantiations. More... | |
| SmallVector< Module *, 16 > | ActiveTemplateInstantiationLookupModules |
| Extra modules inspected when performing a lookup during a template instantiation. More... | |
| llvm::DenseSet< Module * > | LookupModulesCache |
| Cache of additional modules that should be used for name lookup within the current template instantiation. More... | |
| bool | InNonInstantiationSFINAEContext |
| Whether we are in a SFINAE context that is not associated with template instantiation. More... | |
| unsigned | NonInstantiationEntries |
The number of ActiveTemplateInstantiation entries in ActiveTemplateInstantiations that are not actual instantiations and, therefore, should not be counted as part of the instantiation depth. More... | |
| ActiveTemplateInstantiation | LastTemplateInstantiationErrorContext |
| The last template from which a template instantiation error or warning was produced. More... | |
| int | ArgumentPackSubstitutionIndex |
| The current index into pack expansion arguments that will be used for substitution of parameter packs. More... | |
| SuppressedDiagnosticsMap | SuppressedDiagnostics |
| LocalInstantiationScope * | CurrentInstantiationScope |
| The current instantiation scope used to store local variables. More... | |
| bool | DisableTypoCorrection |
| Tracks whether we are in a context where typo correction is disabled. More... | |
| unsigned | TyposCorrected |
| The number of typos corrected by CorrectTypo. More... | |
| IdentifierSourceLocations | TypoCorrectionFailures |
| A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it. More... | |
| sema::AnalysisBasedWarnings | AnalysisWarnings |
| Worker object for performing CFG-based warnings. More... | |
| threadSafety::BeforeSet * | ThreadSafetyDeclCache |
| std::deque < PendingImplicitInstantiation > | PendingInstantiations |
| The queue of implicit template instantiations that are required but have not yet been performed. More... | |
| std::deque < PendingImplicitInstantiation > | PendingLocalImplicitInstantiations |
| The queue of implicit template instantiations that are required and must be performed within the current local scope. More... | |
| RecordDecl * | CFError = nullptr |
| The struct behind the CFErrorRef pointer. More... | |
| SmallVector< CXXRecordDecl *, 4 > | DelayedDllExportClasses |
Friends | |
| class | ArgumentPackSubstitutionRAII |
| class | Parser |
| class | InitializationSequence |
| class | ASTReader |
| class | ASTDeclReader |
| class | ASTWriter |
Name lookup | |
These routines provide name lookup that is used during semantic analysis to resolve the various kinds of names (identifiers, overloaded operator names, constructor names, etc.) into zero or more declarations within a particular scope. The major entry points are LookupName, which performs unqualified name lookup, and LookupQualifiedName, which performs qualified name lookup. All name lookup is performed based on some specific criteria, which specify what names will be visible to name lookup and how far name lookup should work. These criteria are important both for capturing language semantics (certain lookups will ignore certain names, for example) and for performance, since name lookup is often a bottleneck in the compilation of C++. Name lookup criteria is specified via the LookupCriteria enumeration. The results of name lookup can vary based on the kind of name lookup performed, the current language, and the translation unit. In C, for example, name lookup will either return nothing (no entity found) or a single declaration. In C++, name lookup can additionally refer to a set of overloaded functions or result in an ambiguity. All of the possible results of name lookup are captured by the LookupResult class, which provides the ability to distinguish among them. | |
| enum | LookupNameKind { LookupOrdinaryName = 0, LookupTagName, LookupLabel, LookupMemberName, LookupOperatorName, LookupNestedNameSpecifierName, LookupNamespaceName, LookupUsingDeclName, LookupRedeclarationWithLinkage, LookupLocalFriendName, LookupObjCProtocolName, LookupObjCImplicitSelfParam, LookupAnyName } |
| Describes the kind of name lookup to perform. More... | |
| enum | RedeclarationKind { NotForRedeclaration = 0, ForRedeclaration } |
| Specifies whether (or how) name lookup is being performed for a redeclaration (vs. More... | |
| enum | LiteralOperatorLookupResult { LOLR_Error, LOLR_Cooked, LOLR_Raw, LOLR_Template, LOLR_StringTemplate } |
| The possible outcomes of name lookup for a literal operator. More... | |
| enum | CorrectTypoKind { CTK_NonError, CTK_ErrorRecovery } |
| typedef std::function< void(const TypoCorrection &)> | TypoDiagnosticGenerator |
| typedef std::function < ExprResult(Sema &, TypoExpr *, TypoCorrection)> | TypoRecoveryCallback |
| SpecialMemberOverloadResult * | LookupSpecialMember (CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis) |
| const TypoExprState & | getTypoExprState (TypoExpr *TE) const |
| void | clearDelayedTypo (TypoExpr *TE) |
| Clears the state of the given TypoExpr. More... | |
| NamedDecl * | LookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration) |
| Look up a name, looking for a single declaration. More... | |
| bool | LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false) |
| Perform unqualified name lookup starting from a given scope. More... | |
| bool | LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false) |
| Perform qualified name lookup into a given context. More... | |
| bool | LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, CXXScopeSpec &SS) |
| Performs qualified name lookup or special type of lookup for "__super::" scope specifier. More... | |
| bool | LookupParsedName (LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false) |
| Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier. More... | |
| ObjCProtocolDecl * | LookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration) |
| Find the protocol with the given name, if any. More... | |
| bool | LookupInSuper (LookupResult &R, CXXRecordDecl *Class) |
| Perform qualified name lookup into all base classes of the given class. More... | |
| void | LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions) |
| void | addOverloadedOperatorToUnresolvedSet (UnresolvedSetImpl &Functions, DeclAccessPair Operator, QualType T1, QualType T2) |
| LabelDecl * | LookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation()) |
| LookupOrCreateLabel - Do a name lookup of a label with the specified name. More... | |
| DeclContextLookupResult | LookupConstructors (CXXRecordDecl *Class) |
| Look up the constructors for the given class. More... | |
| CXXConstructorDecl * | LookupDefaultConstructor (CXXRecordDecl *Class) |
| Look up the default constructor for the given class. More... | |
| CXXConstructorDecl * | LookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals) |
| Look up the copying constructor for the given class. More... | |
| CXXMethodDecl * | LookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals) |
| Look up the copying assignment operator for the given class. More... | |
| CXXConstructorDecl * | LookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals) |
| Look up the moving constructor for the given class. More... | |
| CXXMethodDecl * | LookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals) |
| Look up the moving assignment operator for the given class. More... | |
| CXXDestructorDecl * | LookupDestructor (CXXRecordDecl *Class) |
| Look for the destructor of the given class. More... | |
| bool | checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id) |
| LiteralOperatorLookupResult | LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate) |
| LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext]. More... | |
| bool | isKnownName (StringRef name) |
| void | ArgumentDependentLookup (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions) |
| void | LookupVisibleDecls (Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true) |
| void | LookupVisibleDecls (DeclContext *Ctx, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true) |
| TypoCorrection | CorrectTypo (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true) |
| Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code. More... | |
| TypoExpr * | CorrectTypoDelayed (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr) |
| Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code. More... | |
| ExprResult | CorrectDelayedTyposInExpr (Expr *E, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult{return E;}) |
| Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected. More... | |
| ExprResult | CorrectDelayedTyposInExpr (Expr *E, llvm::function_ref< ExprResult(Expr *)> Filter) |
| ExprResult | CorrectDelayedTyposInExpr (ExprResult ER, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult{return E;}) |
| ExprResult | CorrectDelayedTyposInExpr (ExprResult ER, llvm::function_ref< ExprResult(Expr *)> Filter) |
| void | diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true) |
| void | diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, const PartialDiagnostic &PrevNote, bool ErrorRecovery=true) |
| Diagnose a successfully-corrected typo. More... | |
| void | FindAssociatedClassesAndNamespaces (SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses) |
| Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments. More... | |
| void | FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace) |
| Filters out lookup results that don't fall within the given scope as determined by isDeclInScope. More... | |
| void | DiagnoseAmbiguousLookup (LookupResult &Result) |
| Produce a diagnostic describing the ambiguity that resulted from name lookup. More... | |
Sema - This implements semantic analysis and AST building for C.
| typedef llvm::SmallPtrSet<CXXRecordDecl *, 16> clang::Sema::AssociatedClassSet |
| typedef llvm::SmallPtrSet<DeclContext *, 16> clang::Sema::AssociatedNamespaceSet |
| typedef std::pair<StringRef, QualType> clang::Sema::CapturedParamNameType |
| typedef std::pair<SourceLocation, bool> clang::Sema::DeleteExprLoc |
| typedef llvm::SmallVector<DeleteExprLoc, 4> clang::Sema::DeleteLocs |
| typedef llvm::DenseMap<Selector, GlobalMethods> clang::Sema::GlobalMethodPool |
| typedef std::pair<ObjCMethodList, ObjCMethodList> clang::Sema::GlobalMethods |
| typedef llvm::DenseMap<IdentifierInfo *, SrcLocSet> clang::Sema::IdentifierSourceLocations |
| typedef llvm::MapVector<const FunctionDecl *, LateParsedTemplate *> clang::Sema::LateParsedTemplateMapT |
| typedef void clang::Sema::LateTemplateParserCB(void *P, LateParsedTemplate &LPT) |
| typedef void clang::Sema::LateTemplateParserCleanupCB(void *P) |
| typedef llvm::SmallSetVector<const NamedDecl*, 16> clang::Sema::NamedDeclSetType |
| typedef std::pair<ValueDecl *, SourceLocation> clang::Sema::PendingImplicitInstantiation |
An entity for which implicit template instantiation is required.
The source location associated with the declaration is the first place in the source code where the declaration was "used". It is not necessarily the point of instantiation (which will be either before or after the namespace-scope declaration that triggered this implicit instantiation), However, it is the location that diagnostics should generally refer to, because users will need to know what code triggered the instantiation.
| typedef llvm::DenseMap<Selector, ObjCMethodDecl*> clang::Sema::ProtocolsMethodsMap |
| typedef llvm::SmallPtrSet<const CXXRecordDecl*, 8> clang::Sema::RecordDeclSetTy |
| typedef llvm::SmallPtrSet<Selector, 8> clang::Sema::SelectorSet |
| typedef void* clang::Sema::SkippedDefinitionContext |
| typedef std::pair<CXXRecordDecl*, CXXSpecialMember> clang::Sema::SpecialMemberDecl |
| typedef llvm::SmallSet<SourceLocation, 2> clang::Sema::SrcLocSet |
| typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> > clang::Sema::SuppressedDiagnosticsMap |
| typedef OpaquePtr<TemplateName> clang::Sema::TemplateTy |
| typedef std::pair<const IdentifierInfo *, uint64_t> clang::Sema::TypeTagMagicValue |
| typedef OpaquePtr<QualType> clang::Sema::TypeTy |
| typedef std::function<void(const TypoCorrection &)> clang::Sema::TypoDiagnosticGenerator |
| typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)> clang::Sema::TypoRecoveryCallback |
| typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *> > clang::Sema::UnparsedDefaultArgInstantiationsMap |
| typedef std::pair<CXXRecordDecl*, SourceLocation> clang::Sema::VTableUse |
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed.
These checks are done for simple assignments, as well as initialization, return from function, argument passing, etc. The query is phrased in terms of a source and destination type.
Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability").
| enum clang::Sema::CCEKind |
Specifies the context in which a particular template argument is being checked.
Describes how the expressions currently being parsed are evaluated at run-time, if at all.
The possible outcomes of name lookup for a literal operator.
Describes the kind of name lookup to perform.
|
strong |
Describes the result of the name lookup and resolution performed by ClassifyName().
| Enumerator | |
|---|---|
| NC_Unknown | |
| NC_Error | |
| NC_Keyword | |
| NC_Type | |
| NC_Expression | |
| NC_NestedNameSpecifier | |
| NC_TypeTemplate | |
| NC_VarTemplate | |
| NC_FunctionTemplate | |
C++ Overloading.
Describes the context in which code completion occurs.
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
a reference).
ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine their compatibility for the purposes of initialization by reference (C++ [dcl.init.ref]p4).
Describes the result of template argument deduction.
The TemplateDeductionResult enumeration describes the result of template argument deduction, as returned from DeduceTemplateArguments(). The separate TemplateDeductionInfo structure provides additional information about the results of template argument deduction, e.g., the deduced template argument list (if successful) or the specific template parameters or deduced arguments that were involved in the failure.
Enumeration describing how template parameter lists are compared for equality.
The context in which an unexpanded parameter pack is being diagnosed.
Note that the values of this enumeration line up with the first argument to the err_unexpanded_parameter_pack diagnostic.
| Sema::Sema | ( | Preprocessor & | pp, |
| ASTContext & | ctxt, | ||
| ASTConsumer & | consumer, | ||
| TranslationUnitKind | TUKind = TU_Complete, |
||
| CodeCompleteConsumer * | CompletionConsumer = nullptr |
||
| ) |
Definition at line 73 of file Sema.cpp.
References Context, clang::frontend::CPlusPlus, Diags, ExprEvalContexts, FieldCollector, clang::FormatASTNodeDiagnosticArgument(), FunctionScopes, getLangOpts(), I, NSAPIObj, NSNumberLiteralMethods, clang::NSAPI::NumNSNumberLiteralMethods, PotentiallyEvaluated, clang::DiagnosticsEngine::SetArgToStringFn(), and TUScope.
| Sema::~Sema | ( | ) |
Definition at line 262 of file Sema.cpp.
References Consumer, Context, E, FreePackedContext(), FreeVisContext(), FunctionScopes, clang::ASTContext::getExternalSource(), I, LateParsedTemplateMap, PackContext, clang::threadSafety::threadSafetyCleanup(), ThreadSafetyDeclCache, and VisContext.
| void Sema::ActOnAbortSEHFinallyBlock | ( | ) |
Definition at line 3715 of file SemaStmt.cpp.
| bool Sema::ActOnAccessSpecifier | ( | AccessSpecifier | Access, |
| SourceLocation | ASLoc, | ||
| SourceLocation | ColonLoc, | ||
| AttributeList * | Attrs = nullptr |
||
| ) |
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
Definition at line 1861 of file SemaDeclCXX.cpp.
References clang::DeclContext::addHiddenDecl(), clang::AS_none, Context, clang::AccessSpecDecl::Create(), CurContext, and ProcessAccessDeclAttributeList().
| ExprResult Sema::ActOnAddrLabel | ( | SourceLocation | OpLoc, |
| SourceLocation | LabLoc, | ||
| LabelDecl * | TheDecl | ||
| ) |
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
Definition at line 11225 of file SemaExpr.cpp.
References Context, clang::ASTContext::getPointerType(), clang::Decl::markUsed(), and clang::ASTContext::VoidTy.
| Decl * Sema::ActOnAliasDeclaration | ( | Scope * | CurScope, |
| AccessSpecifier | AS, | ||
| MultiTemplateParamsArg | TemplateParams, | ||
| SourceLocation | UsingLoc, | ||
| UnqualifiedId & | Name, | ||
| AttributeList * | AttrList, | ||
| TypeResult | Type, | ||
| Decl * | DeclFromDeclSpec | ||
| ) |
Definition at line 8510 of file SemaDeclCXX.cpp.
References ActOnDocumentableDecl(), ActOnTypedefNameDecl(), CheckTemplateParameterList(), CheckTypedefForVariablyModifiedType(), clang::LookupResult::clear(), Context, clang::TypeAliasTemplateDecl::Create(), clang::TypeAliasDecl::Create(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), clang::LookupResult::empty(), FilterLookupForScope(), ForRedeclaration, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::TypeLoc::getBeginLoc(), clang::Scope::getFlags(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), GetNameFromUnqualifiedId(), clang::Scope::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypedefNameDecl::getUnderlyingType(), handleTagNumbering(), clang::ASTContext::hasSameType(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_Identifier, clang::ASTContext::IntTy, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), clang::UnqualifiedId::Kind, LookupName(), LookupOrdinaryName, Previous, ProcessDeclAttributeList(), PushOnScopeChains(), clang::Decl::setAccess(), clang::TypeAliasDecl::setDescribedAliasTemplate(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), setTagNameForLinkagePurposes(), clang::UnqualifiedId::StartLocation, TemplateParameterListsAreEqual(), TPC_TypeAliasTemplate, TPL_TemplateMatch, and UPPC_DeclarationType.
| ExprResult Sema::ActOnArraySubscriptExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | LLoc, | ||
| Expr * | Idx, | ||
| SourceLocation | RLoc | ||
| ) |
Definition at line 4053 of file SemaExpr.cpp.
References Context, clang::frontend::CPlusPlus, clang::ASTContext::DependentTy, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isMSPropertySubscriptExpr(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::Type::isSpecificPlaceholderType(), clang::Expr::isTypeDependent(), clang::OK_Ordinary, clang::ASTContext::PseudoObjectTy, and clang::VK_LValue.
| ExprResult Sema::ActOnArrayTypeTrait | ( | ArrayTypeTrait | ATT, |
| SourceLocation | KWLoc, | ||
| ParsedType | LhsTy, | ||
| Expr * | DimExpr, | ||
| SourceLocation | RParen | ||
| ) |
ActOnArrayTypeTrait - Parsed one of the bianry type trait support pseudo-functions.
Definition at line 4385 of file SemaExprCXX.cpp.
References BuildArrayTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().
| ExprResult Sema::ActOnAsTypeExpr | ( | Expr * | E, |
| ParsedType | ParsedDestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
__builtin_astype(...)
ActOnAsTypeExpr - create a new asType (bitcast) from the arguments.
__builtin_astype( value, dst type )
Definition at line 5151 of file SemaExpr.cpp.
References Context, Diag(), clang::ExprError(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::OK_Ordinary, and clang::VK_RValue.
| Decl * Sema::ActOnAtEnd | ( | Scope * | S, |
| SourceRange | AtEnd, | ||
| ArrayRef< Decl * > | allMethods = None, |
||
| ArrayRef< DeclGroupPtrTy > | allTUVars = None |
||
| ) |
Check for instance method of the same name with incompatible types
The following allows us to typecheck messages to "id".
Check for class method of the same name with incompatible types
Definition at line 3550 of file SemaDeclObjC.cpp.
References ActOnDocumentableDecl(), ActOnObjCContainerFinishDefinition(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AtomicPropertySetterGetterRules(), clang::DeclGroupRef::begin(), AttributeLangSupport::C, clang::NSAPI::ClassId_NSObject, Consumer, Context, clang::FixItHint::CreateInsertion(), CurContext, Diag(), DiagnoseClassExtensionDupMethods(), DiagnoseDuplicateIvars(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseWeakIvars(), clang::ObjCPropertyImplDecl::Dynamic, E, clang::DeclGroupRef::end(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), getLocForEndOfToken(), getObjCContainerKind(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSourceManager(), clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(), I, ImplMethodsVsClassMethods(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceManager::isInSystemHeader(), clang::ObjCRuntime::isNonFragile(), clang::SourceRange::isValid(), LangOpts, LookupOrdinaryName, LookupSingleName(), clang::ast_matchers::match(), MatchTwoMethodDeclarations(), NSAPIObj, clang::LangOptions::ObjCRuntime, OCK_None, ProcessPropertyDecl(), clang::Property, clang::ObjCMethodDecl::setAsRedeclaration(), clang::Decl::setInvalidDecl(), SetIvarInitializers(), and TUScope.
| StmtResult Sema::ActOnAttributedStmt | ( | SourceLocation | AttrLoc, |
| ArrayRef< const Attr * > | Attrs, | ||
| Stmt * | SubStmt | ||
| ) |
Definition at line 483 of file SemaStmt.cpp.
References Context, and clang::AttributedStmt::Create().
| BaseResult Sema::ActOnBaseSpecifier | ( | Decl * | classdecl, |
| SourceRange | SpecifierRange, | ||
| ParsedAttributes & | Attributes, | ||
| bool | Virtual, | ||
| AccessSpecifier | Access, | ||
| ParsedType | basetype, | ||
| SourceLocation | BaseLoc, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
ActOnBaseSpecifier - Parsed a base specifier.
A base specifier is one entry in the base class list of a class specifier, for example: class foo : public bar, virtual private baz { 'public bar' and 'virtual private baz' are each base-specifiers.
Definition at line 1479 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), CheckBaseSpecifier(), Diag(), DiagnoseUnexpandedParameterPack(), clang::ParsedAttributes::empty(), clang::SourceRange::getBegin(), clang::Attr::getKind(), clang::ParsedAttributes::getList(), GetTypeFromParser(), clang::AttributeList::IgnoredAttribute, clang::SourceLocation::isInvalid(), clang::Decl::setInvalidDecl(), clang::CXXRecordDecl::setIsParsingBaseSpecifiers(), clang::AttributeList::UnknownAttribute, and UPPC_BaseType.
| void Sema::ActOnBaseSpecifiers | ( | Decl * | ClassDecl, |
| MutableArrayRef< CXXBaseSpecifier * > | Bases | ||
| ) |
ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes.
Definition at line 1657 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), and AttachBaseSpecifiers().
| ExprResult Sema::ActOnBinOp | ( | Scope * | S, |
| SourceLocation | TokLoc, | ||
| tok::TokenKind | Kind, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) |
Definition at line 10843 of file SemaExpr.cpp.
References DiagnoseBinOpPrecedence().
| void Sema::ActOnBlockArguments | ( | SourceLocation | CaretLoc, |
| Declarator & | ParamInfo, | ||
| Scope * | CurScope | ||
| ) |
ActOnBlockArguments - This callback allows processing of block arguments.
If there are no arguments, this is still invoked.
Definition at line 11605 of file SemaExpr.cpp.
References clang::Declarator::BlockLiteralContext, Context, clang::ASTContext::CreateTypeSourceInfo(), clang::ASTContext::DependentTy, Diag(), E, clang::TypeLoc::getAs(), clang::Type::getAs(), clang::Declarator::getContext(), clang::TypeLoc::getFullDataSize(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifier(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), clang::FunctionType::getReturnType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, I, clang::TypeLoc::IgnoreParens(), clang::TypeLoc::initializeFullCopy(), clang::Type::isFunctionType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::None, clang::Result, clang::DeclSpec::TQ_const, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.
| void Sema::ActOnBlockError | ( | SourceLocation | CaretLoc, |
| Scope * | CurScope | ||
| ) |
ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the information about the block from the action impl.
Definition at line 11723 of file SemaExpr.cpp.
| void Sema::ActOnBlockStart | ( | SourceLocation | CaretLoc, |
| Scope * | CurScope | ||
| ) |
ActOnBlockStart - This callback is invoked when a block literal is started.
Definition at line 11578 of file SemaExpr.cpp.
References Context, clang::BlockDecl::Create(), clang::Decl::getDeclContext(), and clang::BlockDecl::setBlockMangling().
| ExprResult Sema::ActOnBlockStmtExpr | ( | SourceLocation | CaretLoc, |
| Stmt * | Body, | ||
| Scope * | CurScope | ||
| ) |
ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed.
^(int x){...}
Definition at line 11735 of file SemaExpr.cpp.
References clang::sema::CapturingScopeInfo::Captures, clang::BlockDecl::captures(), Context, clang::frontend::CPlusPlus, clang::sema::CapturingScopeInfo::CXXThisCaptureIndex, Diag(), clang::QualType::DK_none, clang::CodeGen::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::sema::BlockScopeInfo::FunctionType, clang::Type::getAs(), clang::BlockExpr::getBlockDecl(), clang::ASTContext::getBlockPointerType(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::sema::CapturingScopeInfo::Capture::getInitExpr(), clang::FunctionType::getNoReturnAttr(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::sema::CapturingScopeInfo::Capture::getVariable(), clang::Decl::hasAttr(), clang::BlockDecl::hasCaptures(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::sema::CapturingScopeInfo::Capture::isBlockCapture(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::sema::CapturingScopeInfo::Capture::isNested(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::sema::CapturingScopeInfo::Capture::isThisCapture(), clang::None, clang::BlockDecl::param_begin(), clang::BlockDecl::param_end(), clang::Result, clang::sema::CapturingScopeInfo::ReturnType, clang::BlockDecl::setBody(), clang::BlockDecl::setCaptures(), clang::sema::BlockScopeInfo::TheDecl, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::ASTContext::VoidTy, and clang::FunctionType::ExtInfo::withNoReturn().
| ExprResult Sema::ActOnBooleanCondition | ( | Scope * | S, |
| SourceLocation | Loc, | ||
| Expr * | SubExpr | ||
| ) |
Definition at line 14020 of file SemaExpr.cpp.
References CheckBooleanCondition(), and clang::ExprError().
Referenced by ActOnOpenMPFinalClause(), and ActOnOpenMPIfClause().
| StmtResult Sema::ActOnBreakStmt | ( | SourceLocation | BreakLoc, |
| Scope * | CurScope | ||
| ) |
Definition at line 2641 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinally(), Context, Diag(), clang::Scope::getBreakParent(), clang::Scope::isOpenMPLoopScope(), and clang::StmtError().
| ExprResult Sema::ActOnBuiltinOffsetOf | ( | Scope * | S, |
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | TypeLoc, | ||
| ParsedType | ParsedArgTy, | ||
| ArrayRef< OffsetOfComponent > | Components, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 11515 of file SemaExpr.cpp.
References Context, clang::ExprError(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::QualType::isNull().
| ExprResult Sema::ActOnCallExpr | ( | Scope * | S, |
| Expr * | Fn, | ||
| SourceLocation | LParenLoc, | ||
| MultiExprArg | ArgExprs, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | ExecConfig = nullptr, |
||
| bool | IsExecConfig = false |
||
| ) |
ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
This provides the location of the left/right parens and a list of comma locations.
Definition at line 5002 of file SemaExpr.cpp.
References clang::ASTContext::BoundMemberTy, checkAddressOfFunctionIsAvailable(), checkArgsForPlaceholders(), Context, clang::frontend::CPlusPlus, clang::DeclRefExpr::Create(), clang::FixItHint::CreateRemoval(), clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::FunctionDecl::getBuiltinID(), clang::DeclaratorDecl::getQualifierLoc(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::getValueKind(), clang::Expr::hasAnyTypeDependentArguments(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::Expr::IgnoreParens(), clang::OverloadExpr::FindResult::IsAddressOfOperand, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), clang::None, clang::ASTContext::OverloadTy, clang::ASTContext::PseudoObjectTy, rebuildUnknownAnyFunction(), clang::Result, rewriteBuiltinFunctionDecl(), clang::ASTContext::UnknownAnyTy, clang::UO_AddrOf, clang::VK_RValue, and clang::ASTContext::VoidTy.
Referenced by ActOnCUDAExecConfigExpr(), BuildCallToObjectOfClassType(), BuildForRangeBeginEndCall(), buildMemberCall(), buildMemcpyForAssignmentOp(), BuildRecoveryCallExpr(), and tryToRecoverWithCall().
| StmtResult Sema::ActOnCapScopeReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp | ||
| ) |
ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
Definition at line 2818 of file SemaStmt.cpp.
References clang::sema::LambdaScopeInfo::CallOperator, Context, clang::ASTContext::DependentTy, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getContainedAutoType(), clang::FunctionType::getNoReturnAttr(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), hasDeducedReturnType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::InitializedEntity::InitializeResult(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), clang::Result, clang::sema::CapturingScopeInfo::ReturnType, clang::Decl::setInvalidDecl(), clang::StmtError(), and clang::ASTContext::VoidTy.
| StmtResult Sema::ActOnCapturedRegionEnd | ( | Stmt * | S | ) |
Definition at line 3909 of file SemaStmt.cpp.
References buildCapturedStmtCaptureList(), clang::sema::CapturedRegionScopeInfo::CapRegionKind, clang::sema::CapturingScopeInfo::Captures, clang::RecordDecl::completeDefinition(), clang::CapturedStmt::Create(), clang::CapturedStmt::getCapturedStmt(), clang::CapturedDecl::setBody(), clang::sema::CapturedRegionScopeInfo::TheCapturedDecl, and clang::sema::CapturedRegionScopeInfo::TheRecordDecl.
Referenced by ActOnOpenMPRegionEnd().
| void Sema::ActOnCapturedRegionError | ( | ) |
Definition at line 3893 of file SemaStmt.cpp.
References clang::RecordDecl::fields(), clang::Decl::getLocation(), clang::Decl::setInvalidDecl(), and clang::sema::CapturedRegionScopeInfo::TheRecordDecl.
Referenced by ActOnOpenMPRegionEnd().
| void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc, |
| Scope * | CurScope, | ||
| CapturedRegionKind | Kind, | ||
| unsigned | NumParams | ||
| ) |
Definition at line 3814 of file SemaStmt.cpp.
References clang::DeclContext::addDecl(), clang::CapturedDecl::castToDeclContext(), Context, clang::ImplicitParamDecl::Create(), clang::IdentifierTable::get(), clang::ASTContext::getPointerType(), clang::ASTContext::getTagDeclType(), clang::ASTContext::Idents, and clang::CapturedDecl::setContextParam().
Referenced by ActOnOpenMPRegionStart().
| void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc, |
| Scope * | CurScope, | ||
| CapturedRegionKind | Kind, | ||
| ArrayRef< CapturedParamNameType > | Params | ||
| ) |
Definition at line 3841 of file SemaStmt.cpp.
References clang::CapturedDecl::castToDeclContext(), Context, clang::ImplicitParamDecl::Create(), E, clang::IdentifierTable::get(), clang::ASTContext::getPointerType(), clang::ASTContext::getTagDeclType(), I, clang::ASTContext::Idents, clang::CapturedDecl::setContextParam(), and clang::CapturedDecl::setParam().
| StmtResult Sema::ActOnCaseStmt | ( | SourceLocation | CaseLoc, |
| Expr * | LHSVal, | ||
| SourceLocation | DotDotDotLoc, | ||
| Expr * | RHSVal, | ||
| SourceLocation | ColonLoc | ||
| ) |
Definition at line 375 of file SemaStmt.cpp.
References CheckConvertedConstantExpression(), ColonLoc, Context, clang::frontend::CPlusPlus11, Diag(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::StmtError().
ActOnCaseStmtBody - This installs a statement as the body of a case.
Definition at line 437 of file SemaStmt.cpp.
References clang::ast_matchers::caseStmt, and clang::CaseStmt::setSubStmt().
| ExprResult Sema::ActOnCastExpr | ( | Scope * | S, |
| SourceLocation | LParenLoc, | ||
| Declarator & | D, | ||
| ParsedType & | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | CastExpr | ||
| ) |
Definition at line 5812 of file SemaExpr.cpp.
References checkUnusedDeclAttributes(), clang::frontend::CPlusPlus, Diag(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ParenExpr::getSubExpr(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Declarator::isInvalidType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVectorType(), clang::Type::isVoidType(), and clang::Result.
| ExprResult Sema::ActOnCharacterConstant | ( | const Token & | Tok, |
| Scope * | UDLScope = nullptr |
||
| ) |
Definition at line 3059 of file SemaExpr.cpp.
References clang::CharacterLiteral::Ascii, BuildCookedLiteralOperatorCall(), clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, Diag(), clang::ExprError(), clang::IdentifierTable::get(), clang::Token::getKind(), clang::Token::getLocation(), getUDSuffixLoc(), clang::ASTContext::Idents, clang::if(), clang::ASTContext::IntTy, clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::CharacterLiteral::UTF8, clang::CharacterLiteral::Wide, and clang::ASTContext::WideCharTy.
| ExprResult Sema::ActOnChooseExpr | ( | SourceLocation | BuiltinLoc, |
| Expr * | CondExpr, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr, | ||
| SourceLocation | RPLoc | ||
| ) |
Definition at line 11534 of file SemaExpr.cpp.
References Context, clang::ASTContext::DependentTy, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OK_Ordinary, and clang::VK_RValue.
| ExprResult Sema::ActOnClassMessage | ( | Scope * | S, |
| ParsedType | Receiver, | ||
| Selector | Sel, | ||
| SourceLocation | LBracLoc, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| SourceLocation | RBracLoc, | ||
| MultiExprArg | Args | ||
| ) |
Definition at line 2456 of file SemaExprObjC.cpp.
References BuildClassMessage(), Context, clang::ExprError(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), and clang::QualType::isNull().
| ExprResult Sema::ActOnClassPropertyRefExpr | ( | IdentifierInfo & | receiverName, |
| IdentifierInfo & | propertyName, | ||
| SourceLocation | receiverNameLoc, | ||
| SourceLocation | propertyNameLoc | ||
| ) |
Definition at line 1922 of file SemaExprObjC.cpp.
References clang::Type::castAs(), clang::SelectorTable::constructSetterSelector(), Context, Diag(), DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCInterfaceDecl::getCategoryClassMethod(), clang::Preprocessor::getIdentifierTable(), clang::SelectorTable::getNullarySelector(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Preprocessor::getSelectorTable(), clang::ObjCInterfaceDecl::getSuperClass(), HandleExprPropertyRefExpr(), clang::QualType::isNull(), clang::IdentifierInfo::isStr(), clang::ObjCInterfaceDecl::lookupClassMethod(), clang::ObjCInterfaceDecl::lookupPrivateClassMethod(), clang::OK_ObjCProperty, PP, clang::ASTContext::PseudoObjectTy, tryCaptureObjCSelf(), and clang::VK_LValue.
| DeclResult Sema::ActOnClassTemplateSpecialization | ( | Scope * | S, |
| unsigned | TagSpec, | ||
| TagUseKind | TUK, | ||
| SourceLocation | KWLoc, | ||
| SourceLocation | ModulePrivateLoc, | ||
| TemplateIdAnnotation & | TemplateId, | ||
| AttributeList * | Attr, | ||
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
Definition at line 6140 of file SemaTemplate.cpp.
References clang::anyDependentTemplateArguments(), clang::AS_none, clang::AS_public, CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::FriendDecl::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::ClassTemplateDecl::findSpecialization(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getCanonicalTemplateName(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::CXXRecordDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTypeDeclType(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::ASTContext::hasSameType(), I, clang::TemplateName::isDependent(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), MarkUsedTemplateParameters(), clang::Name, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization(), SetNestedNameSpecifier(), clang::ClassTemplateSpecializationDecl::setSpecializationKind(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::TagDecl::setTemplateParameterListsInfo(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TemplateArgumentListInfo::size(), clang::TemplateIdAnnotation::SS, clang::TagDecl::startDefinition(), clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateNameLoc, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TTK_Enum.
| ExprResult Sema::ActOnCoawaitExpr | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E | ||
| ) |
| void Sema::ActOnComment | ( | SourceRange | Comment | ) |
Definition at line 1232 of file Sema.cpp.
References clang::ASTContext::addComment(), clang::LangOptions::CommentOpts, Context, clang::FixItHint::CreateReplacement(), Diag(), clang::SourceRange::getBegin(), clang::RawComment::getKind(), clang::SourceLocation::getLocWithOffset(), clang::RawComment::isAlmostTrailingComment(), clang::SourceManager::isInSystemHeader(), LangOpts, clang::CommentOptions::ParseAllComments, clang::RawComment::RCK_OrdinaryBCPL, clang::RawComment::RCK_OrdinaryC, and SourceMgr.
| Decl * Sema::ActOnCompatibilityAlias | ( | SourceLocation | AtLoc, |
| IdentifierInfo * | AliasName, | ||
| SourceLocation | AliasLocation, | ||
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLocation | ||
| ) |
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration.
It sets up the alias relationships.
Definition at line 1051 of file SemaDeclObjC.cpp.
References CheckObjCDeclScope(), Context, clang::ObjCCompatibleAliasDecl::Create(), CurContext, Diag(), ForRedeclaration, clang::Type::getAs(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), PushOnScopeChains(), and TUScope.
| ExprResult Sema::ActOnCompoundLiteral | ( | SourceLocation | LParenLoc, |
| ParsedType | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | InitExpr | ||
| ) |
Definition at line 5377 of file SemaExpr.cpp.
References Context, and clang::ASTContext::getTrivialTypeSourceInfo().
| StmtResult Sema::ActOnCompoundStmt | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| ArrayRef< Stmt * > | Elts, | ||
| bool | isStmtExpr | ||
| ) |
Definition at line 331 of file SemaStmt.cpp.
References clang::frontend::C99, Context, clang::frontend::CPlusPlus, Diag(), and clang::Decl::getLocation().
Referenced by DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitMoveAssignment(), and DefineImplicitMoveConstructor().
| ExprResult Sema::ActOnConditionalOp | ( | SourceLocation | QuestionLoc, |
| SourceLocation | ColonLoc, | ||
| Expr * | CondExpr, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) |
ActOnConditionalOp - Parse a ?: operation.
Note that 'LHS' may be null in the case of a the GNU conditional expr extension.
Definition at line 6798 of file SemaExpr.cpp.
References ColonLoc, Context, clang::frontend::CPlusPlus, DiagnoseConditionalPrecedence(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::ASTContext::hasSameType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OK_Ordinary, and clang::VK_RValue.
Referenced by CheckOpenMPLoop().
| ExprResult Sema::ActOnConstantExpression | ( | ExprResult | Res | ) |
Definition at line 13453 of file SemaExpr.cpp.
References CorrectDelayedTyposInExpr(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and UpdateMarkingForLValueToRValue().
Referenced by clang::Parser::ParseConstantExpression().
| StmtResult Sema::ActOnContinueStmt | ( | SourceLocation | ContinueLoc, |
| Scope * | CurScope | ||
| ) |
Definition at line 2629 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinally(), Context, Diag(), clang::Scope::getContinueParent(), and clang::StmtError().
| Decl * Sema::ActOnConversionDeclarator | ( | CXXConversionDecl * | Conversion | ) |
ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function.
This routine is responsible for recording the conversion function in the C++ class, if possible.
Definition at line 7084 of file SemaDeclCXX.cpp.
References Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::CXXConversionDecl::getConversionType(), clang::Decl::getDeclContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ASTContext::getTypeDeclType(), clang::CanQual< T >::getUnqualifiedType(), IsDerivedFrom(), clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.
| ExprResult Sema::ActOnConvertVectorExpr | ( | Expr * | E, |
| ParsedType | ParsedDestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
__builtin_convertvector(...)
ActOnConvertVectorExpr - create a new convert-vector expression from the provided arguments.
__builtin_convertvector( value, dst type )
Definition at line 5172 of file SemaExpr.cpp.
| StmtResult Sema::ActOnCoreturnStmt | ( | SourceLocation | KwLoc, |
| Expr * | E | ||
| ) |
Definition at line 327 of file SemaCoroutine.cpp.
| ExprResult Sema::ActOnCoyieldExpr | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E | ||
| ) |
Definition at line 276 of file SemaCoroutine.cpp.
References buildOperatorCoawaitCall(), buildPromiseCall(), checkCoroutineContext(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
| ExprResult Sema::ActOnCUDAExecConfigExpr | ( | Scope * | S, |
| SourceLocation | LLLLoc, | ||
| MultiExprArg | ExecConfig, | ||
| SourceLocation | GGGLoc | ||
| ) |
Definition at line 23 of file SemaCUDA.cpp.
References ActOnCallExpr(), Context, Diag(), clang::ExprError(), clang::ASTContext::getcudaConfigureCallDecl(), clang::ValueDecl::getType(), MarkFunctionReferenced(), and clang::VK_LValue.
| ExprResult Sema::ActOnCXXBoolLiteral | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind | ||
| ) |
ActOnCXXBoolLiteral - Parse {true,false} literals.
Definition at line 587 of file SemaExprCXX.cpp.
References clang::ASTContext::BoolTy, and Context.
Referenced by BuildEmptyCXXFoldExpr().
| StmtResult Sema::ActOnCXXCatchBlock | ( | SourceLocation | CatchLoc, |
| Decl * | ExDecl, | ||
| Stmt * | HandlerBlock | ||
| ) |
ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them.
Definition at line 3450 of file SemaStmt.cpp.
References Context.
| DeclResult Sema::ActOnCXXConditionDeclaration | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement.
e.g: "if (int x = f()) {...}"
Definition at line 13170 of file SemaDeclCXX.cpp.
References ActOnDeclarator(), Diag(), clang::Declarator::getDeclSpec(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), and clang::DeclSpec::SCS_typedef.
| ExprResult Sema::ActOnCXXDelete | ( | SourceLocation | StartLoc, |
| bool | UseGlobal, | ||
| bool | ArrayForm, | ||
| Expr * | ExE | ||
| ) |
ActOnCXXDelete - Parsed a C++ 'delete' expression.
ActOnCXXDelete - Parsed a C++ 'delete' expression (C++ 5.3.5), as in:
or
Definition at line 2617 of file SemaExprCXX.cpp.
References CheckDestructorAccess(), Context, clang::FixItHint::CreateInsertion(), clang::ASTContext::DeclarationNames, DefaultLvalueConversion(), Diag(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionDecl::getNumParams(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::CXXRecordDecl::isAbstract(), clang::Type::isArrayType(), isCompleteType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXRecordDecl::isPolymorphic(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::CXXMethodDecl::isVirtual(), clang::Type::isVoidType(), LookupDestructor(), MarkFunctionReferenced(), clang::ast_matchers::match(), PDiag(), PerformContextualImplicitConversion(), RequireCompleteType(), clang::Result, S, and clang::ASTContext::VoidTy.
| bool Sema::ActOnCXXEnterDeclaratorScope | ( | Scope * | S, |
| CXXScopeSpec & | SS | ||
| ) |
ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id.
After this method is called, according to [C++ 3.4.3p3], names should be looked up in the declarator-id's scope, until the declarator is parsed and ActOnCXXExitDeclaratorScope is called. The 'SS' should be a non-empty valid CXXScopeSpec.
Definition at line 1028 of file SemaCXXScopeSpec.cpp.
References computeDeclContext(), EnterDeclaratorContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), RebuildNestedNameSpecifierInCurrentInstantiation(), and RequireCompleteDeclContext().
ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'.
ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the out-of-line declaration 'Dcl'.
After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a static data member of class X, names should be looked up in the scope of class X.
The scope is a fresh scope pushed for just this purpose.
After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a static data member of class X, names should be looked up in the scope of class X.
Definition at line 13134 of file SemaDeclCXX.cpp.
References EnterDeclaratorContext(), clang::Decl::getDeclContext(), clang::Decl::isInvalidDecl(), clang::Decl::isOutOfLine(), isStaticDataMember(), PotentiallyEvaluated, and PushExpressionEvaluationContext().
| void Sema::ActOnCXXExitDeclaratorScope | ( | Scope * | S, |
| const CXXScopeSpec & | SS | ||
| ) |
ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished.
'SS' is the same CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well. Used to indicate that names should revert to being looked up in the defining scope.
Definition at line 1055 of file SemaCXXScopeSpec.cpp.
References computeDeclContext(), ExitDeclaratorContext(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'.
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the out-of-line declaration 'D'.
Definition at line 13155 of file SemaDeclCXX.cpp.
References ExitDeclaratorContext(), clang::Decl::isInvalidDecl(), clang::Decl::isOutOfLine(), isStaticDataMember(), and PopExpressionEvaluationContext().
| ExprResult Sema::ActOnCXXFoldExpr | ( | SourceLocation | LParenLoc, |
| Expr * | LHS, | ||
| tok::TokenKind | Operator, | ||
| SourceLocation | EllipsisLoc, | ||
| Expr * | RHS, | ||
| SourceLocation | RParenLoc | ||
| ) |
Handle a C++1z fold-expression: ( expr op ... op expr ).
Definition at line 949 of file SemaTemplateVariadic.cpp.
References BuildCXXFoldExpr(), CheckFoldOperand(), clang::Expr::containsUnexpandedParameterPack(), and Diag().
| void Sema::ActOnCXXForRangeDecl | ( | Decl * | D | ) |
Definition at line 9888 of file SemaDecl.cpp.
References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::DeclaratorDecl::getOuterLocStart(), clang::VarDecl::getStorageClass(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::VarDecl::setCXXForRangeDecl(), and clang::Decl::setInvalidDecl().
| StmtResult Sema::ActOnCXXForRangeIdentifier | ( | Scope * | S, |
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | Ident, | ||
| ParsedAttributes & | Attrs, | ||
| SourceLocation | AttrEnd | ||
| ) |
Definition at line 9927 of file SemaDecl.cpp.
References clang::Declarator::AddTypeInfo(), clang::Declarator::ForContext, clang::AttributePool::getFactory(), clang::ParsedAttributes::getPool(), clang::DeclaratorChunk::getReference(), clang::SourceLocation::isValid(), clang::Declarator::SetIdentifier(), clang::DeclSpec::SetTypeSpecType(), clang::Declarator::takeAttributes(), and clang::DeclSpec::TST_auto.
| StmtResult Sema::ActOnCXXForRangeStmt | ( | Scope * | S, |
| SourceLocation | ForLoc, | ||
| SourceLocation | CoawaitLoc, | ||
| Stmt * | First, | ||
| SourceLocation | ColonLoc, | ||
| Expr * | Range, | ||
| SourceLocation | RParenLoc, | ||
| BuildForRangeKind | Kind | ||
| ) |
ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
C++11 [stmt.ranged]: A range-based for statement is equivalent to
{ auto && __range = range-init; for ( auto __begin = begin-expr, __end = end-expr; __begin != __end; ++__begin ) { for-range-declaration = *__begin; statement } }
The body of the loop is not available yet, since it cannot be analysed until we have determined the type of the for-range-declaration.
Definition at line 1940 of file SemaStmt.cpp.
References Context, Diag(), FinishForRangeVarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getAutoRRefDeductType(), clang::DeclStmt::getSingleDecl(), clang::DeclStmt::getStartLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclStmt::isSingleDecl(), clang::SourceLocation::isValid(), ObjCEnumerationCollection(), clang::Decl::setInvalidDecl(), and clang::StmtError().
Referenced by RebuildForRangeWithDereference().
| bool Sema::ActOnCXXGlobalScopeSpecifier | ( | SourceLocation | CCLoc, |
| CXXScopeSpec & | SS | ||
| ) |
The parser has parsed a global nested-name-specifier '::'.
| CCLoc | The location of the '::'. |
| SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier. |
Definition at line 247 of file SemaCXXScopeSpec.cpp.
References Context, and clang::CXXScopeSpec::MakeGlobal().
| NamedDecl * Sema::ActOnCXXMemberDeclarator | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| Expr * | BW, | ||
| const VirtSpecifiers & | VS, | ||
| InClassInitStyle | InitStyle | ||
| ) |
ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
'AS' is the access specifier, 'BW' specifies the bitfield width if there is one, 'InitExpr' specifies the initializer if one has been parsed, and 'InitStyle' is set if an in-class initializer is present (but parsing it has been deferred).
Definition at line 2005 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), clang::AS_private, clang::AS_public, CheckOverrideControl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearConstexprSpec(), clang::DeclSpec::ClearStorageClassSpecs(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXOperatorName, Diag(), diagnoseQualifiedDeclaration(), Diags, FieldCollector, clang::Decl::getAccess(), clang::DeclarationName::getAsIdentifierInfo(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VirtSpecifiers::getFinalLoc(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::VirtSpecifiers::getLastLocation(), clang::ParsedAttributes::getList(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), getMSPropertyAttr(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::VirtSpecifiers::getOverrideLoc(), clang::FieldDecl::getParent(), clang::ASTContext::getPrintingPolicy(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclSpec::getTypeQualifiers(), HandleDeclarator(), HandleField(), HandleMSProperty(), clang::Decl::hasAttr(), clang::ICIS_NoInit, InitializationHasSideEffects(), clang::DeclSpec::isConstexprSpecified(), clang::Declarator::isDeclarationOfFunction(), clang::DeclContext::isDependentContext(), clang::VirtSpecifiers::isFinalSpecified(), clang::VirtSpecifiers::isFinalSpelledSealed(), clang::DeclSpec::isFriendSpecified(), clang::DeclarationName::isIdentifier(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::VirtSpecifiers::isOverrideSpecified(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::Name, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::DeclSpec::SetStorageClassSpec(), clang::DeclSpec::SetTypeQual(), clang::TemplateParameterList::size(), clang::DeclSpec::TQ_const, and UnusedPrivateFields.
| ExprResult Sema::ActOnCXXNamedCast | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind, | ||
| SourceLocation | LAngleBracketLoc, | ||
| Declarator & | D, | ||
| SourceLocation | RAngleBracketLoc, | ||
| SourceLocation | LParenLoc, | ||
| Expr * | E, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
Definition at line 213 of file SemaCast.cpp.
References BuildCXXNamedCast(), CheckExtraCXXDefaultArguments(), clang::ExprError(), getLangOpts(), clang::Expr::getType(), GetTypeForDeclaratorCast(), and clang::Declarator::isInvalidType().
| bool Sema::ActOnCXXNestedNameSpecifier | ( | Scope * | S, |
| IdentifierInfo & | Identifier, | ||
| SourceLocation | IdentifierLoc, | ||
| SourceLocation | CCLoc, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext, | ||
| CXXScopeSpec & | SS, | ||
| bool | ErrorRecoveryLookup = false, |
||
| bool * | IsCorrectedToColon = nullptr |
||
| ) |
The parser has parsed a nested-name-specifier 'identifier::'.
| S | The scope in which this nested-name-specifier occurs. |
| Identifier | The identifier preceding the '::'. |
| IdentifierLoc | The location of the identifier. |
| CCLoc | The location of the '::'. |
| ObjectType | The type of the object, if we're parsing nested-name-specifier in a member access expression. |
| EnteringContext | Whether we're entering the context nominated by this nested-name-specifier. |
| SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type). |
| ErrorRecoveryLookup | If true, then this method is called to improve error recovery. In this case do not emit error message. |
| IsCorrectedToColon | If not null, suggestions to replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'. |
Definition at line 796 of file SemaCXXScopeSpec.cpp.
References BuildCXXNestedNameSpecifier(), GetTypeFromParser(), and clang::CXXScopeSpec::isInvalid().
| bool Sema::ActOnCXXNestedNameSpecifier | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| TemplateTy | TemplateName, | ||
| SourceLocation | TemplateNameLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgs, | ||
| SourceLocation | RAngleLoc, | ||
| SourceLocation | CCLoc, | ||
| bool | EnteringContext | ||
| ) |
The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'.
| S | The scope in which this nested-name-specifier occurs. |
| SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type). |
| TemplateKWLoc | the location of the 'template' keyword, if any. |
| TemplateName | the template name. |
| TemplateNameLoc | The location of the template name. |
| LAngleLoc | The location of the opening angle bracket ('<'). |
| TemplateArgs | The template arguments. |
| RAngleLoc | The location of the closing angle bracket ('>'). |
| CCLoc | The location of the '::'. |
| EnteringContext | Whether we're entering the context of the nested-name-specifier. |
Definition at line 859 of file SemaCXXScopeSpec.cpp.
References Builder, CheckTemplateIdType(), Context, Diag(), clang::ETK_None, clang::CXXScopeSpec::Extend(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::SourceRange::getBegin(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::DependentTemplateName::getIdentifier(), clang::DependentTemplateName::getQualifier(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeLocInContext(), clang::CXXScopeSpec::getWithLocInContext(), I, clang::Type::isDependentType(), clang::DependentTemplateName::isIdentifier(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceRange::isValid(), NoteAllFoundTemplates(), clang::TypeLocBuilder::push(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::SourceRange::setBegin(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::TemplateArgumentListInfo::size(), and translateTemplateArguments().
| bool Sema::ActOnCXXNestedNameSpecifierDecltype | ( | CXXScopeSpec & | SS, |
| const DeclSpec & | DS, | ||
| SourceLocation | ColonColonLoc | ||
| ) |
Definition at line 815 of file SemaCXXScopeSpec.cpp.
References BuildDecltypeType(), Context, Diag(), clang::CXXScopeSpec::Extend(), getLangOpts(), clang::DeclSpec::getRepAsExpr(), clang::TypeLocBuilder::getTypeLocInContext(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::isInvalid(), clang::TypeLocBuilder::push(), clang::TypeSpecTypeLoc::setNameLoc(), clang::DeclSpec::TST_decltype, and clang::DeclSpec::TST_error.
| ExprResult Sema::ActOnCXXNew | ( | SourceLocation | StartLoc, |
| bool | UseGlobal, | ||
| SourceLocation | PlacementLParen, | ||
| MultiExprArg | PlacementArgs, | ||
| SourceLocation | PlacementRParen, | ||
| SourceRange | TypeIdParens, | ||
| Declarator & | D, | ||
| Expr * | Initializer | ||
| ) |
ActOnCXXNew - Parsed a C++ 'new' expression.
Parsed a C++ 'new' expression (C++ 5.3.4).
E.g.:
or
| StartLoc | The first location of the expression. |
| UseGlobal | True if 'new' was prefixed with '::'. |
| PlacementLParen | Opening paren of the placement arguments. |
| PlacementArgs | Placement new arguments. |
| PlacementRParen | Closing paren of the placement arguments. |
| TypeIdParens | If the type is in parens, the source range. |
| D | The type to be allocated, as well as array dimensions. |
| Initializer | The initializing expression or initializer-list, or null if there is none. |
Definition at line 1166 of file SemaExprCXX.cpp.
References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, BuildCXXNew(), CCEK_NewExpr, CheckConvertedConstantExpression(), clang::DeclSpec::containsPlaceholderType(), Context, Diag(), clang::Declarator::DropFirstTypeObject(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Declarator::getDeclSpec(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::Declarator::getLocEnd(), clang::Declarator::getNumTypeObjects(), clang::ASTContext::getSizeType(), clang::Declarator::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Declarator::getTypeObject(), clang::DeclaratorChunk::ArrayTypeInfo::hasStatic, I, clang::Declarator::isInvalidType(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Loc, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, and VerifyIntegerConstantExpression().
| ExprResult Sema::ActOnCXXNullPtrLiteral | ( | SourceLocation | Loc | ) |
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
Definition at line 596 of file SemaExprCXX.cpp.
References Context, and clang::ASTContext::NullPtrTy.
| ExprResult Sema::ActOnCXXThis | ( | SourceLocation | loc | ) |
C++ 9.3.2: In the body of a non-static member function, the keyword this is a non-lvalue expression whose value is the address of the object for which the function is called.
Definition at line 962 of file SemaExprCXX.cpp.
References CheckCXXThisCapture(), Context, Diag(), getCurrentThisType(), and clang::QualType::isNull().
Referenced by DefineImplicitLambdaToBlockPointerConversion().
| ExprResult Sema::ActOnCXXThrow | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| Expr * | expr | ||
| ) |
ActOnCXXThrow - Parse throw expressions.
Definition at line 602 of file SemaExprCXX.cpp.
References clang::Scope::BlockScope, clang::Scope::ClassScope, clang::Scope::FnScope, clang::Scope::FunctionPrototypeScope, clang::Scope::getFlags(), clang::Scope::getParent(), clang::Expr::IgnoreParens(), clang::Scope::isDeclScope(), clang::Scope::ObjCMethodScope, S, and clang::Scope::TryScope.
| StmtResult Sema::ActOnCXXTryBlock | ( | SourceLocation | TryLoc, |
| Stmt * | TryBlock, | ||
| ArrayRef< Stmt * > | Handlers | ||
| ) |
ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them.
Definition at line 3572 of file SemaStmt.cpp.
References Context, clang::CXXTryStmt::Create(), Diag(), clang::sema::FunctionScopeInfo::FirstSEHTryLoc, clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getCanonicalType(), clang::CXXCatchStmt::getCaughtType(), clang::CXXCatchStmt::getExceptionDecl(), clang::CXXCatchStmt::getLocStart(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::CXXBasePaths::isAmbiguous(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::sema::FunctionScopeInfo::setHasCXXTry(), clang::CXXBasePaths::setOrigin(), and clang::StmtError().
| ExprResult Sema::ActOnCXXTypeConstructExpr | ( | ParsedType | TypeRep, |
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Exprs, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnCXXTypeConstructExpr - Parse construction of a specified type.
Can be interpreted either as function-style casting ("int(x)") or class type construction ("ClassType(x,y,z)") or creation of a value-initialized type ("int()").
Definition at line 987 of file SemaExprCXX.cpp.
References BuildCXXTypeConstructExpr(), Context, clang::ExprError(), clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().
| ExprResult Sema::ActOnCXXTypeid | ( | SourceLocation | OpLoc, |
| SourceLocation | LParenLoc, | ||
| bool | isType, | ||
| void * | TyOrExpr, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnCXXTypeid - Parse typeid( something ).
ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);.
Definition at line 466 of file SemaExprCXX.cpp.
References Context, Diag(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), and clang::QualType::isNull().
| ExprResult Sema::ActOnCXXUuidof | ( | SourceLocation | OpLoc, |
| SourceLocation | LParenLoc, | ||
| bool | isType, | ||
| void * | TyOrExpr, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnCXXUuidof - Parse __uuidof( something ).
ActOnCXXUuidof - Parse __uuidof( type-id ) or __uuidof (expression);.
Definition at line 553 of file SemaExprCXX.cpp.
References Context, Diag(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), and clang::QualType::isNull().
| Decl * Sema::ActOnDeclarator | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
Definition at line 4653 of file SemaDecl.cpp.
References clang::FDK_Declaration, clang::Decl::getDeclContext(), clang::DeclContext::isFileContext(), clang::Declarator::setFunctionDefinitionKind(), and clang::Decl::setTopLevelDeclInObjCContainer().
Referenced by ActOnCXXConditionDeclaration().
| StmtResult Sema::ActOnDeclStmt | ( | DeclGroupPtrTy | Decl, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 71 of file SemaStmt.cpp.
References Context, clang::OpaquePtr< PtrTy >::get(), clang::DeclGroupRef::isNull(), and clang::StmtError().
| ExprResult Sema::ActOnDecltypeExpression | ( | Expr * | E | ) |
Process the expression contained within a decltype.
For such expressions, certain semantic checks on temporaries are delayed until this point, and are omitted for the 'topmost' call in the decltype expression. If the topmost call bound a temporary, strip that temporary off the expression.
Definition at line 5510 of file SemaExprCXX.cpp.
References ActOnParenExpr(), Bind, clang::BO_Comma, CheckCallReturnType(), CheckDestructorAccess(), Context, DiagnoseUseOfDecl(), E, clang::ExprError(), ExprEvalContexts, ExprNeedsCleanups, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), getLangOpts(), clang::CallExpr::getLocStart(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::CXXBindTemporaryExpr::getTemporary(), clang::Expr::getType(), I, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), LookupDestructor(), MarkFunctionReferenced(), PDiag(), and clang::CXXTemporary::setDestructor().
| void Sema::ActOnDefaultCtorInitializers | ( | Decl * | CDtorDecl | ) |
Definition at line 4415 of file SemaDeclCXX.cpp.
References SetCtorInitializers().
| StmtResult Sema::ActOnDefaultStmt | ( | SourceLocation | DefaultLoc, |
| SourceLocation | ColonLoc, | ||
| Stmt * | SubStmt, | ||
| Scope * | CurScope | ||
| ) |
Definition at line 445 of file SemaStmt.cpp.
| void Sema::ActOnDefs | ( | Scope * | S, |
| Decl * | TagD, | ||
| SourceLocation | DeclStart, | ||
| IdentifierInfo * | ClassName, | ||
| SmallVectorImpl< Decl * > & | Decls | ||
| ) |
Called whenever @defs(ClassName) is encountered in the source.
Inserts the instance variables of ClassName into Decls.
Definition at line 4372 of file SemaDeclObjC.cpp.
References Context, clang::ObjCAtDefsFieldDecl::Create(), clang::ASTContext::DeepCollectObjCIvars(), Diag(), clang::FieldDecl::getBitWidth(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ValueDecl::getType(), clang::ObjCRuntime::isNonFragile(), LangOpts, clang::LangOptions::ObjCRuntime, PushOnScopeChains(), and S.
ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
We're (re-)introducing the given function parameter into scope for use in parsing later parts of the method declaration. For example, we could see an ActOnParamDefaultArgument event for this parameter.
Definition at line 6600 of file SemaDeclCXX.cpp.
References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::hasUnparsedDefaultArg(), IdResolver, and clang::ParmVarDecl::setDefaultArg().
| ParsedType Sema::ActOnDelayedDefaultTemplateArg | ( | const IdentifierInfo & | II, |
| SourceLocation | NameLoc | ||
| ) |
For compatibility with MSVC, we delay parsing of some default template type arguments until instantiation time.
Emits a warning and returns a synthesized DependentNameType that isn't really dependent on any other template arguments.
Definition at line 474 of file SemaDecl.cpp.
References Builder, Context, Diag(), clang::ETK_None, clang::ASTContext::getDependentNameType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::TypeLocBuilder::push(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), and synthesizeCurrentNestedNameSpecifier().
| void Sema::actOnDelayedExceptionSpecification | ( | Decl * | Method, |
| ExceptionSpecificationType | EST, | ||
| SourceRange | SpecificationRange, | ||
| ArrayRef< ParsedType > | DynamicExceptions, | ||
| ArrayRef< SourceRange > | DynamicExceptionRanges, | ||
| Expr * | NoexceptExpr | ||
| ) |
Add an exception-specification to the given member function (or member function template).
The exception-specification was parsed after the method itself was declared.
Definition at line 13719 of file SemaDeclCXX.cpp.
References clang::ASTContext::adjustExceptionSpec(), clang::CXXMethodDecl::begin_overridden_methods(), checkExceptionSpecification(), CheckOverridingFunctionExceptionSpec(), checkThisInStaticMemberFunctionExceptionSpec(), clang::CXXMethodDecl::end_overridden_methods(), clang::CXXMethodDecl::isStatic(), and clang::CXXMethodDecl::isVirtual().
| ExprResult Sema::ActOnDependentIdExpression | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| bool | isAddressOfOperand, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
This is only possible with an explicit scope specifier naming a dependent type.
Definition at line 409 of file SemaTemplate.cpp.
References Context, clang::CXXDependentScopeMemberExpr::Create(), and clang::CXXScopeSpec::getWithLocInContext().
| ExprResult Sema::ActOnDependentMemberExpr | ( | Expr * | Base, |
| QualType | BaseType, | ||
| bool | IsArrow, | ||
| SourceLocation | OpLoc, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| NamedDecl * | FirstQualifierInScope, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
Definition at line 426 of file SemaExprMember.cpp.
References Context, clang::CXXDependentScopeMemberExpr::Create(), Diag(), clang::ExprError(), clang::Type::getAs(), clang::DeclarationNameInfo::getName(), clang::PointerType::getPointeeType(), clang::DeclarationNameInfo::getSourceRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclarationName::isDependentName(), clang::Type::isDependentType(), and clang::Type::isRecordType().
| TypeResult Sema::ActOnDependentTag | ( | Scope * | S, |
| unsigned | TagSpec, | ||
| TagUseKind | TUK, | ||
| const CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | TagLoc, | ||
| SourceLocation | NameLoc | ||
| ) |
Definition at line 7972 of file SemaTemplate.cpp.
References Context, Diag(), clang::ASTContext::getDependentNameType(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::TypeLocBuilder::push(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), and clang::DependentNameTypeLoc::setQualifierLoc().
| TemplateNameKind Sema::ActOnDependentTemplateName | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| UnqualifiedId & | Name, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext, | ||
| TemplateTy & | Result | ||
| ) |
Form a dependent template name.
This action forms a dependent template name given the template name and its (presumably dependent) scope specifier. For example, given "MetaFun::template apply", the scope specifier SS will be "MetaFun::", TemplateKWLoc contains the location of the "template" keyword, and "apply" is the Name.
Definition at line 2980 of file SemaTemplate.cpp.
References Context, clang::FixItHint::CreateRemoval(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ASTContext::getDependentTemplateName(), clang::UnqualifiedId::getKind(), clang::UnqualifiedId::getLocStart(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Scope::getTemplateParamParent(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::Name, clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::TNK_Dependent_template_name, clang::TNK_Function_template, and clang::TNK_Non_template.
| ExprResult Sema::ActOnDesignatedInitializer | ( | Designation & | Desig, |
| SourceLocation | Loc, | ||
| bool | GNUSyntax, | ||
| ExprResult | Init | ||
| ) |
Definition at line 2666 of file SemaInit.cpp.
References clang::Designator::ArrayDesignator, clang::Designator::ArrayRangeDesignator, clang::frontend::C99, CheckArrayDesignatorExpr(), clang::Designation::ClearExprs(), clang::DesignatedInitExpr::Create(), Diag(), clang::ExprError(), clang::Designator::FieldDesignator, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Designator::getArrayIndex(), clang::Designator::getArrayRangeEnd(), clang::Designator::getArrayRangeStart(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Designation::getDesignator(), clang::Designator::getDotLoc(), clang::Designator::getEllipsisLoc(), clang::Designator::getField(), clang::Designator::getFieldLoc(), clang::Designator::getKind(), getLangOpts(), clang::Designator::getLBracketLoc(), clang::DesignatedInitExpr::getLocStart(), clang::Designation::getNumDesignators(), clang::Designator::getRBracketLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
| void Sema::ActOnDocumentableDecl | ( | Decl * | D | ) |
Should be called on all declarations that might have attached documentation comments.
Definition at line 10351 of file SemaDecl.cpp.
Referenced by ActOnAliasDeclaration(), ActOnAtEnd(), ActOnEnumConstant(), ActOnMethodDeclaration(), ActOnProperty(), and ActOnStartNamespaceDef().
Definition at line 10355 of file SemaDecl.cpp.
References Context, clang::ASTContext::getCommentForDecl(), clang::RawCommentList::getComments(), and clang::ASTContext::getRawCommentList().
| StmtResult Sema::ActOnDoStmt | ( | SourceLocation | DoLoc, |
| Stmt * | Body, | ||
| SourceLocation | WhileLoc, | ||
| SourceLocation | CondLParen, | ||
| Expr * | Cond, | ||
| SourceLocation | CondRParen | ||
| ) |
Definition at line 1252 of file SemaStmt.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().
| Decl * Sema::ActOnEmptyDeclaration | ( | Scope * | S, |
| AttributeList * | AttrList, | ||
| SourceLocation | SemiLoc | ||
| ) |
Handle a C++11 empty-declaration and attribute-declaration.
Definition at line 11967 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::EmptyDecl::Create(), CurContext, and ProcessDeclAttributeList().
| void Sema::ActOnEndOfTranslationUnit | ( | ) |
ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reached and all but the top-level scope is popped.
Definition at line 660 of file Sema.cpp.
References clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), CheckCompleteVariableDeclaration(), CheckDelayedMemberExceptionSpecs(), CheckDelegatingCtorCycles(), checkUndefinedButUsed(), clang::ASTConsumer::CompleteTentativeDefinition(), Consumer, Context, DefineUsedVTables(), DelayedDefaultedMemberExceptionSpecs, DelayedDllExportClasses, DelayedExceptionSpecChecks, DeleteExprs, Diag(), DiagnoseUseOfUnimplementedSelectors(), Diags, E, emitAndClearUnusedLocalTypedefWarnings(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::erase(), clang::ExpectedVariableOrFunction, clang::VarDecl::getActingDefinition(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getConstantArrayType(), clang::Preprocessor::getCurrentModule(), clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::SourceManager::getExpansionLoc(), clang::Preprocessor::getHeaderSearchInfo(), clang::Decl::getLocation(), clang::HeaderSearch::getModuleMap(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::DiagnosticsEngine::hasErrorOccurred(), I, clang::Preprocessor::isCodeCompletionEnabled(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDeleted(), clang::DiagnosticsEngine::isIgnored(), clang::SourceManager::isInMainFile(), clang::Decl::isInvalidDecl(), IsRecordFullyDefined(), clang::Decl::isReferenced(), clang::TagDecl::isUnion(), LangOpts, LateTemplateParserCleanup, LoadExternalWeakUndeclaredIdentifiers(), LookupOrdinaryName, LookupSingleName(), clang::ArrayType::Normal, OpaqueParser, ParsingInitForAutoVars, PendingInstantiations, PerformPendingInstantiations(), PP, clang::ExternalSemaSource::ReadMismatchingDeleteExpressions(), clang::ExternalSemaSource::ReadPendingInstantiations(), clang::ExternalSemaSource::ReadUndefinedButUsed(), RequireCompleteType(), clang::ModuleMap::resolveConflicts(), clang::ModuleMap::resolveExports(), clang::ModuleMap::resolveUses(), clang::SC_Static, clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldRemoveFromUnused(), SourceMgr, Stack, clang::Module::submodule_begin(), clang::Module::submodule_end(), TentativeDefinitions, clang::TU_Module, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, UnusedPrivateFields, and WeakUndeclaredIdentifiers.
Referenced by clang::Parser::ParseTopLevelDecl().
| void Sema::ActOnEnumBody | ( | SourceLocation | EnumLoc, |
| SourceLocation | LBraceLoc, | ||
| SourceLocation | RBraceLoc, | ||
| Decl * | EnumDecl, | ||
| ArrayRef< Decl * > | Elements, | ||
| Scope * | S, | ||
| AttributeList * | Attr | ||
| ) |
Definition at line 14363 of file SemaDecl.cpp.
References CheckAlignasUnderalignment(), CheckForDuplicateEnumValues(), clang::CK_IntegralCast, clang::EnumDecl::completeDefinition(), Context, clang::frontend::CPlusPlus, clang::ImplicitCastExpr::Create(), clang::ASTContext::DependentTy, Diag(), clang::TargetInfo::getCharWidth(), clang::EnumConstantDecl::getInitVal(), clang::EnumDecl::getIntegerType(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getIntWidth(), getLangOpts(), clang::Decl::getLocation(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::ASTContext::getPromotedIntegerType(), clang::TargetInfo::getShortWidth(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::ASTContext::hasSameType(), clang::ASTContext::IntTy, clang::TagDecl::isDependentType(), clang::EnumDecl::isFixed(), clang::Type::isPromotableIntegerType(), isRepresentableIntegerValue(), clang::Type::isSignedIntegerOrEnumerationType(), IsValueInFlagEnum(), LangOpts, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, ProcessDeclAttributeList(), clang::ValueDecl::setType(), clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::ASTContext::UnsignedShortTy, and clang::VK_RValue.
Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().
| Decl * Sema::ActOnEnumConstant | ( | Scope * | S, |
| Decl * | EnumDecl, | ||
| Decl * | LastEnumConstant, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo * | Id, | ||
| AttributeList * | Attrs, | ||
| SourceLocation | EqualLoc, | ||
| Expr * | Val | ||
| ) |
Definition at line 14093 of file SemaDecl.cpp.
References ActOnDocumentableDecl(), CheckEnumConstant(), clang::frontend::CPlusPlus, CurContext, Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), ForRedeclaration, clang::Decl::getAccess(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), getNonFieldDeclScope(), isDeclInScope(), clang::EnumDecl::isScoped(), clang::Decl::isTemplateParameter(), LookupOrdinaryName, LookupSingleName(), ProcessDeclAttributeList(), PushOnScopeChains(), and clang::Decl::setAccess().
| Decl * Sema::ActOnExceptionDeclarator | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
Definition at line 12104 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), BuildExceptionDeclaration(), CurContext, Diag(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForRedeclaration, clang::Declarator::getCXXScopeSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getLocStart(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeForDeclarator(), clang::ASTContext::IntTy, isDeclInScope(), clang::Scope::isDeclScope(), clang::Declarator::isInvalidType(), clang::CXXScopeSpec::isSet(), LookupOrdinaryName, LookupSingleName(), ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setInvalidDecl(), and UPPC_ExceptionType.
| void Sema::ActOnExitFunctionContext | ( | ) |
Definition at line 1172 of file SemaDecl.cpp.
| DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| SourceLocation | TemplateLoc, | ||
| unsigned | TagSpec, | ||
| SourceLocation | KWLoc, | ||
| const CXXScopeSpec & | SS, | ||
| TemplateTy | Template, | ||
| SourceLocation | TemplateNameLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgs, | ||
| SourceLocation | RAngleLoc, | ||
| AttributeList * | Attr | ||
| ) |
Definition at line 7250 of file SemaTemplate.cpp.
References clang::Decl::addAttr(), clang::CXXRecordDecl::bases(), CheckExplicitInstantiationScope(), clang::Attr::clone(), Context, clang::ClassTemplateSpecializationDecl::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::ClassTemplateDecl::findSpecialization(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getAttr(), clang::TargetInfo::getCXXABI(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDefinition(), clang::getDLLAttr(), clang::NamedDecl::getIdentifier(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::AttributeList::getNext(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ASTContext::getTargetInfo(), clang::TemplateDecl::getTemplatedDecl(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTypeDeclType(), clang::SourceLocation::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::CXXScopeSpec::isSet(), clang::Name, clang::ClassTemplateSpecializationDecl::setExternLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), SetNestedNameSpecifier(), clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(), clang::TagDecl::setRBraceLoc(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::TTK_Enum.
| DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| SourceLocation | TemplateLoc, | ||
| unsigned | TagSpec, | ||
| SourceLocation | KWLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| AttributeList * | Attr | ||
| ) |
Definition at line 7491 of file SemaTemplate.cpp.
References clang::AS_none, CheckExplicitInstantiationScope(), Context, Diag(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTContext::getTypeDeclType(), clang::TagDecl::isEnum(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), ScopeSpecifierHasTemplateId(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and TUK_Reference.
| DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| SourceLocation | TemplateLoc, | ||
| Declarator & | D | ||
| ) |
Definition at line 7613 of file SemaTemplate.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), CheckExplicitInstantiationScope(), clang::UnresolvedSetImpl::clear(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::FixItHint::CreateRemoval(), clang::Scope::DeclScope, DeduceTemplateArguments(), Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::Type::getAs(), clang::LookupResult::getAsSingle(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Scope::getFlags(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::UnqualifiedId::getKind(), clang::ParsedAttributes::getList(), clang::Decl::getLocation(), clang::TypeLoc::getLocStart(), clang::DeclSpec::getLocStart(), clang::Declarator::getLocStart(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), clang::Scope::getParent(), clang::VarDecl::getPointOfInstantiation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::VarDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::UnqualifiedId::IK_TemplateId, clang::LookupResult::isAmbiguous(), clang::DeclSpec::isConstexprSpecified(), clang::FunctionDecl::isDefined(), clang::Type::isFunctionType(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::Declarator::isInvalidType(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::MakeDeductionFailureInfo(), makeTemplateArgumentListInfo(), Matches, clang::Name, P, Previous, clang::Result, ScopeSpecifierHasTemplateId(), clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::FunctionDecl::setTemplateSpecializationKind(), clang::UnqualifiedId::TemplateId, clang::Scope::TemplateParamScope, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.
| ExprResult Sema::ActOnExpressionTrait | ( | ExpressionTrait | OET, |
| SourceLocation | KWLoc, | ||
| Expr * | Queried, | ||
| SourceLocation | RParen | ||
| ) |
ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
Definition at line 4474 of file SemaExprCXX.cpp.
References BuildExpressionTrait(), clang::ExprError(), and clang::Result.
| StmtResult Sema::ActOnExprStmt | ( | ExprResult | Arg | ) |
Definition at line 43 of file SemaStmt.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Expr::getExprLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().
Referenced by buildSingleCopyAssignRecursively().
| StmtResult Sema::ActOnExprStmtError | ( | ) |
Definition at line 61 of file SemaStmt.cpp.
References clang::StmtError().
| Decl * Sema::ActOnField | ( | Scope * | S, |
| Decl * | TagD, | ||
| SourceLocation | DeclStart, | ||
| Declarator & | D, | ||
| Expr * | BitfieldWidth | ||
| ) |
ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it.
Definition at line 12926 of file SemaDecl.cpp.
References clang::AS_public, and clang::ICIS_NoInit.
| void Sema::ActOnFields | ( | Scope * | S, |
| SourceLocation | RecLoc, | ||
| Decl * | TagDecl, | ||
| ArrayRef< Decl * > | Fields, | ||
| SourceLocation | LBrac, | ||
| SourceLocation | RBrac, | ||
| AttributeList * | AttrList | ||
| ) |
A field cannot be an Objective-c object
Definition at line 13442 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::frontend::C99, clang::RecordDecl::completeDefinition(), Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::DeclContext::decls(), Diag(), E, clang::end(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getKind(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::TagDecl::getTagKind(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::RecordDecl::hasFlexibleArrayMember(), clang::RecordDecl::hasObjectMember(), clang::RecordDecl::hasVolatileMember(), I, clang::FieldDecl::isAnonymousStructOrUnion(), clang::Type::isBlockPointerType(), clang::CXXRecordDecl::isCLike(), clang::Type::isDependentType(), clang::TagDecl::isDependentType(), clang::QualType::isDestructedType(), clang::DeclContext::isExternCContext(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::QualType::isObjCGCStrong(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isRecordType(), clang::TagDecl::isUnion(), clang::QualType::isVolatileQualified(), clang::CharUnits::isZero(), clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_ExplicitNone, clang::ASTContext::ResetObjCLayout(), clang::RecordDecl::setHasFlexibleArrayMember(), clang::RecordDecl::setHasObjectMember(), clang::RecordDecl::setHasVolatileMember(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), and clang::ValueDecl::setType().
Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().
| Decl * Sema::ActOnFileScopeAsmDecl | ( | Expr * | expr, |
| SourceLocation | AsmLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 14599 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), Context, clang::FileScopeAsmDecl::Create(), CurContext, and clang::ast_matchers::expr.
| void Sema::ActOnFinishCXXInClassMemberInitializer | ( | Decl * | D, |
| SourceLocation | InitLoc, | ||
| Expr * | InitExpr | ||
| ) |
This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template.
Such actions are deferred until the class is complete.
Definition at line 2692 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirectList(), DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::FieldDecl::getInClassInitStyle(), clang::ValueDecl::getType(), clang::ICIS_ListInit, clang::ICIS_NoInit, clang::InitializedEntity::InitializeMember(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), PopFunctionScopeInfo(), clang::FieldDecl::removeInClassInitializer(), clang::FieldDecl::setInClassInitializer(), clang::Decl::setInvalidDecl(), and UPPC_Initializer.
Referenced by InstantiateInClassInitializer().
| void Sema::ActOnFinishCXXMemberDecls | ( | ) |
Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.
Definition at line 9465 of file SemaDeclCXX.cpp.
References CurContext, DelayedDefaultedMemberExceptionSpecs, DelayedExceptionSpecChecks, and clang::Decl::isInvalidDecl().
| void Sema::ActOnFinishCXXMemberSpecification | ( | Scope * | S, |
| SourceLocation | RLoc, | ||
| Decl * | TagDecl, | ||
| SourceLocation | LBrac, | ||
| SourceLocation | RBrac, | ||
| AttributeList * | AttrList | ||
| ) |
Definition at line 6422 of file SemaDeclCXX.cpp.
References ActOnFields(), AdjustDeclIfTemplate(), CheckCompletedCXXClass(), Diag(), FieldCollector, and clang::AttributeList::getNext().
| void Sema::ActOnFinishCXXNonNestedClass | ( | Decl * | D | ) |
Definition at line 9527 of file SemaDeclCXX.cpp.
References DelayedDllExportClasses, clang::TargetInfo::getCXXABI(), getDefaultArgExprsForConstructors(), clang::ASTContext::getTargetInfo(), clang::TargetCXXABI::isMicrosoft(), and ReferenceDllExportedMethods().
Referenced by InstantiateClass().
| void Sema::ActOnFinishDelayedAttribute | ( | Scope * | S, |
| Decl * | D, | ||
| ParsedAttributes & | Attrs | ||
| ) |
ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed.
When we finish delayed parsing of an attribute, we must attach it to the relevant Decl.
Definition at line 11317 of file SemaDecl.cpp.
References clang::ParsedAttributes::getList().
ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method.
The method declaration is now considered finished. There may be a separate ActOnStartOfFunctionDef action later (not necessarily immediately!) for this method, if it was also defined inside the class body.
Definition at line 6622 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), CheckConstructor(), CheckCXXDefaultArguments(), and clang::Decl::isInvalidDecl().
Definition at line 6567 of file SemaDeclCXX.cpp.
References PopDeclContext().
| void Sema::ActOnFinishDelayedMemberInitializers | ( | Decl * | Record | ) |
Definition at line 8991 of file SemaDeclCXX.cpp.
References CheckDelayedMemberExceptionSpecs().
Referenced by InstantiateClass().
|
inline |
Definition at line 4784 of file Sema.h.
References clang::Expr::getExprLoc().
Referenced by ActOnFinishCXXInClassMemberInitializer(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPReductionClause(), BuildBaseInitializer(), BuildDelegatingInitializer(), BuildMemberInitializer(), CheckOpenMPLoop(), FinishOpenMPLinearClause(), MakeFullDiscardedValueExpr(), and MakeFullExpr().
| ExprResult Sema::ActOnFinishFullExpr | ( | Expr * | Expr, |
| SourceLocation | CC, | ||
| bool | DiscardedValue = false, |
||
| bool | IsConstexpr = false, |
||
| bool | IsLambdaInitCaptureInitializer = false |
||
| ) |
Definition at line 6684 of file SemaExprCXX.cpp.
References CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckPlaceholderExpr(), Context, CorrectDelayedTyposInExpr(), CurContext, DiagnoseUnexpandedParameterPack(), clang::ExprError(), forceUnknownAnyToType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getCurLambda(), getLangOpts(), clang::ASTContext::getObjCIdType(), clang::Expr::getType(), IgnoredValueConversions(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isLambdaCallOperator(), MaybeCreateExprWithCleanups(), and clang::ASTContext::UnknownAnyTy.
| StmtResult Sema::ActOnFinishFullStmt | ( | Stmt * | Stmt | ) |
Definition at line 6789 of file SemaExprCXX.cpp.
References MaybeCreateStmtWithCleanups(), and clang::StmtError().
Definition at line 11039 of file SemaDecl.cpp.
Referenced by InstantiateFunctionDefinition().
Definition at line 11043 of file SemaDecl.cpp.
References clang::ASTContext::adjustDeducedFunctionResultType(), clang::TargetCXXABI::canKeyFunctionBeInline(), clang::NSAPI::ClassId_NSObject, Context, clang::frontend::CPlusPlus14, clang::FixItHint::CreateInsertion(), Diag(), clang::sema::AnalysisBasedWarnings::Policy::disableCheckFallThrough(), clang::TypeLoc::getAs(), clang::Type::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::CXXMethodDecl::getCanonicalDecl(), clang::ASTContext::getCurrentKeyFunction(), clang::TargetInfo::getCXXABI(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::FunctionProtoType::getParamTypes(), clang::CXXMethodDecl::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getTargetInfo(), clang::TypeLoc::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::FunctionDecl::hasImplicitReturnZero(), clang::Decl::isCanonicalDecl(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), clang::DeclContext::isDependentContext(), clang::NamedDecl::isExternallyVisible(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isPure(), clang::Type::isRecordType(), clang::Decl::isUnavailable(), clang::Type::isUndeducedType(), clang::Decl::isUsed(), clang::CXXMethodDecl::isVirtual(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), S, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::ASTContext::setNonKeyFunction(), clang::ValueDecl::setType(), ShouldWarnAboutMissingPrototype(), and clang::ASTContext::VoidTy.
| void Sema::ActOnFinishInlineMethodDef | ( | CXXMethodDecl * | D | ) |
Definition at line 10689 of file SemaDecl.cpp.
| void Sema::ActOnFinishKNRParamDeclarations | ( | Scope * | S, |
| Declarator & | D, | ||
| SourceLocation | LocAfterDecls | ||
| ) |
Definition at line 10640 of file SemaDecl.cpp.
References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::Declarator::getFunctionTypeInfo(), clang::IdentifierInfo::getName(), clang::ASTContext::getPrintingPolicy(), clang::DeclaratorChunk::FunctionTypeInfo::hasPrototype, clang::DeclaratorChunk::ParamInfo::Ident, clang::DeclaratorChunk::ParamInfo::IdentLoc, clang::Declarator::KNRTypeListContext, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::Declarator::SetIdentifier(), clang::DeclSpec::SetRangeEnd(), clang::DeclSpec::SetRangeStart(), clang::DeclSpec::SetTypeSpecType(), and clang::DeclSpec::TST_int.
| Decl * Sema::ActOnFinishLinkageSpecification | ( | Scope * | S, |
| Decl * | LinkageSpec, | ||
| SourceLocation | RBraceLoc | ||
| ) |
ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec.
If RBraceLoc is valid, it's the position of the closing '}' brace in a linkage specification that uses braces.
Definition at line 11956 of file SemaDeclCXX.cpp.
References clang::SourceLocation::isValid(), PopDeclContext(), and clang::LinkageSpecDecl::setRBraceLoc().
| void Sema::ActOnFinishNamespaceDef | ( | Decl * | Dcl, |
| SourceLocation | RBrace | ||
| ) |
ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
Decl is the DeclTy returned by ActOnStartNamespaceDef.
Definition at line 7328 of file SemaDeclCXX.cpp.
References clang::Decl::hasAttr(), PopDeclContext(), PopPragmaVisibility(), and clang::NamespaceDecl::setRBraceLoc().
| Sema::DeclGroupPtrTy Sema::ActOnFinishObjCImplementation | ( | Decl * | ObjCImpDecl, |
| ArrayRef< Decl * > | Decls | ||
| ) |
Definition at line 1975 of file SemaDeclObjC.cpp.
References BuildDeclaratorGroup(), clang::Decl::getDeclContext(), clang::DeclContext::isFileContext(), and clang::Decl::setTopLevelDeclInObjCContainer().
| void Sema::ActOnFinishOfCompoundStmt | ( | ) |
Definition at line 323 of file SemaStmt.cpp.
| StmtResult Sema::ActOnFinishSEHFinallyBlock | ( | SourceLocation | Loc, |
| Stmt * | Block | ||
| ) |
Definition at line 3719 of file SemaStmt.cpp.
References Context, and clang::SEHFinallyStmt::Create().
| StmtResult Sema::ActOnFinishSwitchStmt | ( | SourceLocation | SwitchLoc, |
| Stmt * | Switch, | ||
| Stmt * | Body | ||
| ) |
Definition at line 729 of file SemaStmt.cpp.
References AdjustAPSInt(), checkCaseValue(), CheckConvertedConstantExpression(), clang::CK_IntegralCast, CmpCaseVals(), CmpEnumVals(), Context, clang::frontend::CPlusPlus11, Diag(), E, clang::EnumDecl::enumerators(), EqEnumVals(), clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateKnownConstInt(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::SwitchStmt::getCond(), clang::EnumType::getDecl(), clang::DefaultStmt::getDefaultLoc(), clang::Expr::getExprLoc(), clang::ASTContext::getIntWidth(), clang::CaseStmt::getLHS(), clang::SwitchCase::getNextSwitchCase(), clang::CaseStmt::getRHS(), clang::SwitchStmt::getSwitchCaseList(), clang::Expr::getType(), GetTypeBeforeIntegralPromotion(), I, clang::Expr::IgnoreParenCasts(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isKnownToHaveBooleanValue(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Expr::SE_AllowSideEffects, clang::SwitchStmt::setAllEnumCasesCovered(), clang::SwitchStmt::setBody(), clang::CaseStmt::setLHS(), clang::CaseStmt::setRHS(), ShouldDiagnoseSwitchCaseNotInEnum(), and clang::StmtError().
| void Sema::ActOnForEachDeclStmt | ( | DeclGroupPtrTy | Decl | ) |
Definition at line 81 of file SemaStmt.cpp.
References clang::ast_matchers::decl, Diag(), clang::OpaquePtr< PtrTy >::get(), clang::QualType::getLocalQualifiers(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::DeclGroupRef::getSingleDecl(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), clang::DeclGroupRef::isNull(), clang::DeclGroupRef::isSingleDecl(), clang::Qualifiers::OCL_Strong, clang::VarDecl::setARCPseudoStrong(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::ast_matchers::type, and clang::QualType::withConst().
| StmtResult Sema::ActOnForEachLValueExpr | ( | Expr * | E | ) |
In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expression.
Bind it up as a full-expression.
Definition at line 1661 of file SemaStmt.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().
| StmtResult Sema::ActOnForStmt | ( | SourceLocation | ForLoc, |
| SourceLocation | LParenLoc, | ||
| Stmt * | First, | ||
| FullExprArg | Second, | ||
| Decl * | SecondVar, | ||
| FullExprArg | Third, | ||
| SourceLocation | RParenLoc, | ||
| Stmt * | Body | ||
| ) |
Definition at line 1607 of file SemaStmt.cpp.
References Context, clang::frontend::CPlusPlus, Diag(), clang::Sema::FullExprArg::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isLocalVarDecl(), clang::Sema::FullExprArg::release(), and clang::StmtError().
Referenced by buildSingleCopyAssignRecursively().
| Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration | ( | SourceLocation | Loc, |
| IdentifierInfo ** | IdentList, | ||
| SourceLocation * | IdentLocs, | ||
| ArrayRef< ObjCTypeParamList * > | TypeParamLists, | ||
| unsigned | NumElts | ||
| ) |
Definition at line 2919 of file SemaDeclObjC.cpp.
References BuildDeclaratorGroup(), CheckObjCDeclScope(), checkTypeParamListConsistency(), Context, clang::ObjCInterfaceDecl::Create(), CurContext, Diag(), ForRedeclaration, clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), PushOnScopeChains(), clang::ObjCContainerDecl::setAtEndRange(), and TUScope.
| Sema::DeclGroupPtrTy Sema::ActOnForwardProtocolDeclaration | ( | SourceLocation | AtProtoclLoc, |
| ArrayRef< IdentifierLocPair > | IdentList, | ||
| AttributeList * | attrList | ||
| ) |
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
Definition at line 1675 of file SemaDeclObjC.cpp.
References BuildDeclaratorGroup(), CheckObjCDeclScope(), Context, clang::ObjCProtocolDecl::Create(), CurContext, ForRedeclaration, LookupProtocol(), mergeDeclAttributes(), ProcessDeclAttributeList(), PushOnScopeChains(), and TUScope.
| NamedDecl * Sema::ActOnFriendFunctionDecl | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParams | ||
| ) |
Definition at line 12489 of file SemaDeclCXX.cpp.
References ActOnFunctionDeclarator(), clang::DeclContext::addDecl(), adjustContextForLocalExternDecl(), clang::AS_public, CheckFriendAccess(), clang::CXXScopeSpec::clear(), clang::LookupResult::clear(), computeDeclContext(), clang::FriendDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseUnexpandedParameterPack(), Diags, clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), ForRedeclaration, functionDeclHasDefaultArgument(), clang::SourceRange::getBegin(), clang::DeclarationNameInfo::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::Scope::getFnParent(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::DeclContext::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), getScopeForDeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::LookupResult::Filter::hasNext(), clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_ConstructorTemplateId, clang::UnqualifiedId::IK_ConversionFunctionId, clang::UnqualifiedId::IK_DestructorName, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::UnqualifiedId::IK_TemplateId, clang::DeclContext::InEnclosingNamespaceSetOf(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::DeclContext::isTransparentContext(), clang::CXXScopeSpec::isValid(), LookupLocalFriendName, LookupName(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), Previous, PushOnScopeChains(), RequireCompleteDeclContext(), S, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Scope::setEntity(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::FriendDecl::setUnsupportedFriend(), and UPPC_FriendDeclaration.
| Decl * Sema::ActOnFriendTypeDecl | ( | Scope * | S, |
| const DeclSpec & | DS, | ||
| MultiTemplateParamsArg | TempParams | ||
| ) |
Handle a friend type declaration.
This works in tandem with ActOnTag.
Notes on friend class templates:
We generally treat friend class declarations as if they were declaring a class. So, for example, the elaborated type specifier in a friend declaration is required to obey the restrictions of a class-head (i.e. no typedefs in the scope chain), template parameters are required to match up with simple template-ids, &c. However, unlike when declaring a template specialization, it's okay to refer to a template specialization without an empty template parameter declaration, e.g. friend class A<T>::B<unsigned>; We permit this as a special case; if there are any template parameters present at all, require proper matching, i.e. template <> template <class T> friend class A<int>::B;
Definition at line 12420 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckFriendTypeDecl(), clang::FriendTemplateDecl::Create(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), clang::DeclSpec::getFriendSpecLoc(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Type::isElaboratedTypeSpecifier(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::MemberContext, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), and UPPC_FriendDeclaration.
| NamedDecl * Sema::ActOnFunctionDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| bool & | AddToScope | ||
| ) |
Definition at line 7377 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::ASTContext::adjustExceptionSpec(), clang::anyDependentTemplateArguments(), clang::AS_public, clang::Type::castAs(), clang::CC_X86StdCall, checkAttributesAfterMerging(), checkDLLAttributeRedeclaration(), checkIsValidOpenCLKernelParameter(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus14, clang::FunctionTemplateDecl::Create(), clang::ClassScopeFunctionSpecializationDecl::Create(), clang::FixItHint::CreateInsertion(), CreateNewFunctionDecl(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::DeclarationName::CXXDestructorName, clang::ASTContext::DependentTy, Diag(), DiagnoseInvalidRedeclaration(), clang::Decl::dropAttr(), E, clang::LookupResult::empty(), clang::EST_BasicNoexcept, clang::FDK_Declaration, clang::FDK_Defaulted, clang::FDK_Definition, clang::FDK_Deleted, clang::LookupResult::FoundOverloaded, clang::FTIHasNonVoidParameters(), clang::Decl::getAccess(), clang::QualType::getAddressSpace(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::Type::getAs(), clang::Declarator::getAsmLabel(), clang::FunctionType::ExtInfo::getCC(), clang::DeclSpec::getConceptSpecLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclarationName::getCXXOverloadedOperator(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::ASTContext::getDefaultCallingConvention(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecRange(), clang::DeclSpec::getExplicitSpecLoc(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getFunctionDefinitionKind(), getFunctionStorageClass(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getName(), clang::FunctionType::getNameForCallConv(), clang::DeclarationName::getNameKind(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getParamTypes(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionTemplateDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::FunctionTemplateSpecializationInfo::getTemplate(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::Decl::hasAttr(), clang::FunctionProtoType::hasExceptionSpec(), I, clang::Decl::IDNS_Ordinary, clang::UnqualifiedId::IK_TemplateId, clang::DeclSpec::isConceptSpecified(), clang::DeclSpec::isConstexprSpecified(), clang::Declarator::isCtorOrDtor(), isDeclExternC(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclSpec::isExplicitSpecified(), clang::NamedDecl::isExternallyVisible(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::Declarator::isFirstDeclarationOfMember(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionNoProtoType(), clang::Type::isFunctionType(), isIncompleteDeclExternC(), clang::Decl::isInIdentifierNamespace(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::FunctionDecl::isMain(), clang::DeclSpec::isModulePrivateSpecified(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::DeclSpec::isNoreturnSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::Type::isReferenceType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isScalarType(), clang::CXXScopeSpec::isSet(), clang::Declarator::isStaticMember(), clang::DeclContext::isTranslationUnit(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Type::isVariablyModifiedType(), clang::DeclSpec::isVirtualSpecified(), clang::Type::isVoidType(), clang::TemplateIdAnnotation::LAngleLoc, clang::Name, clang::None, clang::TemplateIdAnnotation::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::LangAS::opencl_constant, clang::LangAS::opencl_global, clang::LangAS::opencl_local, clang::DeclaratorChunk::ParamInfo::Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::FunctionDecl::params(), clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::TemplateIdAnnotation::RAngleLoc, clang::Result, S, clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::ASTContext::setcudaConfigureCallDecl(), clang::Decl::setDeclContext(), clang::FunctionDecl::setDeclsInPrototypeScope(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setDeletedAsWritten(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::FunctionDecl::setPure(), clang::FunctionDecl::setRangeEnd(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::Declarator::setRedeclaration(), clang::ParmVarDecl::setScopeInfo(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::Decl::setTopLevelDeclInObjCContainer(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), shouldConsiderLinkage(), clang::TemplateArgumentListInfo::size(), clang::supportsVariadicCall(), clang::UnqualifiedId::TemplateId, clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().
Referenced by ActOnFriendFunctionDecl(), and DiagnoseInvalidRedeclaration().
| StmtResult Sema::ActOnGCCAsmStmt | ( | SourceLocation | AsmLoc, |
| bool | IsSimple, | ||
| bool | IsVolatile, | ||
| unsigned | NumOutputs, | ||
| unsigned | NumInputs, | ||
| IdentifierInfo ** | Names, | ||
| MultiExprArg | Constraints, | ||
| MultiExprArg | Exprs, | ||
| Expr * | AsmString, | ||
| MultiExprArg | Clobbers, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 141 of file SemaStmtAsm.cpp.
References clang::GCCAsmStmt::AnalyzeAsmString(), CheckAsmLValue(), checkExprMemoryConstraintCompat(), CheckNakedParmReference(), clang::CK_IntegralCast, clang::CK_IntegralToBoolean, Context, clang::FixItHint::CreateReplacement(), clang::DeclAttrsMatchCUDAMode(), Diag(), E, clang::Expr::EvaluateAsInt(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CharSourceRange::getBegin(), clang::TargetInfo::ConstraintInfo::getConstraintStr(), clang::GCCAsmStmt::getInputExpr(), clang::StringLiteral::getLocStart(), clang::GCCAsmStmt::AsmStringPiece::getModifier(), clang::IdentifierInfo::getName(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::GCCAsmStmt::AsmStringPiece::getOperandNo(), clang::GCCAsmStmt::getOutputExpr(), clang::GCCAsmStmt::AsmStringPiece::getRange(), clang::StringLiteral::getString(), clang::GCCAsmStmt::AsmStringPiece::getString(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameType(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), I, clang::Expr::IgnoreParenNoopCasts(), clang::StringLiteral::isAscii(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Expr::isEvaluatable(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isModifiableLvalue(), clang::GCCAsmStmt::AsmStringPiece::isOperand(), isOperandMentioned(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), clang::TargetInfo::isValidClobber(), clang::Expr::isValueDependent(), clang::Type::isVoidType(), clang::Expr::MLV_ArrayType, clang::Expr::MLV_IncompleteType, clang::Expr::MLV_IncompleteVoidType, clang::Expr::MLV_LValueCast, clang::Expr::MLV_Valid, clang::Result, clang::GCCAsmStmt::setInputExpr(), clang::StmtError(), clang::TargetInfo::validateConstraintModifier(), clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateInputSize(), clang::TargetInfo::validateOutputConstraint(), and clang::TargetInfo::validateOutputSize().
| ExprResult Sema::ActOnGenericSelectionExpr | ( | SourceLocation | KeyLoc, |
| SourceLocation | DefaultLoc, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | ControllingExpr, | ||
| ArrayRef< ParsedType > | ArgTypes, | ||
| ArrayRef< Expr * > | ArgExprs | ||
| ) |
Definition at line 1331 of file SemaExpr.cpp.
| ExprResult Sema::ActOnGNUNullExpr | ( | SourceLocation | TokenLoc | ) |
Definition at line 11958 of file SemaExpr.cpp.
References Context, clang::TargetInfo::getIntWidth(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::TargetInfo::getPointerWidth(), clang::ASTContext::getTargetInfo(), clang::if(), clang::ASTContext::IntTy, clang::ASTContext::LongLongTy, and clang::ASTContext::LongTy.
| StmtResult Sema::ActOnGotoStmt | ( | SourceLocation | GotoLoc, |
| SourceLocation | LabelLoc, | ||
| LabelDecl * | TheDecl | ||
| ) |
Definition at line 2585 of file SemaStmt.cpp.
References Context, and clang::Decl::markUsed().
| ExprResult Sema::ActOnIdExpression | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| UnqualifiedId & | Id, | ||
| bool | HasTrailingLParen, | ||
| bool | IsAddressOfOperand, | ||
| std::unique_ptr< CorrectionCandidateCallback > | CCC = nullptr, |
||
| bool | IsInlineAsmIdentifier = false, |
||
| Token * | KeywordReplacement = nullptr |
||
| ) |
Definition at line 2046 of file SemaExpr.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::begin(), clang::LookupResult::clear(), Context, clang::DeclarationName::CXXConversionFunctionName, E, clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getCXXNameType(), clang::LookupResult::getFoundDecl(), clang::UnqualifiedId::getKind(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::IK_ImplicitSelfParam, clang::UnqualifiedId::IK_TemplateId, clang::LookupResult::isAmbiguous(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::LookupResult::isOverloadedResult(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isUnresolvableResult(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), clang::TemplateIdAnnotation::Kind, clang::Name, clang::None, clang::LookupResult::NotFoundInCurrentInstantiation, recoverFromMSUnqualifiedLookup(), clang::Token::setIdentifierInfo(), clang::Token::setKind(), clang::Token::setLocation(), clang::Token::startToken(), State, clang::UnqualifiedId::TemplateId, and clang::TNK_Var_template.
Referenced by HandleExtVectorTypeAttr().
| StmtResult Sema::ActOnIfStmt | ( | SourceLocation | IfLoc, |
| FullExprArg | CondVal, | ||
| Decl * | CondVar, | ||
| Stmt * | ThenVal, | ||
| SourceLocation | ElseLoc, | ||
| Stmt * | ElseVal | ||
| ) |
Definition at line 492 of file SemaStmt.cpp.
References clang::ASTContext::BoolTy, Context, clang::Sema::FullExprArg::release(), and clang::VK_RValue.
| StmtResult Sema::ActOnIndirectGotoStmt | ( | SourceLocation | GotoLoc, |
| SourceLocation | StarLoc, | ||
| Expr * | DestExp | ||
| ) |
Definition at line 2594 of file SemaStmt.cpp.
References Context, E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::StmtError(), clang::ASTContext::VoidTy, and clang::CanQual< T >::withConst().
| void Sema::ActOnInitializerError | ( | Decl * | D | ) |
ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to return to some form of sanity.
Definition at line 9626 of file SemaDecl.cpp.
References Context, clang::ASTContext::getBaseElementType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().
| ExprResult Sema::ActOnInitList | ( | SourceLocation | LBraceLoc, |
| MultiExprArg | InitArgList, | ||
| SourceLocation | RBraceLoc | ||
| ) |
Definition at line 5441 of file SemaExpr.cpp.
References Context, E, clang::ActionResult< PtrTy, CompressInvalid >::get(), I, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::setType(), and clang::ASTContext::VoidTy.
| ExprResult Sema::ActOnInstanceMessage | ( | Scope * | S, |
| Expr * | Receiver, | ||
| Selector | Sel, | ||
| SourceLocation | LBracLoc, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| SourceLocation | RBracLoc, | ||
| MultiExprArg | Args | ||
| ) |
Definition at line 3009 of file SemaExprObjC.cpp.
References BuildInstanceMessage(), Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Selector::isNull(), MaybeConvertParenListExprToParenExpr(), RemoveSelectorFromWarningCache(), RespondsToSelectorSel, clang::Result, and clang::ASTContext::Selectors.
| ExprResult Sema::ActOnIntegerConstant | ( | SourceLocation | Loc, |
| uint64_t | Val | ||
| ) |
Definition at line 3114 of file SemaExpr.cpp.
References Context, clang::IntegerLiteral::Create(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getTargetInfo(), and clang::ASTContext::IntTy.
Referenced by ActOnOpenMPReductionClause(), BuildEmptyCXXFoldExpr(), CheckOpenMPLoop(), and FinishOpenMPLinearClause().
| Decl * Sema::ActOnIvar | ( | Scope * | S, |
| SourceLocation | DeclStart, | ||
| Declarator & | D, | ||
| Expr * | BitfieldWidth, | ||
| tok::ObjCKeywordKind | Visibility | ||
| ) |
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it.
Definition at line 13294 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), Context, clang::ObjCIvarDecl::Create(), Diag(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::TypeSourceInfo::getType(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::ObjCIvarDecl::None, clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setModulePrivate(), and TranslateIvarVisibility().
| StmtResult Sema::ActOnLabelStmt | ( | SourceLocation | IdentLoc, |
| LabelDecl * | TheDecl, | ||
| SourceLocation | ColonLoc, | ||
| Stmt * | SubStmt | ||
| ) |
Definition at line 460 of file SemaStmt.cpp.
References Context, Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::LabelDecl::getStmt(), clang::LabelDecl::isGnuLocal(), clang::LabelDecl::isMSAsmLabel(), clang::Decl::setLocation(), clang::LabelDecl::setLocStart(), and clang::LabelDecl::setStmt().
| void Sema::ActOnLambdaError | ( | SourceLocation | StartLoc, |
| Scope * | CurScope, | ||
| bool | IsInstantiation = false |
||
| ) |
ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda.
Definition at line 1116 of file SemaLambda.cpp.
References clang::RecordDecl::fields(), clang::Decl::getLocation(), clang::sema::LambdaScopeInfo::Lambda, and clang::Decl::setInvalidDecl().
| ExprResult Sema::ActOnLambdaExpr | ( | SourceLocation | StartLoc, |
| Stmt * | Body, | ||
| Scope * | CurScope | ||
| ) |
ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
Definition at line 1460 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::CallOperator.
|
inline |
Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference.
Definition at line 5010 of file Sema.h.
References buildLambdaInitCaptureInitialization(), clang::CopyInit, and clang::OpaquePtr< QualType >::make().
| void Sema::ActOnLastBitfield | ( | SourceLocation | DeclLoc, |
| SmallVectorImpl< Decl * > & | AllIvarDecls | ||
| ) |
ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit char :0 ivar to the end of that interface.
Definition at line 13408 of file SemaDecl.cpp.
References clang::ASTContext::CharTy, Context, clang::IntegerLiteral::Create(), clang::ObjCIvarDecl::Create(), clang::FieldDecl::getBitWidthValue(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeSize(), clang::ASTContext::IntTy, clang::FieldDecl::isBitField(), and clang::ObjCIvarDecl::Private.
| ExprResult Sema::ActOnMemberAccessExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| UnqualifiedId & | Id, | ||
| Decl * | ObjCImpDecl | ||
| ) |
The main callback when the parser finds something like expression .
[nested-name-specifier] identifier expression -> [nested-name-specifier] identifier where 'identifier' encompasses a fairly broad spectrum of possibilities, including destructor and operator references.
| OpKind | either tok::arrow or tok::period |
| ObjCImpDecl | the current Objective-C @implementation decl; this is an ugly hack around the fact that Objective-C @implementations aren't properly put in the context chain |
Definition at line 1630 of file SemaExprMember.cpp.
References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::UnqualifiedId::getKind(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Expr::getType(), clang::UnqualifiedId::IK_ConstructorName, clang::DeclarationName::isDependentName(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::Name, clang::Result, and S.
| MemInitResult Sema::ActOnMemInitializer | ( | Decl * | ConstructorD, |
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | MemberOrBase, | ||
| ParsedType | TemplateTypeTy, | ||
| const DeclSpec & | DS, | ||
| SourceLocation | IdLoc, | ||
| SourceLocation | LParenLoc, | ||
| ArrayRef< Expr * > | Args, | ||
| SourceLocation | RParenLoc, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
Handle a C++ member initializer using parentheses syntax.
Definition at line 2805 of file SemaDeclCXX.cpp.
References BuildMemInitializer(), and Context.
| MemInitResult Sema::ActOnMemInitializer | ( | Decl * | ConstructorD, |
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | MemberOrBase, | ||
| ParsedType | TemplateTypeTy, | ||
| const DeclSpec & | DS, | ||
| SourceLocation | IdLoc, | ||
| Expr * | InitList, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
Handle a C++ member initializer using braced-init-list syntax.
Definition at line 2789 of file SemaDeclCXX.cpp.
References BuildMemInitializer().
| void Sema::ActOnMemInitializers | ( | Decl * | ConstructorDecl, |
| SourceLocation | ColonLoc, | ||
| ArrayRef< CXXCtorInitializer * > | MemInits, | ||
| bool | AnyErrors | ||
| ) |
ActOnMemInitializers - Handle the member initializers for a constructor.
Definition at line 4234 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), Context, Diag(), DiagnoseBaseOrMemInitializerOrder(), GetKeyForMember(), clang::CXXCtorInitializer::getSourceLocation(), clang::CXXCtorInitializer::getSourceRange(), clang::CXXCtorInitializer::isAnyMemberInitializer(), clang::CXXCtorInitializer::isBaseInitializer(), clang::CXXCtorInitializer::isDelegatingInitializer(), SetCtorInitializers(), SetDelegatingInitializer(), and clang::CXXCtorInitializer::setSourceOrder().
Referenced by InstantiateMemInitializers().
| Decl * Sema::ActOnMethodDeclaration | ( | Scope * | S, |
| SourceLocation | BeginLoc, | ||
| SourceLocation | EndLoc, | ||
| tok::TokenKind | MethodType, | ||
| ObjCDeclSpec & | ReturnQT, | ||
| ParsedType | ReturnType, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| Selector | Sel, | ||
| ObjCArgInfo * | ArgInfo, | ||
| DeclaratorChunk::ParamInfo * | CParamInfo, | ||
| unsigned | CNumArgs, | ||
| AttributeList * | AttrList, | ||
| tok::ObjCKeywordKind | MethodImplKind, | ||
| bool | isVariadic, | ||
| bool | MethodDefinition | ||
| ) |
Definition at line 4129 of file SemaDeclObjC.cpp.
References ActOnDocumentableDecl(), clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), CheckARCMethodDecl(), CheckFunctionReturnType(), CheckObjCMethodOverrides(), CheckParameter(), CheckRelatedResultTypeCompatibility(), Context, clang::ObjCMethodDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, CvtQTToAstBitMask(), Diag(), ForRedeclaration, clang::ASTContext::getAdjustedParameterType(), clang::TypeLoc::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::Selector::getNumArgs(), clang::ObjCDeclSpec::getObjCDeclQualifier(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ValueDecl::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), IdResolver, clang::ObjCMethodDecl::isClassMethod(), clang::Scope::isDeclScope(), clang::ObjCMethodDecl::isInstanceMethod(), clang::DeclContext::isObjCContainer(), clang::Type::isObjCIndependentClassType(), clang::LookupResult::isSingleResult(), LangOpts, LookupName(), LookupOrdinaryName, mergeInterfaceMethodToImpl(), clang::Name, clang::Sema::ObjCArgInfo::Name, clang::Sema::ObjCArgInfo::NameLoc, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::Optional, clang::DeclaratorChunk::ParamInfo::Param, ProcessDeclAttributeList(), clang::ObjCMethodDecl::Required, RTC_Compatible, clang::SC_None, clang::Decl::setDeclContext(), clang::Decl::setInvalidDecl(), clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCMethodScopeInfo(), clang::ObjCMethodDecl::SetRelatedResultType(), clang::AttributedType::stripOuterNullability(), and TUScope.
| void Sema::ActOnModuleBegin | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod | ||
| ) |
The parsed has entered a submodule.
Definition at line 14719 of file SemaDecl.cpp.
References checkModuleImportContext(), CurContext, getLangOpts(), and clang::VisibleModuleSet::setVisible().
Referenced by clang::Parser::ParseTopLevelDecl().
| void Sema::ActOnModuleEnd | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod | ||
| ) |
The parser has left a submodule.
Definition at line 14727 of file SemaDecl.cpp.
References checkModuleImportContext(), CurContext, getLangOpts(), and clang::VisibleModuleSet::setVisible().
Referenced by clang::Parser::ParseTopLevelDecl().
| DeclResult Sema::ActOnModuleImport | ( | SourceLocation | AtLoc, |
| SourceLocation | ImportLoc, | ||
| ModuleIdPath | Path | ||
| ) |
The parser has processed a module import declaration.
| AtLoc | The location of the '@' symbol, if any. |
| ImportLoc | The location of the 'import' keyword. |
| Path | The module access path. |
Definition at line 14649 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::Module::AllVisible, checkModuleImportContext(), Context, clang::ImportDecl::Create(), CurContext, clang::LangOptions::CurrentModule, Diag(), clang::Module::getFullModuleName(), getLangOpts(), getModuleLoader(), clang::Module::getTopLevelModuleName(), clang::ASTContext::getTranslationUnitDecl(), I, clang::LangOptions::ImplementationOfModule, clang::SourceLocation::isValid(), clang::ModuleLoader::loadModule(), clang::Module::Parent, and clang::VisibleModuleSet::setVisible().
| void Sema::ActOnModuleInclude | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod | ||
| ) |
The parser has processed a module import translated from a #include or similar preprocessing directive.
Definition at line 14692 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::Module::AllVisible, checkModuleImportContext(), Consumer, clang::ImportDecl::CreateImplicit(), CurContext, getASTContext(), getModuleLoader(), getSourceManager(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTConsumer::HandleImplicitImportDecl(), clang::SourceManager::isWrittenInMainFile(), clang::ModuleLoader::makeModuleVisible(), clang::VisibleModuleSet::setVisible(), clang::TU_Module, and TUKind.
Referenced by clang::Parser::ParseTopLevelDecl().
| StmtResult Sema::ActOnMSAsmStmt | ( | SourceLocation | AsmLoc, |
| SourceLocation | LBraceLoc, | ||
| ArrayRef< Token > | AsmToks, | ||
| StringRef | AsmString, | ||
| unsigned | NumOutputs, | ||
| unsigned | NumInputs, | ||
| ArrayRef< StringRef > | Constraints, | ||
| ArrayRef< StringRef > | Clobbers, | ||
| ArrayRef< Expr * > | Exprs, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 725 of file SemaStmtAsm.cpp.
References Context.
| StmtResult Sema::ActOnMSDependentExistsStmt | ( | SourceLocation | KeywordLoc, |
| bool | IsIfExists, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name, | ||
| Stmt * | Nested | ||
| ) |
Definition at line 3749 of file SemaStmt.cpp.
References Context, and clang::CXXScopeSpec::getWithLocInContext().
| Decl * Sema::ActOnNamespaceAliasDef | ( | Scope * | CurScope, |
| SourceLocation | NamespaceLoc, | ||
| SourceLocation | AliasLoc, | ||
| IdentifierInfo * | Alias, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | Ident | ||
| ) |
Definition at line 8660 of file SemaDeclCXX.cpp.
References clang::LookupResult::clear(), Context, clang::NamespaceAliasDecl::Create(), CurContext, Diag(), DiagnoseTemplateParameterShadow(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), FilterLookupForScope(), ForRedeclaration, clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), getNamespaceDecl(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), isVisible(), LookupName(), LookupNamespaceName, LookupOrdinaryName, LookupParsedName(), PushOnScopeChains(), clang::Redeclarable< decl_type >::setPreviousDecl(), and TryNamespaceTypoCorrection().
| ExprResult Sema::ActOnNoexceptExpr | ( | SourceLocation | KeyLoc, |
| SourceLocation | LParen, | ||
| Expr * | Operand, | ||
| SourceLocation | RParen | ||
| ) |
Definition at line 6140 of file SemaExprCXX.cpp.
References BuildCXXNoexceptExpr().
| Decl * Sema::ActOnNonTypeTemplateParameter | ( | Scope * | S, |
| Declarator & | D, | ||
| unsigned | Depth, | ||
| unsigned | Position, | ||
| SourceLocation | EqualLoc, | ||
| Expr * | DefaultArg | ||
| ) |
Definition at line 665 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, Context, clang::NonTypeTemplateParmDecl::Create(), Depth, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getLocStart(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::Declarator::hasEllipsis(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Scope::isTemplateParamScope(), maybeDiagnoseTemplateParameterShadow(), Position, clang::Decl::setAccess(), clang::NonTypeTemplateParmDecl::setDefaultArgument(), and clang::Decl::setInvalidDecl().
| StmtResult Sema::ActOnNullStmt | ( | SourceLocation | SemiLoc, |
| bool | HasLeadingEmptyMacro = false |
||
| ) |
Definition at line 66 of file SemaStmt.cpp.
References Context.
| ExprResult Sema::ActOnNumericConstant | ( | const Token & | Tok, |
| Scope * | UDLScope = nullptr |
||
| ) |
Definition at line 3180 of file SemaExpr.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::StringLiteral::Ascii, BuildFloatingLiteral(), clang::frontend::C99, clang::ASTContext::CharTy, clang::CK_FloatingCast, Context, clang::frontend::CPlusPlus, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::ASTContext::DeclarationNames, Diag(), clang::ASTContext::DoubleTy, clang::ExprError(), clang::ASTContext::FloatTy, clang::IdentifierTable::get(), clang::ASTContext::getComplexType(), clang::ASTContext::getConstantArrayType(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::TargetInfo::getIntMaxTWidth(), clang::ASTContext::getIntTypeForBitwidth(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getIntWidth(), clang::Token::getLength(), clang::Token::getLocation(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), getUDSuffixLoc(), I, clang::ASTContext::Idents, clang::if(), clang::ASTContext::IntTy, clang::QualType::isNull(), Length, clang::ASTContext::LongDoubleTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::None, clang::ArrayType::Normal, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, and clang::CanQual< T >::withConst().
| StmtResult Sema::ActOnObjCAtCatchStmt | ( | SourceLocation | AtLoc, |
| SourceLocation | RParen, | ||
| Decl * | Parm, | ||
| Stmt * | Body | ||
| ) |
Definition at line 3333 of file SemaStmt.cpp.
References Context, clang::Decl::isInvalidDecl(), and clang::StmtError().
| StmtResult Sema::ActOnObjCAtFinallyStmt | ( | SourceLocation | AtLoc, |
| Stmt * | Body | ||
| ) |
Definition at line 3344 of file SemaStmt.cpp.
References Context.
| ExprResult Sema::ActOnObjCAtSynchronizedOperand | ( | SourceLocation | atLoc, |
| Expr * | operand | ||
| ) |
Definition at line 3404 of file SemaStmt.cpp.
References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVoidType(), and clang::ast_matchers::type.
| StmtResult Sema::ActOnObjCAtSynchronizedStmt | ( | SourceLocation | AtLoc, |
| Expr * | SynchExpr, | ||
| Stmt * | SynchBody | ||
| ) |
Definition at line 3440 of file SemaStmt.cpp.
References Context.
| StmtResult Sema::ActOnObjCAtThrowStmt | ( | SourceLocation | AtLoc, |
| Expr * | Throw, | ||
| Scope * | CurScope | ||
| ) |
Definition at line 3386 of file SemaStmt.cpp.
References Diag(), clang::Scope::getParent(), clang::Scope::isAtCatchScope(), and clang::StmtError().
| StmtResult Sema::ActOnObjCAtTryStmt | ( | SourceLocation | AtLoc, |
| Stmt * | Try, | ||
| MultiStmtArg | Catch, | ||
| Stmt * | Finally | ||
| ) |
Definition at line 3349 of file SemaStmt.cpp.
References Context, clang::ObjCAtTryStmt::Create(), and Diag().
| StmtResult Sema::ActOnObjCAutoreleasePoolStmt | ( | SourceLocation | AtLoc, |
| Stmt * | Body | ||
| ) |
Definition at line 3458 of file SemaStmt.cpp.
References Context.
| ExprResult Sema::ActOnObjCBoolLiteral | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind | ||
| ) |
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
Definition at line 14650 of file SemaExpr.cpp.
References Context, clang::IdentifierTable::get(), clang::ASTContext::getBOOLDecl(), clang::ASTContext::getBOOLType(), getCurScope(), clang::ASTContext::Idents, LookupName(), LookupOrdinaryName, clang::ASTContext::ObjCBuiltinBoolTy, clang::Result, and clang::ASTContext::setBOOLDecl().
| ExprResult Sema::ActOnObjCBoolLiteral | ( | SourceLocation | AtLoc, |
| SourceLocation | ValueLoc, | ||
| bool | Value | ||
| ) |
Definition at line 365 of file SemaExprObjC.cpp.
References clang::ASTContext::BoolTy, clang::CK_IntegralToBoolean, Context, clang::frontend::CPlusPlus, and clang::ActionResult< PtrTy, CompressInvalid >::get().
| ExprResult Sema::ActOnObjCBridgedCast | ( | Scope * | S, |
| SourceLocation | LParenLoc, | ||
| ObjCBridgeCastKind | Kind, | ||
| SourceLocation | BridgeKeywordLoc, | ||
| ParsedType | Type, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | SubExpr | ||
| ) |
Definition at line 4303 of file SemaExprObjC.cpp.
References BuildObjCBridgedCast(), CheckTollFreeBridgeCast(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), and clang::OBC_Bridge.
| void Sema::ActOnObjCContainerFinishDefinition | ( | ) |
Definition at line 12798 of file SemaDecl.cpp.
Referenced by ActOnAtEnd().
Definition at line 12723 of file SemaDecl.cpp.
Referenced by ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().
| Decl * Sema::ActOnObjCExceptionDecl | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
Definition at line 4454 of file SemaDeclObjC.cpp.
References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), BuildObjCExceptionDecl(), CheckExtraCXXDefaultArguments(), clang::DeclSpec::ClearStorageClassSpecs(), clang::FixItHint::CreateRemoval(), Diag(), DiagnoseFunctionSpecifiers(), clang::SourceRange::getBegin(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::Decl::getLocation(), clang::Declarator::getMutableDeclSpec(), clang::CXXScopeSpec::getRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Decl::hasAttr(), IdResolver, clang::Declarator::isInvalidType(), clang::CXXScopeSpec::isSet(), ProcessDeclAttributes(), clang::DeclSpec::SCS_register, and clang::Decl::setInvalidDecl().
| StmtResult Sema::ActOnObjCForCollectionStmt | ( | SourceLocation | ForColLoc, |
| Stmt * | First, | ||
| Expr * | collection, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 1750 of file SemaStmt.cpp.
References Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedAutoType(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ASTContext::getObjCIdType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::VarDecl::hasLocalStorage(), clang::Type::isBlockPointerType(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Expr::isLValue(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Expr::isTypeDependent(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::StmtError(), and clang::VK_RValue.
| ParsedType Sema::ActOnObjCInstanceType | ( | SourceLocation | Loc | ) |
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration.
Return the appropriate type.
Definition at line 4992 of file SemaType.cpp.
References Context, CreateParsedType(), clang::ASTContext::getObjCInstanceType(), and clang::ASTContext::getTrivialTypeSourceInfo().
| TypeResult Sema::actOnObjCProtocolQualifierType | ( | SourceLocation | lAngleLoc, |
| ArrayRef< Decl * > | protocols, | ||
| ArrayRef< SourceLocation > | protocolLocs, | ||
| SourceLocation | rAngleLoc | ||
| ) |
Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
Definition at line 1039 of file SemaType.cpp.
References Context, clang::ASTContext::getObjCObjectType(), clang::ASTContext::ObjCBuiltinIdTy, and clang::Result.
| void Sema::ActOnObjCReenterContainerContext | ( | DeclContext * | DC | ) |
Definition at line 12809 of file SemaDecl.cpp.
| void Sema::ActOnObjCTemporaryExitContainerContext | ( | DeclContext * | DC | ) |
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
Must be followed by a call to
Definition at line 12803 of file SemaDecl.cpp.
| TypeResult Sema::actOnObjCTypeArgsAndProtocolQualifiers | ( | Scope * | S, |
| SourceLocation | Loc, | ||
| ParsedType | BaseType, | ||
| SourceLocation | TypeArgsLAngleLoc, | ||
| ArrayRef< ParsedType > | TypeArgs, | ||
| SourceLocation | TypeArgsRAngleLoc, | ||
| SourceLocation | ProtocolLAngleLoc, | ||
| ArrayRef< Decl * > | Protocols, | ||
| ArrayRef< SourceLocation > | ProtocolLocs, | ||
| SourceLocation | ProtocolRAngleLoc | ||
| ) |
Build a specialized and/or protocol-qualified Objective-C type.
Definition at line 1078 of file SemaType.cpp.
References BuildObjCObjectType(), clang::TypeLoc::castAs(), Context, CreateParsedType(), clang::ASTContext::CreateTypeSourceInfo(), clang::TypeLoc::getAs(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::isNull(), clang::Result, and clang::ObjCObjectTypeLoc::setTypeArgsLAngleLoc().
Referenced by ActOnSuperClassOfClassInterface().
| void Sema::actOnObjCTypeArgsOrProtocolQualifiers | ( | Scope * | S, |
| ParsedType | baseType, | ||
| SourceLocation | lAngleLoc, | ||
| ArrayRef< IdentifierInfo * > | identifiers, | ||
| ArrayRef< SourceLocation > | identifierLocs, | ||
| SourceLocation | rAngleLoc, | ||
| SourceLocation & | typeArgsLAngleLoc, | ||
| SmallVectorImpl< ParsedType > & | typeArgs, | ||
| SourceLocation & | typeArgsRAngleLoc, | ||
| SourceLocation & | protocolLAngleLoc, | ||
| SmallVectorImpl< Decl * > & | protocols, | ||
| SourceLocation & | protocolRAngleLoc, | ||
| bool | warnOnIncompleteProtocols | ||
| ) |
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate.
Definition at line 1306 of file SemaDeclObjC.cpp.
References ActOnTypeName(), clang::Declarator::AddTypeInfo(), clang::ASTContext::CollectInheritedProtocols(), Context, CorrectTypo(), clang::FixItHint::CreateInsertion(), CreateParsedType(), CTK_ErrorRecovery, clang::ast_matchers::decl, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ASTContext::getObjCInterfaceType(), clang::DeclaratorChunk::getPointer(), clang::ASTContext::getPrintingPolicy(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::SourceLocation::isInvalid(), clang::QualType::isNull(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), LookupAnyName, LookupObjCProtocolName, LookupOrdinaryName, LookupProtocol(), LookupSingleName(), NestedProtocolHasNoDefinition(), PDiag(), clang::DeclSpec::SetRangeEnd(), clang::DeclSpec::SetRangeStart(), clang::DeclSpec::SetTypeSpecType(), clang::DeclSpec::TST_typename, clang::ast_matchers::type, and clang::Declarator::TypeNameContext.
| DeclResult Sema::actOnObjCTypeParam | ( | Scope * | S, |
| ObjCTypeParamVariance | variance, | ||
| SourceLocation | varianceLoc, | ||
| unsigned | index, | ||
| IdentifierInfo * | paramName, | ||
| SourceLocation | paramLoc, | ||
| SourceLocation | colonLoc, | ||
| ParsedType | typeBound | ||
| ) |
Definition at line 591 of file SemaDeclObjC.cpp.
References Context, clang::ObjCTypeParamDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), CurContext, Diag(), clang::Qualifiers::empty(), clang::TypeLoc::findExplicitQualifierLoc(), clang::TypeLoc::getAs(), clang::Qualifiers::getAsString(), clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getEndLoc(), getLocForEndOfToken(), clang::TypeLoc::getLocStart(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCObjectPointerType(), clang::QualType::getQualifiers(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::Qualifiers::removeCVRQualifiers(), and clang::ObjCObjectPointerTypeLoc::setStarLoc().
| ObjCTypeParamList * Sema::actOnObjCTypeParamList | ( | Scope * | S, |
| SourceLocation | lAngleLoc, | ||
| ArrayRef< Decl * > | typeParams, | ||
| SourceLocation | rAngleLoc | ||
| ) |
Definition at line 694 of file SemaDeclObjC.cpp.
References Context, clang::ObjCTypeParamList::create(), Diag(), and PushOnScopeChains().
| ExprResult Sema::ActOnOMPArraySectionExpr | ( | Expr * | Base, |
| SourceLocation | LBLoc, | ||
| Expr * | LowerBound, | ||
| SourceLocation | ColonLoc, | ||
| Expr * | Length, | ||
| SourceLocation | RBLoc | ||
| ) |
Definition at line 4128 of file SemaExpr.cpp.
References Context, clang::ASTContext::DependentTy, Diag(), clang::Expr::EvaluateAsInt(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsArrayTypeUnsafe(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::ArrayType::getElementType(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Type::isAnyPointerType(), clang::Type::isArrayType(), clang::Type::isConstantArrayType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Type::isPlaceholderType(), clang::Type::isSpecificBuiltinType(), clang::Type::isSpecificPlaceholderType(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), Length, clang::OK_Ordinary, clang::ASTContext::OMPArraySectionTy, clang::Result, and clang::VK_LValue.
| OMPClause * Sema::ActOnOpenMPAlignedClause | ( | ArrayRef< Expr * > | VarList, |
| Expr * | Alignment, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | ColonLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'aligned' clause.
Definition at line 7849 of file SemaOpenMP.cpp.
References Context, OMPAlignedClause::Create(), clang::VarDecl::DeclarationOnly, Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getCanonicalType(), clang::DeclRefExpr::getDecl(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::ValueDecl::getType(), clang::QualType::getTypePtrOrNull(), clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), and clang::VarDecl::isThisDeclarationADefinition().
Referenced by ActOnOpenMPVarListClause().
| StmtResult Sema::ActOnOpenMPAtomicDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
Definition at line 4991 of file SemaOpenMP.cpp.
References clang::BO_Assign, AttributeLangSupport::C, Context, clang::OMPAtomicDirective::Create(), CurContext, Diag(), getCurFunction(), clang::Expr::getExprLoc(), clang::BinaryOperator::getExprLoc(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::getOpenMPClauseName(), clang::BinaryOperator::getOperatorLoc(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::DeclContext::isDependentContext(), clang::Expr::isInstantiationDependent(), clang::Expr::isLValue(), clang::Type::isScalarType(), clang::OMPC_unknown, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::StmtError(), and X.
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPBarrierDirective | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp barrier'.
Definition at line 4646 of file SemaOpenMP.cpp.
References Context, and clang::OMPBarrierDirective::Create().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPCancelDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| OpenMPDirectiveKind | CancelRegion | ||
| ) |
Called on well-formed '#pragma omp cancel'.
Definition at line 5528 of file SemaOpenMP.cpp.
References Context, clang::OMPCancelDirective::Create(), Diag(), DSAStack, clang::getOpenMPDirectiveName(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPCancellationPointDirective | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc, | ||
| OpenMPDirectiveKind | CancelRegion | ||
| ) |
Called on well-formed '#pragma omp cancellation point'.
Definition at line 5507 of file SemaOpenMP.cpp.
References Context, clang::OMPCancellationPointDirective::Create(), Diag(), DSAStack, clang::getOpenMPDirectiveName(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPCaptureClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'capture' clause.
Definition at line 6379 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPClause | ( | OpenMPClauseKind | Kind, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 6272 of file SemaOpenMP.cpp.
References ActOnOpenMPCaptureClause(), ActOnOpenMPMergeableClause(), ActOnOpenMPNogroupClause(), ActOnOpenMPNowaitClause(), ActOnOpenMPOrderedClause(), ActOnOpenMPReadClause(), ActOnOpenMPSeqCstClause(), ActOnOpenMPSIMDClause(), ActOnOpenMPThreadsClause(), ActOnOpenMPUntiedClause(), ActOnOpenMPUpdateClause(), ActOnOpenMPWriteClause(), clang::OMPC_threadprivate, and clang::OMPC_unknown.
| OMPClause * Sema::ActOnOpenMPCollapseClause | ( | Expr * | NumForLoops, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'collapse' clause.
Definition at line 5928 of file SemaOpenMP.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPCopyinClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'copyin' clause.
Definition at line 7922 of file SemaOpenMP.cpp.
References ActOnFinishFullExpr(), clang::BO_Assign, BuildBinOp(), buildDeclRefExpr(), buildVarDecl(), Context, OMPCopyinClause::Create(), Diag(), DSAStack, clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::DeclRefExpr::getLocStart(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::ValueDecl::getType(), and clang::Decl::hasAttrs().
Referenced by ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPCopyprivateClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'copyprivate' clause.
Definition at line 8014 of file SemaOpenMP.cpp.
References ActOnFinishFullExpr(), clang::BO_Assign, BuildBinOp(), buildDeclRefExpr(), buildVarDecl(), Context, OMPCopyprivateClause::Create(), clang::VarDecl::DeclarationOnly, Diag(), DSAStack, clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::DeclRefExpr::getLocStart(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), clang::VarDecl::isThisDeclarationADefinition(), clang::OMPC_unknown, and ReportOriginalDSA().
Referenced by ActOnOpenMPVarListClause().
| StmtResult Sema::ActOnOpenMPCriticalDirective | ( | const DeclarationNameInfo & | DirName, |
| ArrayRef< OMPClause * > | Clauses, | ||
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
Definition at line 4422 of file SemaOpenMP.cpp.
References AttributeLangSupport::C, Context, clang::OMPCriticalDirective::Create(), Diag(), DSAStack, clang::Expr::EvaluateKnownConstInt(), getCurFunction(), clang::DeclarationNameInfo::getName(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::Expr::isValueDependent(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPDefaultClause | ( | OpenMPDefaultClauseKind | Kind, |
| SourceLocation | KindLoc, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'default' clause.
Definition at line 6050 of file SemaOpenMP.cpp.
References Context, Diag(), DSAStack, getListOfPossibleValues(), clang::getOpenMPClauseName(), and clang::OMPC_DEFAULT_unknown.
Referenced by ActOnOpenMPSimpleClause().
| OMPClause * Sema::ActOnOpenMPDependClause | ( | OpenMPDependClauseKind | DepKind, |
| SourceLocation | DepLoc, | ||
| SourceLocation | ColonLoc, | ||
| ArrayRef< Expr * > | VarList, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'depend' clause.
Definition at line 8150 of file SemaOpenMP.cpp.
References Context, OMPDependClause::Create(), CurContext, Diag(), DSAStack, clang::Expr::getExprLoc(), getListOfPossibleValues(), clang::getOpenMPClauseName(), clang::BinaryOperator::getOverloadedOperator(), clang::Expr::IgnoreParenImpCasts(), clang::DeclContext::isDependentContext(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::OMPC_DEPEND_unknown, and clang::OO_None.
Referenced by ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPDeviceClause | ( | Expr * | Device, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'device' clause.
Definition at line 8297 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| StmtResult Sema::ActOnOpenMPDistributeDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp distribute' after parsing of the associated statement.
Definition at line 5639 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), CheckOpenMPLoop(), Context, clang::OMPDistributeDirective::Create(), CurContext, DSAStack, getCollapseNumberExpr(), getCurFunction(), clang::DeclContext::isDependentContext(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPExecutableDirective | ( | OpenMPDirectiveKind | Kind, |
| const DeclarationNameInfo & | DirName, | ||
| OpenMPDirectiveKind | CancelRegion, | ||
| ArrayRef< OMPClause * > | Clauses, | ||
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 2537 of file SemaOpenMP.cpp.
References ActOnOpenMPAtomicDirective(), ActOnOpenMPBarrierDirective(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPMasterDirective(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSimdDirective(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTaskyieldDirective(), ActOnOpenMPTeamsDirective(), checkIfClauses(), CheckNestingOfRegions(), Diag(), DSAStack, clang::OMPD_unknown, P, and clang::StmtError().
| OMPClause * Sema::ActOnOpenMPFinalClause | ( | Expr * | Condition, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'final' clause.
Definition at line 5766 of file SemaOpenMP.cpp.
References ActOnBooleanCondition(), clang::Expr::containsUnexpandedParameterPack(), Context, DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPFirstprivateClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'firstprivate' clause.
Definition at line 6617 of file SemaOpenMP.cpp.
References clang::DeclContext::addDecl(), AddInitializerToDecl(), buildDeclRefExpr(), buildVarDecl(), Context, clang::OMPFirstprivateClause::Create(), clang::InitializationKind::CreateCopy(), CurContext, clang::ASTContext::Deallocate(), clang::VarDecl::DeclarationOnly, DefaultLvalueConversion(), Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::DeclRefExpr::getLocStart(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttrs(), clang::InitializedEntity::InitializeVariable(), Inits, clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isOpenMPParallelDirective(), clang::isOpenMPTeamsDirective(), clang::isOpenMPWorksharingDirective(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::OMPC_unknown, clang::OMPD_unknown, clang::InitializationSequence::Perform(), ReportOriginalDSA(), and RequireCompleteType().
Referenced by ActOnOpenMPExecutableDirective(), and ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPFlushClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'flush' pseudo clause.
Definition at line 8139 of file SemaOpenMP.cpp.
References Context, and OMPFlushClause::Create().
Referenced by ActOnOpenMPVarListClause().
| StmtResult Sema::ActOnOpenMPFlushDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp flush'.
Definition at line 4669 of file SemaOpenMP.cpp.
References Context, and clang::OMPFlushDirective::Create().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPForDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp for' after parsing of the associated statement.
Definition at line 4236 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), AttributeLangSupport::C, CheckOpenMPLoop(), Context, clang::OMPForDirective::Create(), CurContext, DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getCurFunction(), getOrderedNumberExpr(), clang::DeclContext::isDependentContext(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPForSimdDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
Definition at line 4271 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), AttributeLangSupport::C, CheckOpenMPLoop(), checkSimdlenSafelenValues(), Context, clang::OMPForSimdDirective::Create(), CurContext, DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getCurFunction(), getOrderedNumberExpr(), clang::OMPSafelenClause::getSafelen(), clang::OMPSimdlenClause::getSimdlen(), clang::DeclContext::isDependentContext(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPGrainsizeClause | ( | Expr * | Size, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'grainsize' clause.
Definition at line 8536 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPHintClause | ( | Expr * | Hint, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'hint' clause.
Definition at line 8568 of file SemaOpenMP.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnOpenMPSingleExprClause().
| ExprResult Sema::ActOnOpenMPIdExpression | ( | Scope * | CurScope, |
| CXXScopeSpec & | ScopeSpec, | ||
| const DeclarationNameInfo & | Id | ||
| ) |
Called on correct id-expression from the '#pragma omp threadprivate'.
Definition at line 1014 of file SemaOpenMP.cpp.
References buildDeclRefExpr(), Context, CorrectTypo(), CTK_ErrorRecovery, clang::VarDecl::DeclarationOnly, Diag(), diagnoseTypo(), DSAStack, clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::VarDecl::getCanonicalDecl(), getCurLexicalContext(), clang::Decl::getDeclContext(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::QualType::getNonReferenceType(), clang::getOpenMPDirectiveName(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::LookupResult::isAmbiguous(), isDeclInScope(), clang::DeclContext::isFileContext(), clang::DeclContext::isNamespace(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), clang::DeclContext::isTranslationUnit(), clang::Decl::isUsed(), LookupOrdinaryName, LookupParsedName(), PDiag(), and clang::LookupResult::suppressDiagnostics().
| OMPClause * Sema::ActOnOpenMPIfClause | ( | OpenMPDirectiveKind | NameModifier, |
| Expr * | Condition, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | NameModifierLoc, | ||
| SourceLocation | ColonLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'if' clause.
Definition at line 5744 of file SemaOpenMP.cpp.
References ActOnBooleanCondition(), clang::Expr::containsUnexpandedParameterPack(), Context, DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by ActOnOpenMPSingleExprWithArgClause().
| OMPClause * Sema::ActOnOpenMPLastprivateClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'lastprivate' clause.
Definition at line 6883 of file SemaOpenMP.cpp.
References ActOnFinishFullExpr(), clang::BO_Assign, BuildBinOp(), buildDeclRefExpr(), buildVarDecl(), Context, clang::OMPLastprivateClause::Create(), Diag(), DSAStack, clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::DeclRefExpr::getLocStart(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), clang::isOpenMPParallelDirective(), clang::isOpenMPWorksharingDirective(), clang::OMPC_unknown, ReportOriginalDSA(), and RequireCompleteType().
Referenced by ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPLinearClause | ( | ArrayRef< Expr * > | VarList, |
| Expr * | Step, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| OpenMPLinearClauseKind | LinKind, | ||
| SourceLocation | LinLoc, | ||
| SourceLocation | ColonLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'linear' clause.
Definition at line 7621 of file SemaOpenMP.cpp.
References ActOnFinishFullExpr(), AddInitializerToDecl(), clang::BO_Assign, BuildBinOp(), buildDeclRefExpr(), buildVarDecl(), CalcStep, clang::Expr::containsUnexpandedParameterPack(), Context, clang::Create(), clang::VarDecl::DeclarationOnly, DefaultLvalueConversion(), Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAttrs(), clang::QualType::getCanonicalType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtrOrNull(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttrs(), Inits, clang::QualType::isConstant(), clang::Type::isDependentType(), clang::Expr::isInstantiationDependent(), clang::Type::isInstantiationDependentType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::VarDecl::isThisDeclarationADefinition(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), LangOpts, clang::OMPC_LINEAR_unknown, PerformOpenMPImplicitIntegerConversion(), Privates, ReportOriginalDSA(), RequireCompleteType(), clang::Result, and Step.
Referenced by ActOnOpenMPVarListClause().
| void Sema::ActOnOpenMPLoopInitialization | ( | SourceLocation | ForLoc, |
| Stmt * | Init | ||
| ) |
Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in Init for loop initialization, as private by default.
| Init | First part of the for loop. |
Definition at line 3462 of file SemaOpenMP.cpp.
References DSAStack, getLangOpts(), and clang::isOpenMPLoopDirective().
| OMPClause * Sema::ActOnOpenMPMapClause | ( | OpenMPMapClauseKind | MapTypeModifier, |
| OpenMPMapClauseKind | MapType, | ||
| SourceLocation | MapLoc, | ||
| SourceLocation | ColonLoc, | ||
| ArrayRef< Expr * > | VarList, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'map' clause.
Definition at line 8369 of file SemaOpenMP.cpp.
References CheckTypeMappable(), Context, OMPMapClause::Create(), Diag(), DSAStack, clang::ValueDecl::getType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and ReportOriginalDSA().
Referenced by ActOnOpenMPVarListClause().
| StmtResult Sema::ActOnOpenMPMasterDirective | ( | Stmt * | AStmt, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp master' after parsing of the associated statement.
Definition at line 4409 of file SemaOpenMP.cpp.
References Context, clang::OMPMasterDirective::Create(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPMergeableClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'mergeable' clause.
Definition at line 6359 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPNogroupClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'nogroup' clause.
Definition at line 6399 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPNowaitClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'nowait' clause.
Definition at line 6348 of file SemaOpenMP.cpp.
References Context, and DSAStack.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPNumTasksClause | ( | Expr * | NumTasks, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'num_tasks' clause.
Definition at line 8552 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPNumTeamsClause | ( | Expr * | NumTeams, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'num_teams' clause.
Definition at line 8490 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPNumThreadsClause | ( | Expr * | NumThreads, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'num_threads' clause.
Definition at line 5855 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPOrderedClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc, | ||
| SourceLocation | LParenLoc = SourceLocation(), |
||
| Expr * | NumForLoops = nullptr |
||
| ) |
Called on well-formed 'ordered' clause.
Definition at line 5945 of file SemaOpenMP.cpp.
References Context, DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::SourceLocation::isValid().
Referenced by ActOnOpenMPClause(), and ActOnOpenMPSingleExprClause().
| StmtResult Sema::ActOnOpenMPOrderedDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
Definition at line 4676 of file SemaOpenMP.cpp.
References AttributeLangSupport::C, Context, clang::OMPOrderedDirective::Create(), Diag(), DSAStack, getCurFunction(), clang::OMPClause::getLocStart(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::isOpenMPSimdDirective(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPParallelDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
Definition at line 2736 of file SemaOpenMP.cpp.
References Context, clang::OMPParallelDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPParallelForDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
Definition at line 4480 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), AttributeLangSupport::C, CheckOpenMPLoop(), Context, clang::OMPParallelForDirective::Create(), CurContext, DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), getCollapseNumberExpr(), getCurFunction(), getOrderedNumberExpr(), clang::DeclContext::isDependentContext(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPParallelForSimdDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
Definition at line 4524 of file SemaOpenMP.cpp.
References AttributeLangSupport::C, CheckOpenMPLoop(), checkSimdlenSafelenValues(), Context, clang::OMPParallelForSimdDirective::Create(), CurContext, DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), getCollapseNumberExpr(), getCurFunction(), getOrderedNumberExpr(), clang::OMPSafelenClause::getSafelen(), clang::OMPSimdlenClause::getSimdlen(), clang::DeclContext::isDependentContext(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPParallelSectionsDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
Definition at line 4583 of file SemaOpenMP.cpp.
References AttributeLangSupport::C, Context, clang::OMPParallelSectionsDirective::Create(), Diag(), DSAStack, getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPPriorityClause | ( | Expr * | Priority, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'priority' clause.
Definition at line 8521 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPPrivateClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'private' clause.
Definition at line 6489 of file SemaOpenMP.cpp.
References ActOnUninitializedDecl(), buildDeclRefExpr(), buildVarDecl(), Context, clang::OMPPrivateClause::Create(), clang::VarDecl::DeclarationOnly, Diag(), DSAStack, clang::Decl::getAttrs(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttrs(), clang::VarDecl::isThisDeclarationADefinition(), clang::OMPC_unknown, ReportOriginalDSA(), and RequireCompleteType().
Referenced by ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPProcBindClause | ( | OpenMPProcBindClauseKind | Kind, |
| SourceLocation | KindLoc, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'proc_bind' clause.
Definition at line 6079 of file SemaOpenMP.cpp.
References Context, Diag(), getListOfPossibleValues(), clang::getOpenMPClauseName(), and clang::OMPC_PROC_BIND_unknown.
Referenced by ActOnOpenMPSimpleClause().
| OMPClause * Sema::ActOnOpenMPReadClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'read' clause.
Definition at line 6364 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPReductionClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | ColonLoc, | ||
| SourceLocation | EndLoc, | ||
| CXXScopeSpec & | ReductionIdScopeSpec, | ||
| const DeclarationNameInfo & | ReductionId | ||
| ) |
Called on well-formed 'reduction' clause.
Definition at line 7119 of file SemaOpenMP.cpp.
References ActOnFinishFullExpr(), ActOnIntegerConstant(), ActOnUninitializedDecl(), AddInitializerToDecl(), clang::BO_Add, clang::BO_AddAssign, clang::BO_And, clang::BO_AndAssign, clang::BO_Assign, clang::BO_Comma, clang::BO_Div, clang::BO_DivAssign, clang::BO_EQ, clang::BO_GT, clang::BO_LAnd, clang::BO_LOr, clang::BO_LT, clang::BO_Mul, clang::BO_MulAssign, clang::BO_NE, clang::BO_Or, clang::BO_OrAssign, clang::BO_PtrMemD, clang::BO_PtrMemI, clang::BO_Rem, clang::BO_RemAssign, clang::BO_Shl, clang::BO_ShlAssign, clang::BO_Shr, clang::BO_ShrAssign, clang::BO_Sub, clang::BO_SubAssign, clang::BO_Xor, clang::BO_XorAssign, BuildBinOp(), BuildCStyleCastExpr(), buildDeclRefExpr(), buildVarDecl(), Context, clang::IntegerLiteral::Create(), clang::FloatingLiteral::Create(), clang::OMPReductionClause::Create(), CreateBuiltinBinOp(), clang::VarDecl::DeclarationOnly, Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Decl::getAttrs(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationName::getCXXOverloadedOperator(), clang::VarDecl::getDefinition(), clang::DeclarationNameInfo::getEndLoc(), clang::ASTContext::getFloatTypeSemantics(), clang::VarDecl::getInit(), clang::ASTContext::getIntTypeForBitwidth(), getLangOpts(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getLocStart(), clang::NamedDecl::getName(), clang::DeclarationNameInfo::getName(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::Type::getPointeeType(), clang::ASTContext::getSizeType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::ASTContext::getVariableArrayType(), clang::CXXScopeSpec::getWithLocInContext(), clang::Decl::hasAttrs(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::Type::isArrayType(), clang::QualType::isConstant(), clang::CXXScopeSpec::isEmpty(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isOpenMPParallelDirective(), clang::isOpenMPWorksharingDirective(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::Type::isScalarType(), clang::VarDecl::isThisDeclarationADefinition(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::CXXScopeSpec::isValid(), clang::ArrayType::Normal, clang::NUM_OVERLOADED_OPERATORS, clang::OK_Ordinary, clang::OMPC_unknown, clang::OO_None, Privates, ReportOriginalDSA(), RequireCompleteType(), clang::SourceRange::setBegin(), clang::SourceRange::setEnd(), clang::VarDecl::setInit(), clang::VK_LValue, and clang::VK_RValue.
Referenced by ActOnOpenMPVarListClause().
| StmtResult Sema::ActOnOpenMPRegionEnd | ( | StmtResult | S, |
| ArrayRef< OMPClause * > | Clauses | ||
| ) |
End of OpenMP region.
| S | Statement associated with the current OpenMP region. |
| Clauses | List of clauses for the current OpenMP region. |
Definition at line 1620 of file SemaOpenMP.cpp.
References ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), AttributeLangSupport::C, Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), getASTContext(), clang::OMPScheduleClause::getFirstScheduleModifier(), clang::OMPScheduleClause::getFirstScheduleModifierLoc(), getLangOpts(), clang::OMPClause::getLocEnd(), clang::OMPClause::getLocStart(), clang::OMPOrderedClause::getNumForLoops(), clang::getOpenMPDirectiveName(), clang::OMPScheduleClause::getSecondScheduleModifier(), clang::OMPScheduleClause::getSecondScheduleModifierLoc(), clang::ASTContext::getTargetInfo(), clang::isOpenMPPrivate(), clang::isOpenMPSimdDirective(), clang::isOpenMPWorksharingDirective(), clang::TargetInfo::isTLSSupported(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), MarkDeclarationsReferencedInExpr(), and clang::StmtError().
| void Sema::ActOnOpenMPRegionStart | ( | OpenMPDirectiveKind | DKind, |
| Scope * | CurScope | ||
| ) |
Initialization of captured region for OpenMP region.
Definition at line 1394 of file SemaOpenMP.cpp.
References ActOnCapturedRegionStart(), clang::Decl::addAttr(), Context, clang::CR_OpenMP, DSAStack, getCurCapturedRegion(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIntTypeForBitwidth(), clang::ASTContext::getPointerType(), clang::OMPD_unknown, clang::sema::CapturedRegionScopeInfo::TheCapturedDecl, clang::FunctionProtoType::ExtProtoInfo::Variadic, clang::ASTContext::VoidPtrTy, clang::ASTContext::VoidTy, clang::CanQual< T >::withConst(), clang::QualType::withConst(), and clang::QualType::withRestrict().
| OMPClause * Sema::ActOnOpenMPSafelenClause | ( | Expr * | Length, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'safelen' clause.
Definition at line 5902 of file SemaOpenMP.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPScheduleClause | ( | OpenMPScheduleClauseModifier | M1, |
| OpenMPScheduleClauseModifier | M2, | ||
| OpenMPScheduleClauseKind | Kind, | ||
| Expr * | ChunkSize, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | M1Loc, | ||
| SourceLocation | M2Loc, | ||
| SourceLocation | KindLoc, | ||
| SourceLocation | CommaLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'schedule' clause.
Definition at line 6186 of file SemaOpenMP.cpp.
References buildDeclRefExpr(), buildVarDecl(), checkScheduleModifiers(), clang::Expr::containsUnexpandedParameterPack(), Context, Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), getListOfPossibleValues(), clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), clang::Expr::getType(), clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OMPC_SCHEDULE_MODIFIER_last, clang::OMPC_SCHEDULE_MODIFIER_unknown, clang::OMPC_SCHEDULE_unknown, PerformOpenMPImplicitIntegerConversion(), and clang::Result.
Referenced by ActOnOpenMPSingleExprWithArgClause().
| StmtResult Sema::ActOnOpenMPSectionDirective | ( | Stmt * | AStmt, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp section' after parsing of the associated statement.
Definition at line 4363 of file SemaOpenMP.cpp.
References Context, clang::OMPSectionDirective::Create(), DSAStack, getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPSectionsDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
Definition at line 4325 of file SemaOpenMP.cpp.
References AttributeLangSupport::C, Context, clang::OMPSectionsDirective::Create(), Diag(), DSAStack, getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPSeqCstClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'seq_cst' clause.
Definition at line 6384 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPSharedClause | ( | ArrayRef< Expr * > | VarList, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'shared' clause.
Definition at line 7027 of file SemaOpenMP.cpp.
References Context, clang::OMPSharedClause::Create(), Diag(), DSAStack, clang::DeclRefExpr::getDecl(), clang::getOpenMPClauseName(), clang::ValueDecl::getType(), clang::OMPC_unknown, and ReportOriginalDSA().
Referenced by ActOnOpenMPVarListClause().
| OMPClause * Sema::ActOnOpenMPSIMDClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'simd' clause.
Definition at line 6394 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| StmtResult Sema::ActOnOpenMPSimdDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
Definition at line 4183 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), AttributeLangSupport::C, CheckOpenMPLoop(), checkSimdlenSafelenValues(), Context, clang::OMPSimdDirective::Create(), CurContext, DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getCurFunction(), getOrderedNumberExpr(), clang::OMPSafelenClause::getSafelen(), clang::OMPSimdlenClause::getSimdlen(), clang::DeclContext::isDependentContext(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPSimdlenClause | ( | Expr * | Length, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'simdlen' clause.
Definition at line 5915 of file SemaOpenMP.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnOpenMPSingleExprClause().
| OMPClause * Sema::ActOnOpenMPSimpleClause | ( | OpenMPClauseKind | Kind, |
| unsigned | Argument, | ||
| SourceLocation | ArgumentLoc, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 5967 of file SemaOpenMP.cpp.
References ActOnOpenMPDefaultClause(), ActOnOpenMPProcBindClause(), clang::OMPC_threadprivate, and clang::OMPC_unknown.
| StmtResult Sema::ActOnOpenMPSingleDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp single' after parsing of the associated statement.
Definition at line 4378 of file SemaOpenMP.cpp.
References Context, clang::OMPSingleDirective::Create(), Diag(), getCurFunction(), clang::OMPClause::getLocStart(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPSingleExprClause | ( | OpenMPClauseKind | Kind, |
| Expr * | Expr, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 5665 of file SemaOpenMP.cpp.
References ActOnOpenMPCollapseClause(), ActOnOpenMPDeviceClause(), ActOnOpenMPFinalClause(), ActOnOpenMPGrainsizeClause(), ActOnOpenMPHintClause(), ActOnOpenMPNumTasksClause(), ActOnOpenMPNumTeamsClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPOrderedClause(), ActOnOpenMPPriorityClause(), ActOnOpenMPSafelenClause(), ActOnOpenMPSimdlenClause(), ActOnOpenMPThreadLimitClause(), clang::OMPC_threadprivate, and clang::OMPC_unknown.
| OMPClause * Sema::ActOnOpenMPSingleExprWithArgClause | ( | OpenMPClauseKind | Kind, |
| ArrayRef< unsigned > | Arguments, | ||
| Expr * | Expr, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| ArrayRef< SourceLocation > | ArgumentsLoc, | ||
| SourceLocation | DelimLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Definition at line 6095 of file SemaOpenMP.cpp.
References ActOnOpenMPIfClause(), ActOnOpenMPScheduleClause(), clang::OMPC_threadprivate, and clang::OMPC_unknown.
| StmtResult Sema::ActOnOpenMPTargetDataDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp target data' after parsing of the associated statement.
Definition at line 5472 of file SemaOpenMP.cpp.
References Context, clang::OMPTargetDataDirective::Create(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTargetDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp target' after parsing of the associated statement.
Definition at line 5422 of file SemaOpenMP.cpp.
References Context, clang::OMPTargetDirective::Create(), Diag(), DSAStack, clang::CapturedStmt::getCapturedDecl(), getCurFunction(), I, clang::isOpenMPTeamsDirective(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp task' after parsing of the associated statement.
Definition at line 4621 of file SemaOpenMP.cpp.
References Context, clang::OMPTaskDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskgroupDirective | ( | Stmt * | AStmt, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp taskgroup'.
Definition at line 4656 of file SemaOpenMP.cpp.
References Context, clang::OMPTaskgroupDirective::Create(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskLoopDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.
Definition at line 5575 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), checkGrainsizeNumTasksClauses(), CheckOpenMPLoop(), Context, clang::OMPTaskLoopDirective::Create(), CurContext, DSAStack, getCollapseNumberExpr(), getCurFunction(), clang::DeclContext::isDependentContext(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskLoopSimdDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc, | ||
| llvm::DenseMap< VarDecl *, Expr * > & | VarsWithImplicitDSA | ||
| ) |
Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.
Definition at line 5607 of file SemaOpenMP.cpp.
References clang::OMPLoopDirective::HelperExprs::builtAll(), checkGrainsizeNumTasksClauses(), CheckOpenMPLoop(), Context, clang::OMPTaskLoopSimdDirective::Create(), CurContext, DSAStack, getCollapseNumberExpr(), getCurFunction(), clang::DeclContext::isDependentContext(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskwaitDirective | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp taskwait'.
Definition at line 4651 of file SemaOpenMP.cpp.
References Context, and clang::OMPTaskwaitDirective::Create().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTaskyieldDirective | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp taskyield'.
Definition at line 4641 of file SemaOpenMP.cpp.
References Context, and clang::OMPTaskyieldDirective::Create().
Referenced by ActOnOpenMPExecutableDirective().
| StmtResult Sema::ActOnOpenMPTeamsDirective | ( | ArrayRef< OMPClause * > | Clauses, |
| Stmt * | AStmt, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
Definition at line 5487 of file SemaOpenMP.cpp.
References Context, clang::OMPTeamsDirective::Create(), clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().
Referenced by ActOnOpenMPExecutableDirective().
| OMPClause * Sema::ActOnOpenMPThreadLimitClause | ( | Expr * | ThreadLimit, |
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'thread_limit' clause.
Definition at line 8505 of file SemaOpenMP.cpp.
References Context, and IsNonNegativeIntegerValue().
Referenced by ActOnOpenMPSingleExprClause().
| Sema::DeclGroupPtrTy Sema::ActOnOpenMPThreadprivateDirective | ( | SourceLocation | Loc, |
| ArrayRef< Expr * > | VarList | ||
| ) |
Called on well-formed '#pragma omp threadprivate'.
Definition at line 1139 of file SemaOpenMP.cpp.
References clang::DeclContext::addDecl(), CheckOMPThreadPrivateDecl(), CurContext, and clang::OpaquePtr< PtrTy >::make().
| OMPClause * Sema::ActOnOpenMPThreadsClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'threads' clause.
Definition at line 6389 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPUntiedClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'untied' clause.
Definition at line 6354 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPUpdateClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'update' clause.
Definition at line 6374 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| OMPClause * Sema::ActOnOpenMPVarListClause | ( | OpenMPClauseKind | Kind, |
| ArrayRef< Expr * > | Vars, | ||
| Expr * | TailExpr, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | ColonLoc, | ||
| SourceLocation | EndLoc, | ||
| CXXScopeSpec & | ReductionIdScopeSpec, | ||
| const DeclarationNameInfo & | ReductionId, | ||
| OpenMPDependClauseKind | DepKind, | ||
| OpenMPLinearClauseKind | LinKind, | ||
| OpenMPMapClauseKind | MapTypeModifier, | ||
| OpenMPMapClauseKind | MapType, | ||
| SourceLocation | DepLinMapLoc | ||
| ) |
Definition at line 6404 of file SemaOpenMP.cpp.
References ActOnOpenMPAlignedClause(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPDependClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPMapClause(), ActOnOpenMPPrivateClause(), ActOnOpenMPReductionClause(), ActOnOpenMPSharedClause(), clang::OMPC_threadprivate, and clang::OMPC_unknown.
| OMPClause * Sema::ActOnOpenMPWriteClause | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc | ||
| ) |
Called on well-formed 'write' clause.
Definition at line 6369 of file SemaOpenMP.cpp.
References Context.
Referenced by ActOnOpenMPClause().
| ParsedTemplateArgument Sema::ActOnPackExpansion | ( | const ParsedTemplateArgument & | Arg, |
| SourceLocation | EllipsisLoc | ||
| ) |
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
| Arg | The template argument preceding the ellipsis, which may already be invalid. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 414 of file SemaTemplateVariadic.cpp.
References clang::TemplateName::containsUnexpandedParameterPack(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ParsedTemplateArgument::getAsExpr(), clang::ParsedTemplateArgument::getAsTemplate(), clang::ParsedTemplateArgument::getAsType(), clang::CXXScopeSpec::getBeginLoc(), clang::ParsedTemplateArgument::getKind(), clang::ParsedTemplateArgument::getLocation(), clang::ParsedTemplateArgument::getScopeSpec(), clang::ParsedTemplateArgument::getTemplatePackExpansion(), clang::ParsedTemplateArgument::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isValid(), clang::ParsedTemplateArgument::NonType, clang::Result, clang::SourceRange::setBegin(), clang::ParsedTemplateArgument::Template, and clang::ParsedTemplateArgument::Type.
| TypeResult Sema::ActOnPackExpansion | ( | ParsedType | Type, |
| SourceLocation | EllipsisLoc | ||
| ) |
Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.
| Type | The type preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 453 of file SemaTemplateVariadic.cpp.
References CheckPackExpansion(), CreateParsedType(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), and clang::None.
| ExprResult Sema::ActOnPackExpansion | ( | Expr * | Pattern, |
| SourceLocation | EllipsisLoc | ||
| ) |
Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
| Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 501 of file SemaTemplateVariadic.cpp.
References CheckPackExpansion(), and clang::None.
| Decl * Sema::ActOnParamDeclarator | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.
Definition at line 10398 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::DeclSpec::getConceptSpecLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Scope::getFunctionPrototypeDepth(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getMutableDeclSpec(), clang::Scope::getNextFunctionPrototypeIndex(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), clang::Decl::hasAttr(), clang::Declarator::hasName(), clang::DeclSpec::isConceptSpecified(), clang::DeclSpec::isConstexprSpecified(), clang::Scope::isDeclScope(), clang::Scope::isFunctionPrototypeScope(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::SC_Auto, clang::SC_None, clang::SC_Register, clang::DeclSpec::SCS_auto, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_unspecified, clang::Declarator::SetIdentifier(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), and clang::ParmVarDecl::setScopeInfo().
| void Sema::ActOnParamDefaultArgument | ( | Decl * | param, |
| SourceLocation | EqualLoc, | ||
| Expr * | DefaultArg | ||
| ) |
ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed.
If so, attach it to the parameter declaration.
Definition at line 297 of file SemaDeclCXX.cpp.
References clang::frontend::CPlusPlus, Diag(), DiagnoseUnexpandedParameterPack(), getLangOpts(), clang::ParmVarDecl::isParameterPack(), clang::Decl::setInvalidDecl(), SetParamDefaultArgument(), UnparsedDefaultArgLocs, and UPPC_DefaultArgument.
| void Sema::ActOnParamDefaultArgumentError | ( | Decl * | param, |
| SourceLocation | EqualLoc | ||
| ) |
ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.
Definition at line 355 of file SemaDeclCXX.cpp.
References Context, clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ParmVarDecl::setDefaultArg(), clang::Decl::setInvalidDecl(), UnparsedDefaultArgLocs, and clang::VK_RValue.
| void Sema::ActOnParamUnparsedDefaultArgument | ( | Decl * | param, |
| SourceLocation | EqualLoc, | ||
| SourceLocation | ArgLoc | ||
| ) |
ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter, but we can't parse it yet because we're inside a class definition.
Note that this default argument will be parsed later.
Definition at line 342 of file SemaDeclCXX.cpp.
References clang::ParmVarDecl::setUnparsedDefaultArg(), and UnparsedDefaultArgLocs.
| ExprResult Sema::ActOnParenExpr | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| Expr * | E | ||
| ) |
Definition at line 3454 of file SemaExpr.cpp.
References Context.
Referenced by ActOnDecltypeExpression(), BuildCounterUpdate(), and CheckOpenMPLoop().
| ExprResult Sema::ActOnParenListExpr | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| MultiExprArg | Val | ||
| ) |
Definition at line 5983 of file SemaExpr.cpp.
References Context, and clang::ast_matchers::expr.
Referenced by clang::InitializationSequence::Perform().
| void Sema::ActOnPopScope | ( | SourceLocation | Loc, |
| Scope * | S | ||
| ) |
Scope actions.
Definition at line 1590 of file SemaDecl.cpp.
References CheckPoppedLabel(), clang::Scope::decl_empty(), clang::Scope::decls(), clang::Scope::DeclScope, clang::NamedDecl::getDeclName(), clang::Scope::getFlags(), clang::Scope::hasUnrecoverableErrorOccurred(), clang::Scope::mergeNRVOIntoParent(), and clang::Scope::TemplateParamScope.
Referenced by clang::Parser::ExitScope().
| ExprResult Sema::ActOnPostfixUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | Kind, | ||
| Expr * | Input | ||
| ) |
Definition at line 4011 of file SemaExpr.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Result, clang::UO_PostDec, and clang::UO_PostInc.
| void Sema::ActOnPragmaDetectMismatch | ( | StringRef | Name, |
| StringRef | Value | ||
| ) |
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
Definition at line 291 of file SemaAttr.cpp.
References Consumer, and clang::ASTConsumer::HandleDetectMismatch().
| void Sema::ActOnPragmaDump | ( | Scope * | S, |
| SourceLocation | Loc, | ||
| IdentifierInfo * | II | ||
| ) |
Called on #pragma clang __debug dump II.
Definition at line 5002 of file SemaLookup.cpp.
References clang::LookupResult::dump(), LookupAnyName, LookupName(), clang::Name, NotForRedeclaration, clang::LookupResult::setHideTags(), and clang::LookupResult::suppressDiagnostics().
| void Sema::ActOnPragmaFPContract | ( | tok::OnOffSwitch | OOS | ) |
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT.
Definition at line 565 of file SemaAttr.cpp.
References clang::FPOptions::fp_contract, FPFeatures, getLangOpts(), clang::tok::OOS_DEFAULT, clang::tok::OOS_OFF, and clang::tok::OOS_ON.
| void Sema::ActOnPragmaMSComment | ( | PragmaMSCommentKind | Kind, |
| StringRef | Arg | ||
| ) |
ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
Definition at line 272 of file SemaAttr.cpp.
References Consumer, clang::ASTConsumer::HandleDependentLibrary(), clang::ASTConsumer::HandleLinkerOptionPragma(), PCK_Compiler, PCK_ExeStr, PCK_Lib, PCK_Linker, PCK_Unknown, and PCK_User.
| void Sema::ActOnPragmaMSInitSeg | ( | SourceLocation | PragmaLocation, |
| StringLiteral * | SegmentName | ||
| ) |
Called on well-formed #pragma init_seg().
Definition at line 437 of file SemaAttr.cpp.
References CurInitSeg, CurInitSegLoc, and clang::StringLiteral::getString().
| void Sema::ActOnPragmaMSPointersToMembers | ( | LangOptions::PragmaMSPointersToMembersKind | Kind, |
| SourceLocation | PragmaLoc | ||
| ) |
ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]).
Definition at line 296 of file SemaAttr.cpp.
References ImplicitMSInheritanceAttrLoc, and MSPointerToMemberRepresentationMethod.
| void Sema::ActOnPragmaMSSection | ( | SourceLocation | PragmaLocation, |
| int | SectionFlags, | ||
| StringLiteral * | SegmentName | ||
| ) |
Called on well formed #pragma section().
Called on well formed #pragma bss_seg().
Definition at line 432 of file SemaAttr.cpp.
References clang::StringLiteral::getString(), and UnifySection().
| void Sema::ActOnPragmaMSSeg | ( | SourceLocation | PragmaLocation, |
| PragmaMsStackAction | Action, | ||
| llvm::StringRef | StackSlotLabel, | ||
| StringLiteral * | SegmentName, | ||
| llvm::StringRef | PragmaName | ||
| ) |
Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
Called on well formed #pragma bss_seg().
Definition at line 411 of file SemaAttr.cpp.
References clang::Sema::PragmaStack< ValueType >::Act(), BSSSegStack, checkSectionName(), CodeSegStack, ConstSegStack, DataSegStack, Diag(), clang::StringLiteral::getLocStart(), clang::StringLiteral::getString(), PSK_Pop, Stack, and clang::Sema::PragmaStack< ValueType >::Stack.
| void Sema::ActOnPragmaMSStruct | ( | PragmaMSStructKind | Kind | ) |
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
Definition at line 268 of file SemaAttr.cpp.
References MSStructPragmaOn, and PMSST_ON.
| void Sema::ActOnPragmaMSVtorDisp | ( | PragmaVtorDispKind | Kind, |
| SourceLocation | PragmaLoc, | ||
| MSVtorDispAttr::Mode | Value | ||
| ) |
Called on well formed #pragma vtordisp().
Definition at line 303 of file SemaAttr.cpp.
References Diag(), LangOpts, PVDK_Pop, PVDK_Push, PVDK_Reset, PVDK_Set, and VtorDispModeStack.
| void Sema::ActOnPragmaOptimize | ( | bool | On, |
| SourceLocation | PragmaLoc | ||
| ) |
Called on well formed #pragma clang optimize.
Definition at line 485 of file SemaAttr.cpp.
References OptimizeOffPragmaLocation.
| void Sema::ActOnPragmaOptionsAlign | ( | PragmaOptionsAlignKind | Kind, |
| SourceLocation | PragmaLoc | ||
| ) |
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Definition at line 144 of file SemaAttr.cpp.
References Context, Diag(), PackContext, POAK_Mac68k, POAK_Native, POAK_Natural, POAK_Packed, POAK_Power, and POAK_Reset.
| void Sema::ActOnPragmaPack | ( | PragmaPackKind | Kind, |
| IdentifierInfo * | Name, | ||
| Expr * | Alignment, | ||
| SourceLocation | PragmaLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnPragmaPack - Called on well formed #pragma pack(...).
Definition at line 190 of file SemaAttr.cpp.
References Context, Diag(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), PackContext, PPK_Default, PPK_Pop, PPK_Push, and PPK_Show.
| void Sema::ActOnPragmaRedefineExtname | ( | IdentifierInfo * | WeakName, |
| IdentifierInfo * | AliasName, | ||
| SourceLocation | PragmaLoc, | ||
| SourceLocation | WeakNameLoc, | ||
| SourceLocation | AliasNameLoc | ||
| ) |
ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
Definition at line 14755 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, Diag(), ExtnameUndeclaredIdentifiers, clang::Decl::getLocation(), clang::IdentifierInfo::getName(), isDeclExternC(), LookupOrdinaryName, LookupSingleName(), and TUScope.
| void Sema::ActOnPragmaUnused | ( | const Token & | Identifier, |
| Scope * | curScope, | ||
| SourceLocation | PragmaLoc | ||
| ) |
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
Definition at line 446 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, Diag(), clang::Token::getIdentifierInfo(), clang::Token::getLocation(), clang::Decl::isUsed(), LookupOrdinaryName, LookupParsedName(), and clang::Name.
| void Sema::ActOnPragmaVisibility | ( | const IdentifierInfo * | VisType, |
| SourceLocation | PragmaLoc | ||
| ) |
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
Definition at line 550 of file SemaAttr.cpp.
References Diag(), clang::IdentifierInfo::getName(), PopPragmaVisibility(), and PushPragmaVisibility().
| void Sema::ActOnPragmaWeakAlias | ( | IdentifierInfo * | WeakName, |
| IdentifierInfo * | AliasName, | ||
| SourceLocation | PragmaLoc, | ||
| SourceLocation | WeakNameLoc, | ||
| SourceLocation | AliasNameLoc | ||
| ) |
ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
Definition at line 14794 of file SemaDecl.cpp.
References DeclApplyPragmaWeak(), clang::Decl::hasAttr(), LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.
| void Sema::ActOnPragmaWeakID | ( | IdentifierInfo * | WeakName, |
| SourceLocation | PragmaLoc, | ||
| SourceLocation | WeakNameLoc | ||
| ) |
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
Definition at line 14780 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.
| ExprResult Sema::ActOnPredefinedExpr | ( | SourceLocation | Loc, |
| tok::TokenKind | Kind | ||
| ) |
Definition at line 3043 of file SemaExpr.cpp.
References clang::PredefinedExpr::Func, clang::PredefinedExpr::FuncDName, clang::PredefinedExpr::FuncSig, clang::PredefinedExpr::Function, clang::PredefinedExpr::LFunction, and clang::PredefinedExpr::PrettyFunction.
| Decl * Sema::ActOnProperty | ( | Scope * | S, |
| SourceLocation | AtLoc, | ||
| SourceLocation | LParenLoc, | ||
| FieldDeclarator & | FD, | ||
| ObjCDeclSpec & | ODS, | ||
| Selector | GetterSel, | ||
| Selector | SetterSel, | ||
| tok::ObjCKeywordKind | MethodImplKind, | ||
| DeclContext * | lexicalDC = nullptr |
||
| ) |
Definition at line 178 of file SemaObjCProperty.cpp.
References ActOnDocumentableDecl(), CheckObjCPropertyAttributes(), CheckPropertyAgainstProtocol(), checkPropertyDeclWithOwnership(), CreatePropertyDecl(), CurContext, clang::FieldDeclarator::D, deducePropertyOwnershipFromType(), DiagnosePropertyMismatch(), clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_weak, getOwnershipRule(), clang::ObjCDeclSpec::getPropertyAttributes(), clang::ObjCInterfaceDecl::getSuperClass(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), HandlePropertyInClassExtension(), I, P, clang::ObjCInterfaceDecl::protocols(), clang::ObjCProtocolDecl::protocols(), clang::Decl::setLexicalDeclContext(), clang::Declarator::setObjCWeakProperty(), and clang::DeclContextLookupResult::size().
| Decl * Sema::ActOnPropertyImplDecl | ( | Scope * | S, |
| SourceLocation | AtLoc, | ||
| SourceLocation | PropertyLoc, | ||
| bool | ImplKind, | ||
| IdentifierInfo * | PropertyId, | ||
| IdentifierInfo * | PropertyIvar, | ||
| SourceLocation | PropertyIvarLoc | ||
| ) |
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic.
Definition at line 885 of file SemaObjCProperty.cpp.
References AbstractSynthesizedIvarType, clang::DeclContext::addDecl(), clang::Qualifiers::addObjCLifetime(), clang::ObjCImplDecl::addPropertyImplementation(), clang::BO_Assign, BuildBinOp(), clang::ast_matchers::callExpr, clang::ASTContext::canAssignObjCInterfaces(), Category, checkARCPropertyImpl(), CheckAssignmentConstraints(), clang::CK_LValueToRValue, Compatible, Context, clang::frontend::CPlusPlus, clang::ObjCIvarDecl::Create(), clang::ObjCPropertyImplDecl::Create(), clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), CurContext, clang::declaresSameEntity(), Diag(), DiagnosePropertyMismatchDeclInProtocols(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclContextLookupResult::empty(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ObjCCategoryImplDecl::getIdentifier(), getImpliedARCOwnership(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocStart(), clang::SourceLocation::getLocWithOffset(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCGCQualType(), clang::QualType::getObjCLifetime(), clang::ASTContext::getQualifiedType(), clang::ObjCIvarDecl::getSynthesize(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ObjCIvarDecl::getUsageType(), clang::ASTContext::hasSameType(), hasWrittenStorageAttribute(), clang::InitializedEntity::InitializeResult(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::Type::isArithmeticType(), clang::ObjCRuntime::isFragile(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ObjCRuntime::isNonFragile(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::Type::isObjCRetainableType(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::known_extensions(), LocPropertyAttribute(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::DeclContext::makeDeclVisibleInContext(), MarkDeclRefReferenced(), MaybeCreateExprWithCleanups(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::LangOptions::ObjCRuntime, clang::OMF_autorelease, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, P, PerformCopyInitialization(), clang::ObjCIvarDecl::Private, RequireCompleteType(), RequireNonAbstractType(), clang::ObjCPropertyImplDecl::setGetterCXXConstructor(), setImpliedPropertyAttributeForReadOnlyProperty(), clang::Decl::setInvalidDecl(), clang::ObjCPropertyImplDecl::setSetterCXXAssignment(), clang::ObjCPropertyImplDecl::Synthesize, clang::VK_LValue, clang::VK_RValue, and clang::Qualifiers::Weak.
Referenced by DefaultSynthesizeProperties().
| ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | FirstTypeName, | ||
| SourceLocation | CCLoc, | ||
| SourceLocation | TildeLoc, | ||
| UnqualifiedId & | SecondTypeName | ||
| ) |
Definition at line 5904 of file SemaExprCXX.cpp.
References ActOnTemplateIdType(), BuildPseudoDestructorExpr(), CheckArrow(), computeDeclContext(), Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::UnqualifiedId::getKind(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), getTypeName(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_TemplateId, clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::CXXScopeSpec::isSet(), isSFINAEContext(), clang::TemplateIdAnnotation::LAngleLoc, clang::OpaquePtr< QualType >::make(), clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateIdAnnotation::SS, clang::UnqualifiedId::StartLocation, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::TemplateIdAnnotation::TemplateKWLoc, and clang::TemplateIdAnnotation::TemplateNameLoc.
| ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| SourceLocation | TildeLoc, | ||
| const DeclSpec & | DS | ||
| ) |
Definition at line 6041 of file SemaExprCXX.cpp.
References BuildDecltypeType(), BuildPseudoDestructorExpr(), CheckArrow(), Context, clang::ExprError(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getTypeSpecTypeLoc(), and clang::TypeSpecTypeLoc::setNameLoc().
| void Sema::ActOnPureSpecifier | ( | Decl * | D, |
| SourceLocation | PureSpecLoc | ||
| ) |
Definition at line 13110 of file SemaDeclCXX.cpp.
References CheckPureMethod(), Diag(), clang::Decl::getFriendObjectKind(), and clang::Decl::getLocation().
| void Sema::ActOnReenterCXXMethodParameter | ( | Scope * | S, |
| ParmVarDecl * | Param | ||
| ) |
This is used to implement the constant expression evaluation part of the attribute enable_if extension.
There is nothing in standard C++ which would require reentering parameters.
Definition at line 6575 of file SemaDeclCXX.cpp.
References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), clang::NamedDecl::getDeclName(), and IdResolver.
Push the parameters of D, which must be a function, into scope.
Definition at line 1147 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), clang::Decl::getAsFunction(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getLexicalParent(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), P, and clang::Scope::setEntity().
Definition at line 6509 of file SemaDeclCXX.cpp.
References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), clang::LangAS::Count, clang::CXXRecordDecl::getDescribedClassTemplate(), and IdResolver.
| StmtResult Sema::ActOnReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp, | ||
| Scope * | CurScope | ||
| ) |
| StmtResult Sema::ActOnSEHExceptBlock | ( | SourceLocation | Loc, |
| Expr * | FilterExpr, | ||
| Stmt * | Block | ||
| ) |
Definition at line 3697 of file SemaStmt.cpp.
References Context, clang::SEHExceptStmt::Create(), Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isIntegerType(), and clang::StmtError().
| StmtResult Sema::ActOnSEHLeaveStmt | ( | SourceLocation | Loc, |
| Scope * | CurScope | ||
| ) |
Definition at line 3726 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinally(), Context, Diag(), clang::Scope::getParent(), clang::Scope::isSEHTryScope(), and clang::StmtError().
| StmtResult Sema::ActOnSEHTryBlock | ( | bool | IsCXXTry, |
| SourceLocation | TryLoc, | ||
| Stmt * | TryBlock, | ||
| Stmt * | Handler | ||
| ) |
Definition at line 3661 of file SemaStmt.cpp.
References Context, clang::SEHTryStmt::Create(), Diag(), clang::sema::FunctionScopeInfo::FirstCXXTryLoc, clang::DeclContext::getParent(), clang::ASTContext::getTargetInfo(), clang::DeclContext::isFunctionOrMethod(), clang::TargetInfo::isSEHTrySupported(), clang::SourceLocation::isValid(), clang::sema::FunctionScopeInfo::setHasSEHTry(), and clang::FunctionDecl::setUsesSEHTry().
| ExprResult Sema::ActOnSizeofParameterPackExpr | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| IdentifierInfo & | Name, | ||
| SourceLocation | NameLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
Called when an expression computing the size of a parameter pack is parsed.
| OpLoc | The location of the "sizeof" keyword. |
| Name | The name of the parameter pack whose size will be determined. |
| NameLoc | The source location of the name of the parameter pack. |
| RParenLoc | The location of the closing parentheses. |
Definition at line 827 of file SemaTemplateVariadic.cpp.
References clang::LookupResult::Ambiguous, Context, CorrectTypo(), clang::SizeOfPackExpr::Create(), CTK_ErrorRecovery, Diag(), DiagnoseAmbiguousLookup(), diagnoseTypo(), clang::ExprError(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getResultKind(), clang::Decl::isParameterPack(), LookupName(), LookupOrdinaryName, MarkAnyDeclReferenced(), clang::Name, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, PDiag(), and S.
Definition at line 11031 of file SemaDecl.cpp.
References clang::FunctionDecl::setHasSkippedBody().
| Decl * Sema::ActOnStartCategoryImplementation | ( | SourceLocation | AtCatImplLoc, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLoc, | ||
| IdentifierInfo * | CatName, | ||
| SourceLocation | CatLoc | ||
| ) |
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object.
Check that class of this category is already completely declared.
Check that CatName, category name, is not used in another implementation.
Definition at line 1796 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), CheckObjCDeclScope(), Context, clang::ObjCCategoryDecl::Create(), clang::ObjCCategoryImplDecl::Create(), CurContext, Diag(), DiagnoseObjCImplementedDeprecations(), DiagnoseUseOfDecl(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCCategoryDecl::getImplementation(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::hasDefinition(), RequireCompleteType(), clang::ObjCCategoryDecl::setImplementation(), clang::Decl::setImplicit(), and clang::Decl::setInvalidDecl().
| Decl * Sema::ActOnStartCategoryInterface | ( | SourceLocation | AtInterfaceLoc, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLoc, | ||
| ObjCTypeParamList * | typeParamList, | ||
| IdentifierInfo * | CategoryName, | ||
| SourceLocation | CategoryLoc, | ||
| Decl *const * | ProtoRefs, | ||
| unsigned | NumProtoRefs, | ||
| const SourceLocation * | ProtoLocs, | ||
| SourceLocation | EndProtoLoc | ||
| ) |
Check that class of this category is already completely declared.
Check for duplicate interface declaration for this category
Definition at line 1704 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), Category, CheckObjCDeclScope(), checkTypeParamListConsistency(), Context, clang::ObjCCategoryDecl::Create(), CurContext, Diag(), diagnoseUseOfProtocols(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCTypeParamList::getLAngleLoc(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::ObjCCategoryDecl::IsClassExtension(), clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), Previous, RequireCompleteType(), clang::Decl::setInvalidDecl(), and clang::ObjCCategoryDecl::setProtocolList().
| Decl * Sema::ActOnStartClassImplementation | ( | SourceLocation | AtClassImplLoc, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLoc, | ||
| IdentifierInfo * | SuperClassname, | ||
| SourceLocation | SuperClassLoc | ||
| ) |
Definition at line 1856 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), CheckObjCDeclScope(), Context, CorrectTypo(), clang::ObjCInterfaceDecl::Create(), clang::ObjCImplementationDecl::Create(), CTK_NonError, CurContext, clang::declaresSameEntity(), Diag(), DiagnoseObjCImplementedDeprecations(), diagnoseTypo(), ForRedeclaration, clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getImplementation(), clang::Decl::getLocation(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ObjCInterfaceDecl::hasDefinition(), LookupOrdinaryName, LookupSingleName(), PDiag(), PushOnScopeChains(), RequireCompleteType(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::ObjCInterfaceDecl::setImplementation(), clang::Decl::setInvalidDecl(), clang::ObjCInterfaceDecl::setSuperClass(), clang::ObjCInterfaceDecl::startDefinition(), and TUScope.
| Decl * Sema::ActOnStartClassInterface | ( | Scope * | S, |
| SourceLocation | AtInterfaceLoc, | ||
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLoc, | ||
| ObjCTypeParamList * | typeParamList, | ||
| IdentifierInfo * | SuperName, | ||
| SourceLocation | SuperLoc, | ||
| ArrayRef< ParsedType > | SuperTypeArgs, | ||
| SourceRange | SuperTypeArgsRange, | ||
| Decl *const * | ProtoRefs, | ||
| unsigned | NumProtoRefs, | ||
| const SourceLocation * | ProtoLocs, | ||
| SourceLocation | EndProtoLoc, | ||
| AttributeList * | AttrList | ||
| ) |
Definition at line 901 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), ActOnSuperClassOfClassInterface(), CheckObjCDeclScope(), checkTypeParamListConsistency(), Context, clang::ObjCTypeParamDecl::Create(), clang::ObjCTypeParamList::create(), clang::ObjCInterfaceDecl::Create(), CurContext, Diag(), diagnoseUseOfProtocols(), ForRedeclaration, clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::ObjCInterfaceDecl::hasDefinition(), LookupOrdinaryName, LookupSingleName(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::Decl::setInvalidDecl(), clang::ObjCInterfaceDecl::setProtocolList(), clang::ObjCInterfaceDecl::startDefinition(), and TUScope.
| void Sema::ActOnStartCXXInClassMemberInitializer | ( | ) |
Enter a new C++ default initializer scope.
After calling this, the caller must call ActOnFinishCXXInClassMemberInitializer, even if parsing or instantiating the initializer failed.
Definition at line 2683 of file SemaDeclCXX.cpp.
References PushFunctionScope().
Referenced by InstantiateInClassInitializer().
| void Sema::ActOnStartCXXMemberDeclarations | ( | Scope * | S, |
| Decl * | TagDecl, | ||
| SourceLocation | FinalLoc, | ||
| bool | IsFinalSpelledSealed, | ||
| SourceLocation | LBraceLoc | ||
| ) |
ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations.
Definition at line 12733 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::AS_public, Context, clang::CXXRecordDecl::Create(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::TagDecl::getTagKind(), clang::ASTContext::getTypeDeclType(), clang::RecordDecl::isInjectedClassName(), clang::SourceLocation::isValid(), clang::Decl::setAccess(), clang::CXXRecordDecl::setDescribedClassTemplate(), and clang::Decl::setImplicit().
| ExprResult Sema::ActOnStartCXXMemberReference | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| ParsedType & | ObjectType, | ||
| bool & | MayBePseudoDestructor | ||
| ) |
Definition at line 5630 of file SemaExprCXX.cpp.
References BuildOverloadedArrowExpr(), CheckPlaceholderExpr(), Context, clang::FixItHint::CreateReplacement(), CurContext, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::CallExpr::getCalleeDecl(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::DeclaratorDecl::getLocStart(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectOrInterfaceType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRecordType(), isThisOutsideMemberFunctionBody(), clang::OpaquePtr< QualType >::make(), MaybeConvertParenListExprToParenExpr(), noteOperatorArrows(), RequireCompleteType(), and clang::Result.
ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments.
This action should enter the scope of the given Method declaration as if we had just parsed the qualified method name. However, it should not bring the parameters into scope; that will be performed by ActOnDelayedCXXMethodParameter.
Definition at line 6592 of file SemaDeclCXX.cpp.
Definition at line 6560 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), and PushDeclContext().
| Decl * Sema::ActOnStartLinkageSpecification | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| Expr * | LangStr, | ||
| SourceLocation | LBraceLoc | ||
| ) |
ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'.
ExternLoc is the location of the 'extern', Lang is the language string literal. LBraceLoc, if valid, provides the location of the '{' brace. Otherwise, this linkage specification does not have any braces.
Definition at line 11920 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::LinkageSpecDecl::Create(), CurContext, Diag(), clang::Expr::getExprLoc(), clang::StringLiteral::getString(), clang::StringLiteral::isAscii(), clang::SourceLocation::isValid(), clang::LinkageSpecDecl::lang_c, clang::LinkageSpecDecl::lang_cxx, and PushDeclContext().
| Decl * Sema::ActOnStartNamespaceDef | ( | Scope * | NamespcScope, |
| SourceLocation | InlineLoc, | ||
| SourceLocation | NamespaceLoc, | ||
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | II, | ||
| SourceLocation | LBrace, | ||
| AttributeList * | AttrList, | ||
| UsingDirectiveDecl *& | UD | ||
| ) |
ActOnStartNamespaceDef - This is called at the start of a namespace definition.
Definition at line 7173 of file SemaDeclCXX.cpp.
References ActOnDocumentableDecl(), clang::DeclContext::addDecl(), Context, clang::NamespaceDecl::Create(), clang::UsingDirectiveDecl::Create(), CurContext, Diag(), DiagnoseNamespaceInlineMismatch(), ForRedeclaration, clang::NamespaceDecl::getAnonymousNamespace(), clang::Decl::getAttr(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), getStdNamespace(), clang::NamespaceDecl::isInline(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::DeclContext::isTranslationUnit(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupQualifiedName(), ProcessDeclAttributeList(), PushDeclContext(), PushNamespaceVisibilityAttr(), PushOnScopeChains(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and StdNamespace.
| void Sema::ActOnStartOfCompoundStmt | ( | ) |
Definition at line 319 of file SemaStmt.cpp.
Referenced by clang::Sema::CompoundScopeRAII::CompoundScopeRAII().
| Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
Definition at line 10677 of file SemaDecl.cpp.
References clang::FDK_Definition, clang::Scope::getParent(), clang::Declarator::isFunctionDeclarator(), and clang::Declarator::setFunctionDefinitionKind().
Referenced by InstantiateFunctionDefinition().
| Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S, |
| Decl * | D, | ||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
Definition at line 10837 of file SemaDecl.cpp.
References clang::ASTContext::BuiltinInfo, clang::DeclContext::containsDecl(), Context, Diag(), E, clang::Type::getAs(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getDeclsInPrototypeScope(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), I, clang::Type::isDependentType(), clang::isGenericLambdaCallOperatorSpecialization(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isLateTemplateParsed(), clang::Builtin::Context::isPredefinedLibFunction(), clang::Builtin::Context::isPredefinedRuntimeFunction(), clang::FunctionDecl::isTemplateInstantiation(), clang::Type::isVoidType(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::FunctionDecl::params(), RebuildLambdaScopeInfo(), clang::DeclContext::removeDecl(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), and clang::Sema::SkipBodyInfo::ShouldSkip.
| void Sema::ActOnStartOfLambdaDefinition | ( | LambdaIntroducer & | Intro, |
| Declarator & | ParamInfo, | ||
| Scope * | CurScope | ||
| ) |
ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda.
Definition at line 802 of file SemaLambda.cpp.
References AttributeLangSupport::C, clang::VarDecl::CallInit, clang::LambdaIntroducer::Captures, clang::VarDecl::CInit, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, clang::Type::containsUnexpandedParameterPack(), Context, clang::CopyInit, clang::frontend::CPlusPlus14, clang::FixItHint::CreateRemoval(), clang::LambdaIntroducer::Default, clang::LambdaIntroducer::DefaultLoc, clang::ASTContext::DependentTy, Diag(), clang::DirectInit, E, clang::LookupResult::empty(), clang::FTIHasNonVoidParameters(), clang::LookupResult::getAsSingle(), clang::ASTContext::getAutoDeductType(), clang::SourceRange::getBegin(), clang::sema::CapturingScopeInfo::getCapture(), clang::sema::CapturingScopeInfo::getCXXThisCapture(), clang::ASTContext::getDefaultCallingConvention(), clang::SourceRange::getEnd(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), getGenericLambdaTemplateParameterList(), clang::Decl::getLocation(), clang::sema::CapturingScopeInfo::Capture::getLocation(), clang::Declarator::getNumTypeObjects(), clang::DeclContext::getParent(), clang::Declarator::getSourceRange(), clang::Scope::getTemplateParamParent(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::VarDecl::hasLocalStorage(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::LookupResult::isAmbiguous(), clang::sema::CapturingScopeInfo::isCaptured(), clang::CXXMethodDecl::isConst(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::Declarator::isFunctionDeclarator(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Decl::isParameterPack(), clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, clang::VarDecl::ListInit, clang::ListInit, clang::Name, clang::NoInit, clang::None, clang::LambdaIntroducer::Range, clang::DeclSpec::TQ_const, and clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals.
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.
Definition at line 301 of file SemaDeclObjC.cpp.
References CheckParmsForFunctionDef(), Context, clang::ObjCMethodDecl::createImplicitParams(), Diag(), DiagnoseObjCImplementedDeprecations(), clang::LangOptions::GCOnly, clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Decl::hasAttr(), HasExplicitOwnershipAttr(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::ObjCMethodDecl::isInstanceMethod(), clang::LangOptions::NonGC, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::ObjCMethodDecl::params(), PushDeclContext(), PushFunctionScope(), and PushOnScopeChains().
| StmtResult Sema::ActOnStartOfSwitchStmt | ( | SourceLocation | SwitchLoc, |
| Expr * | Cond, | ||
| Decl * | CondVar | ||
| ) |
Definition at line 583 of file SemaStmt.cpp.
References Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), clang::Type::isEnumeralType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), S, and clang::StmtError().
| Decl * Sema::ActOnStartProtocolInterface | ( | SourceLocation | AtProtoInterfaceLoc, |
| IdentifierInfo * | ProtocolName, | ||
| SourceLocation | ProtocolLoc, | ||
| Decl *const * | ProtoRefNames, | ||
| unsigned | NumProtoRefs, | ||
| const SourceLocation * | ProtoLocs, | ||
| SourceLocation | EndProtoLoc, | ||
| AttributeList * | AttrList | ||
| ) |
Check then save referenced protocols.
Definition at line 1124 of file SemaDeclObjC.cpp.
References ActOnObjCContainerStartDefinition(), CheckForwardProtocolDeclarationForCircularDependency(), CheckObjCDeclScope(), Context, clang::ObjCProtocolDecl::Create(), CurContext, Diag(), diagnoseUseOfProtocols(), ForRedeclaration, clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), LookupProtocol(), mergeDeclAttributes(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::ObjCList< T >::set(), clang::ObjCProtocolDecl::setProtocolList(), clang::ObjCProtocolDecl::startDefinition(), and TUScope.
| void Sema::ActOnStartSEHFinallyBlock | ( | ) |
Definition at line 3711 of file SemaStmt.cpp.
| void Sema::ActOnStartStmtExpr | ( | ) |
Definition at line 11256 of file SemaExpr.cpp.
| Decl * Sema::ActOnStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc, |
| Expr * | AssertExpr, | ||
| Expr * | AssertMessageExpr, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 12157 of file SemaDeclCXX.cpp.
References BuildStaticAssertDeclaration(), DiagnoseUnexpandedParameterPack(), and UPPC_StaticAssertExpression.
| ExprResult Sema::ActOnStmtExpr | ( | SourceLocation | LPLoc, |
| Stmt * | SubStmt, | ||
| SourceLocation | RPLoc | ||
| ) |
Definition at line 11269 of file SemaExpr.cpp.
References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_empty(), Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::InitializedEntity::InitializeResult(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), maybeRebuildARCConsumingStmt(), clang::CompoundStmt::setLastStmt(), clang::LabelStmt::setSubStmt(), and clang::ASTContext::VoidTy.
| void Sema::ActOnStmtExprError | ( | ) |
Definition at line 11260 of file SemaExpr.cpp.
| ExprResult Sema::ActOnStringLiteral | ( | ArrayRef< Token > | StringToks, |
| Scope * | UDLScope = nullptr |
||
| ) |
ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g.
"foo" "bar" L"baz").
"foo" "bar" L"baz"). The result string has to handle string concatenation ([C99 5.1.1.2, translation phase #6]), so it may come from multiple tokens. However, the common case is that StringToks points to one string.
Definition at line 1545 of file SemaExpr.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::QualType::addConst(), clang::StringLiteral::Ascii, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::ASTContext::DeclarationNames, Diag(), clang::ExprError(), clang::IdentifierTable::get(), clang::ASTContext::getAddrSpaceQualType(), clang::ASTContext::getArrayDecayedType(), clang::StringLiteral::getCodeUnit(), clang::ASTContext::getConstantArrayType(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::ASTContext::getIntWidth(), clang::StringLiteral::getLength(), clang::ASTContext::getSizeType(), clang::ASTContext::getTrivialTypeSourceInfo(), getUDSuffixLoc(), clang::ASTContext::getWideCharType(), I, clang::ASTContext::Idents, clang::Type::isUnsignedIntegerType(), clang::None, clang::ArrayType::Normal, clang::LangAS::opencl_constant, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::ASTContext::UnsignedCharTy, clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.
| void Sema::ActOnSuperClassOfClassInterface | ( | Scope * | S, |
| SourceLocation | AtInterfaceLoc, | ||
| ObjCInterfaceDecl * | IDecl, | ||
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassLoc, | ||
| IdentifierInfo * | SuperName, | ||
| SourceLocation | SuperLoc, | ||
| ArrayRef< ParsedType > | SuperTypeArgs, | ||
| SourceRange | SuperTypeArgsRange | ||
| ) |
Definition at line 466 of file SemaDeclObjC.cpp.
References actOnObjCTypeArgsAndProtocolQualifiers(), Context, CorrectTypo(), CreateParsedType(), CTK_ErrorRecovery, clang::declaresSameEntity(), Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::NamedDecl::getDeclName(), clang::SourceRange::getEnd(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::TypeLoc::getLocEnd(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isObjCObjectType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), LookupOrdinaryName, LookupSingleName(), PDiag(), RequireCompleteType(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::ObjCInterfaceDecl::setSuperClass(), and TUScope.
Referenced by ActOnStartClassInterface().
| ExprResult Sema::ActOnSuperMessage | ( | Scope * | S, |
| SourceLocation | SuperLoc, | ||
| Selector | Sel, | ||
| SourceLocation | LBracLoc, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| SourceLocation | RBracLoc, | ||
| MultiExprArg | Args | ||
| ) |
Definition at line 2135 of file SemaExprObjC.cpp.
References BuildClassMessage(), BuildInstanceMessage(), Context, Diag(), clang::ExprError(), clang::ObjCMethodDecl::getClassInterface(), getCurFunction(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ASTContext::getObjCObjectPointerType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCInterfaceDecl::getSuperClassType(), clang::ObjCMethodDecl::isInstanceMethod(), clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, and tryCaptureObjCSelf().
| bool Sema::ActOnSuperScopeSpecifier | ( | SourceLocation | SuperLoc, |
| SourceLocation | ColonColonLoc, | ||
| CXXScopeSpec & | SS | ||
| ) |
The parser has parsed a '__super' nested-name-specifier.
| SuperLoc | The location of the '__super' keyword. |
| ColonColonLoc | The location of the '::'. |
| SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier. |
Definition at line 253 of file SemaCXXScopeSpec.cpp.
References Context, Diag(), getCurScope(), clang::NamedDecl::getName(), clang::CXXRecordDecl::getNumBases(), clang::DeclContext::getParent(), clang::CXXRecordDecl::isLambda(), clang::CXXScopeSpec::MakeSuper(), and S.
| Decl * Sema::ActOnTag | ( | Scope * | S, |
| unsigned | TagSpec, | ||
| TagUseKind | TUK, | ||
| SourceLocation | KWLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| AttributeList * | Attr, | ||
| AccessSpecifier | AS, | ||
| SourceLocation | ModulePrivateLoc, | ||
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| bool & | OwnedDecl, | ||
| bool & | IsDependent, | ||
| SourceLocation | ScopedEnumKWLoc, | ||
| bool | ScopedEnumUsesClassTag, | ||
| TypeResult | UnderlyingType, | ||
| bool | IsTypeSpecifier, | ||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
This is invoked when we see 'struct foo' or 'struct {'.
In the former case, Name will be non-null. In the later case, Name will be null. TagSpec indicates what kind of tag this is. TUK indicates whether this is a reference/declaration/definition of a tag.
| IsTypeSpecifier | true if this is a type-specifier (or trailing-type-specifier) other than one in an alias-declaration. |
| SkipBody | If non-null, will be set to indicate if the caller should skip the definition of this tag and treat it as if it were a declaration. |
Definition at line 11850 of file SemaDecl.cpp.
References clang::LookupResult::addDecl(), clang::AS_none, clang::LookupResult::clear(), clang::Scope::containedInPrototypeScope(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), createFriendTagNNSFixIt(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), clang::Decl::FOK_Undeclared, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::Type::getAs(), clang::Type::getAsTagDecl(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::TargetInfo::getCXXABI(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::TagDecl::getDefinition(), clang::DeclContext::getEnclosingNamespaceContext(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::EnumDecl::getIntegerType(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), clang::ASTContext::getTagDeclType(), getTagInjectionContext(), getTagInjectionScope(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeWithKeyword::getTagTypeKindName(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::CanQual< T >::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::ASTContext::IntTy, isAcceptableTagRedeclContext(), clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXClassMember(), clang::Scope::isDeclScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), clang::DeclContext::isFunctionOrMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::TargetCXXABI::isMicrosoft(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::EnumDecl::isScoped(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTranslationUnit(), clang::SourceLocation::isValid(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::Name, clang::LookupResult::Filter::next(), Previous, clang::Sema::SkipBodyInfo::Previous, clang::LookupResult::resolveKind(), clang::Result, clang::Decl::setAccess(), clang::ASTContext::setFILEDecl(), clang::EnumDecl::setIntegerType(), clang::EnumDecl::setIntegerTypeSourceInfo(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setModulePrivate(), clang::Decl::setObjectOfFriendDecl(), clang::EnumDecl::setPromotionType(), clang::TagDecl::setQualifierInfo(), clang::LookupResult::setRedeclarationKind(), clang::TagDecl::setTemplateParameterListsInfo(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TagDecl::startDefinition(), clang::TSK_ExplicitSpecialization, clang::TTK_Enum, and clang::LookupResult::wasNotFoundInCurrentInstantiation().
Referenced by ActOnTemplatedFriendTag().
ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.
Definition at line 12814 of file SemaDecl.cpp.
References clang::TagDecl::isBeingDefined(), and clang::Decl::setInvalidDecl().
| void Sema::ActOnTagFinishDefinition | ( | Scope * | S, |
| Decl * | TagDecl, | ||
| SourceLocation | RBraceLoc | ||
| ) |
ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).
Definition at line 12770 of file SemaDecl.cpp.
References clang::Decl::getDeclContext(), clang::TagDecl::isBeingDefined(), clang::DeclContext::isFileContext(), clang::Decl::isInvalidDecl(), clang::TagDecl::setRBraceLoc(), and clang::Decl::setTopLevelDeclInObjCContainer().
| void Sema::ActOnTagFinishSkippedDefinition | ( | SkippedDefinitionContext | Context | ) |
Definition at line 1097 of file SemaDecl.cpp.
References Context.
ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e.g., for an enumeration, class, struct, or union).
Definition at line 12709 of file SemaDecl.cpp.
| Sema::SkippedDefinitionContext Sema::ActOnTagStartSkippedDefinition | ( | Scope * | S, |
| Decl * | TD | ||
| ) |
Invoked when we enter a tag definition that we're skipping.
Definition at line 1083 of file SemaDecl.cpp.
References getDefinition(), clang::Result, and clang::Scope::setEntity().
| TypeResult Sema::ActOnTagTemplateIdType | ( | TagUseKind | TUK, |
| TypeSpecifierType | TagSpec, | ||
| SourceLocation | TagLoc, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| TemplateTy | TemplateD, | ||
| SourceLocation | TemplateLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgsIn, | ||
| SourceLocation | RAngleLoc | ||
| ) |
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply<U>.
Definition at line 2307 of file SemaTemplate.cpp.
References Context, clang::FixItHint::CreateReplacement(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::NamedDecl::getIdentifier(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), I, clang::QualType::isNull(), clang::TypeLocBuilder::push(), clang::Result, clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), and clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc().
| Decl * Sema::ActOnTemplateDeclarator | ( | Scope * | S, |
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| Declarator & | D | ||
| ) |
Definition at line 6544 of file SemaTemplate.cpp.
| Decl * Sema::ActOnTemplatedFriendTag | ( | Scope * | S, |
| SourceLocation | FriendLoc, | ||
| unsigned | TagSpec, | ||
| SourceLocation | TagLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| AttributeList * | Attr, | ||
| MultiTemplateParamsArg | TempParamLists | ||
| ) |
Handle a friend tag declaration where the scope specifier was templated.
Definition at line 12285 of file SemaDeclCXX.cpp.
References ActOnTag(), clang::DeclContext::addDecl(), clang::AS_public, clang::TypeLoc::castAs(), CheckClassTemplate(), CheckTypenameType(), clang::FriendDecl::Create(), clang::ASTContext::CreateTypeSourceInfo(), CurContext, Diag(), clang::ASTContext::getDependentNameType(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeWithKeyword::getTagTypeKindName(), clang::TemplateParameterList::getTemplateLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), MatchTemplateParametersToScopeSpecifier(), clang::Name, clang::Decl::setAccess(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::FriendDecl::setUnsupportedFriend(), clang::TemplateParameterList::size(), and TUK_Friend.
| TypeResult Sema::ActOnTemplateIdType | ( | CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| TemplateTy | Template, | ||
| SourceLocation | TemplateLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgs, | ||
| SourceLocation | RAngleLoc, | ||
| bool | IsCtorOrDtorName = false |
||
| ) |
Definition at line 2241 of file SemaTemplate.cpp.
References Context, clang::ETK_None, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), I, clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::TypeLocBuilder::push(), clang::Result, clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), and clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc().
Referenced by ActOnPseudoDestructorExpr().
| TemplateParameterList * Sema::ActOnTemplateParameterList | ( | unsigned | Depth, |
| SourceLocation | ExportLoc, | ||
| SourceLocation | TemplateLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ArrayRef< Decl * > | Params, | ||
| SourceLocation | RAngleLoc | ||
| ) |
ActOnTemplateParameterList - Builds a TemplateParameterList that contains the template parameters in Params/NumParams.
Definition at line 813 of file SemaTemplate.cpp.
References Context, clang::TemplateParameterList::Create(), Diag(), and clang::SourceLocation::isValid().
| Decl * Sema::ActOnTemplateTemplateParameter | ( | Scope * | S, |
| SourceLocation | TmpLoc, | ||
| TemplateParameterList * | Params, | ||
| SourceLocation | EllipsisLoc, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| unsigned | Depth, | ||
| unsigned | Position, | ||
| SourceLocation | EqualLoc, | ||
| ParsedTemplateArgument | Default | ||
| ) |
ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g.
T in template <template <typename> class T> class array) has been parsed. S is the current scope.
Definition at line 737 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, Context, clang::TemplateTemplateParmDecl::Create(), Depth, Diag(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsTemplate(), clang::TemplateParameterList::getLAngleLoc(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::ASTContext::getTranslationUnitDecl(), clang::ParsedTemplateArgument::isInvalid(), clang::SourceLocation::isInvalid(), clang::TemplateName::isNull(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), clang::Name, Position, clang::Decl::setAccess(), clang::TemplateTemplateParmDecl::setDefaultArgument(), clang::Decl::setInvalidDecl(), clang::TemplateParameterList::size(), and translateTemplateArgument().
| void Sema::ActOnTranslationUnitScope | ( | Scope * | S | ) |
Definition at line 68 of file Sema.cpp.
References Context, clang::ASTContext::getTranslationUnitDecl(), and S.
Referenced by clang::Parser::Initialize().
| NamedDecl * Sema::ActOnTypedefDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous | ||
| ) |
Definition at line 5176 of file SemaDecl.cpp.
References clang::LookupResult::clear(), Diag(), clang::DeclSpec::getConceptSpecLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::CXXScopeSpec::getRange(), clang::UnqualifiedId::getSourceRange(), clang::TypeSourceInfo::getType(), clang::UnqualifiedId::IK_Identifier, clang::DeclSpec::isConceptSpecified(), clang::DeclSpec::isConstexprSpecified(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::UnqualifiedId::Kind, clang::Declarator::setInvalidType(), clang::Declarator::setRedeclaration(), and clang::UnqualifiedId::StartLocation.
| void Sema::ActOnTypedefedProtocols | ( | SmallVectorImpl< Decl * > & | ProtocolRefs, |
| IdentifierInfo * | SuperName, | ||
| SourceLocation | SuperLoc | ||
| ) |
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols.
Definition at line 1031 of file SemaDeclObjC.cpp.
References clang::Type::getAs(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), and TUScope.
| NamedDecl * Sema::ActOnTypedefNameDecl | ( | Scope * | S, |
| DeclContext * | DC, | ||
| TypedefNameDecl * | NewTD, | ||
| LookupResult & | Previous, | ||
| bool & | Redeclaration | ||
| ) |
ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'.
Definition at line 5259 of file SemaDecl.cpp.
References Context, clang::LookupResult::empty(), filterNonConflictingPreviousTypedefDecls(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getRedeclContext(), clang::Decl::isInvalidDecl(), clang::DeclContext::isTranslationUnit(), clang::ASTContext::setFILEDecl(), clang::ASTContext::setjmp_bufDecl(), clang::ASTContext::setsigjmp_bufDecl(), and clang::ASTContext::setucontext_tDecl().
Referenced by ActOnAliasDeclaration().
| TypeResult Sema::ActOnTypeName | ( | Scope * | S, |
| Declarator & | D | ||
| ) |
Definition at line 4963 of file SemaType.cpp.
References clang::Declarator::AliasDeclContext, clang::Declarator::AliasTemplateContext, CheckExtraCXXDefaultArguments(), checkUnusedDeclAttributes(), CreateParsedType(), clang::Declarator::getContext(), clang::Declarator::getIdentifier(), getLangOpts(), GetTypeForDeclarator(), clang::Declarator::isInvalidType(), and clang::Declarator::ObjCParameterContext.
Referenced by actOnObjCTypeArgsOrProtocolQualifiers(), and clang::Parser::ParseTypeName().
| TypeResult Sema::ActOnTypenameType | ( | Scope * | S, |
| SourceLocation | TypenameLoc, | ||
| const CXXScopeSpec & | SS, | ||
| const IdentifierInfo & | II, | ||
| SourceLocation | IdLoc | ||
| ) |
Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
| S | The scope in which this typename type occurs. |
| TypenameLoc | the location of the 'typename' keyword |
| SS | the nested-name-specifier following the typename (e.g., 'T::'). |
| II | the identifier we're retrieving (e.g., 'type' in the example). |
| IdLoc | the location of the identifier. |
Definition at line 8004 of file SemaTemplate.cpp.
References clang::TypeLoc::castAs(), Context, clang::FixItHint::CreateRemoval(), clang::ASTContext::CreateTypeSourceInfo(), Diag(), clang::ETK_None, clang::ETK_Typename, clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::Scope::getTemplateParamParent(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::DependentNameTypeLoc::setQualifierLoc().
Referenced by clang::Parser::TryAnnotateTypeOrScopeToken().
| TypeResult Sema::ActOnTypenameType | ( | Scope * | S, |
| SourceLocation | TypenameLoc, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateLoc, | ||
| TemplateTy | TemplateName, | ||
| SourceLocation | TemplateNameLoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgs, | ||
| SourceLocation | RAngleLoc | ||
| ) |
Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>".
| S | The scope in which this typename type occurs. |
| TypenameLoc | the location of the 'typename' keyword |
| SS | the nested-name-specifier following the typename (e.g., 'T::'). |
| TemplateLoc | the location of the 'template' keyword, if any. |
| TemplateName | The template name. |
| TemplateNameLoc | The location of the template name. |
| LAngleLoc | The location of the opening angle bracket ('<'). |
| TemplateArgs | The template arguments. |
| RAngleLoc | The location of the closing angle bracket ('>'). |
Definition at line 8040 of file SemaTemplate.cpp.
References Builder, Context, clang::FixItHint::CreateRemoval(), Diag(), clang::ETK_Typename, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::Scope::getTemplateParamParent(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), I, clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TypeLocBuilder::push(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), and clang::TemplateArgumentListInfo::size().
| Decl * Sema::ActOnTypeParameter | ( | Scope * | S, |
| bool | Typename, | ||
| SourceLocation | EllipsisLoc, | ||
| SourceLocation | KeyLoc, | ||
| IdentifierInfo * | ParamName, | ||
| SourceLocation | ParamNameLoc, | ||
| unsigned | Depth, | ||
| unsigned | Position, | ||
| SourceLocation | EqualLoc, | ||
| ParsedType | DefaultArg | ||
| ) |
ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.
Typename specifies whether the keyword "typename" was used to declare the type parameter (otherwise, "class" was used), and KeyLoc is the location of the "class" or "typename" keyword. ParamName is the name of the parameter (NULL indicates an unnamed template parameter) and ParamNameLoc is the location of the parameter name (if any). If the type parameter has a default argument, it will be added later via ActOnTypeParameterDefault.
Definition at line 548 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, Context, clang::TemplateTypeParmDecl::Create(), Depth, Diag(), clang::ASTContext::getTranslationUnitDecl(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), Position, clang::Decl::setAccess(), clang::TemplateTypeParmDecl::setDefaultArgument(), and clang::Decl::setInvalidDecl().
| ExprResult Sema::ActOnTypeTrait | ( | TypeTrait | Kind, |
| SourceLocation | KWLoc, | ||
| ArrayRef< ParsedType > | Args, | ||
| SourceLocation | RParenLoc | ||
| ) |
Parsed one of the type trait support pseudo-functions.
Definition at line 4195 of file SemaExprCXX.cpp.
References BuildTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), and I.
| ExprResult Sema::ActOnUnaryExprOrTypeTraitExpr | ( | SourceLocation | OpLoc, |
| UnaryExprOrTypeTrait | ExprKind, | ||
| bool | IsType, | ||
| void * | TyOrEx, | ||
| SourceRange | ArgRange | ||
| ) |
ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __alignof Note that the ArgRange is invalid if isType is false.
Definition at line 3957 of file SemaExpr.cpp.
References clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and clang::Result.
| ExprResult Sema::ActOnUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | Op, | ||
| Expr * | Input | ||
| ) |
Definition at line 11219 of file SemaExpr.cpp.
References ConvertTokenKindToUnaryOpcode().
Definition at line 9663 of file SemaDecl.cpp.
References clang::VarDecl::CallInit, Context, clang::frontend::CPlusPlus, clang::InitializationKind::CreateDefault(), clang::VarDecl::DeclarationOnly, clang::VarDecl::Definition, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getBaseElementType(), clang::Type::getContainedAutoType(), clang::InitializedEntity::InitializeVariable(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXRecordDecl::isPOD(), clang::Type::isReferenceType(), clang::None, clang::LangAS::opencl_constant, clang::SC_Extern, clang::SC_PrivateExtern, clang::SC_Static, and clang::VarDecl::TentativeDefinition.
Referenced by ActOnOpenMPPrivateClause(), ActOnOpenMPReductionClause(), checkCoroutineContext(), EndOpenMPDSABlock(), and InstantiateVariableInitializer().
| Decl * Sema::ActOnUsingDeclaration | ( | Scope * | CurScope, |
| AccessSpecifier | AS, | ||
| bool | HasUsingKeyword, | ||
| SourceLocation | UsingLoc, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name, | ||
| AttributeList * | AttrList, | ||
| bool | HasTypenameKeyword, | ||
| SourceLocation | TypenameLoc | ||
| ) |
Definition at line 7644 of file SemaDeclCXX.cpp.
References BuildUsingDeclaration(), clang::frontend::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::Scope::DeclScope, Diag(), DiagnoseUnexpandedParameterPack(), clang::SourceRange::getBegin(), clang::Scope::getFlags(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::UnqualifiedId::getLocStart(), clang::DeclarationNameInfo::getName(), GetNameFromUnqualifiedId(), clang::CXXScopeSpec::getRange(), clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_ConstructorTemplateId, clang::UnqualifiedId::IK_ConversionFunctionId, clang::UnqualifiedId::IK_DestructorName, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::UnqualifiedId::IK_TemplateId, clang::TemplateIdAnnotation::LAngleLoc, PushOnScopeChains(), clang::TemplateIdAnnotation::RAngleLoc, clang::UnqualifiedId::TemplateId, and UPPC_UsingDeclaration.
| Decl * Sema::ActOnUsingDirective | ( | Scope * | CurScope, |
| SourceLocation | UsingLoc, | ||
| SourceLocation | NamespcLoc, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | NamespcName, | ||
| AttributeList * | AttrList | ||
| ) |
Definition at line 7545 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::clear(), Context, clang::UsingDirectiveDecl::Create(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::LookupResult::getAsSingle(), clang::SourceManager::getExpansionLoc(), clang::Scope::getFlags(), clang::NestedNameSpecifier::getKind(), getOrCreateStdNamespace(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getWithLocInContext(), clang::NestedNameSpecifier::Global, clang::LookupResult::isAmbiguous(), clang::SourceManager::isInMainFile(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::IdentifierInfo::isStr(), clang::Scope::isTemplateParamScope(), IsUsingDirectiveInToplevelContext(), clang::SourceLocation::isValid(), LookupNamespaceName, LookupParsedName(), ProcessDeclAttributeList(), PushUsingDirective(), clang::LookupResult::resolveKind(), SourceMgr, and TryNamespaceTypoCorrection().
| ExprResult Sema::ActOnVAArg | ( | SourceLocation | BuiltinLoc, |
| Expr * | E, | ||
| ParsedType | Ty, | ||
| SourceLocation | RPLoc | ||
| ) |
Definition at line 11851 of file SemaExpr.cpp.
| NamedDecl * Sema::ActOnVariableDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| bool & | AddToScope | ||
| ) |
Definition at line 5697 of file SemaDecl.cpp.
References clang::Decl::addAttr(), checkDLLAttributeRedeclaration(), clang::LookupResult::clear(), clang::DeclSpec::containsPlaceholderType(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::VarDecl::Create(), clang::VarTemplateDecl::Create(), clang::FixItHint::CreateRemoval(), clang::DeclAttrsMatchCUDAMode(), Diag(), E, clang::LookupResult::empty(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::DeclarationName::getAsIdentifierInfo(), clang::Declarator::getAsmLabel(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VarDecl::getDescribedVarTemplate(), clang::Scope::getFnParent(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::Declarator::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), getMSManglingNumber(), clang::IdentifierInfo::getName(), clang::Declarator::getName(), clang::Scope::getParent(), clang::Type::getPointeeType(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), clang::DeclSpec::getSpecifierName(), clang::VarDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::ASTContext::getTargetInfo(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), hasParsedAttr(), I, clang::UnqualifiedId::IK_TemplateId, clang::DeclSpec::isConceptSpecified(), clang::DeclSpec::isConstexprSpecified(), clang::QualType::isConstQualified(), isDeclExternC(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::Type::isEventT(), clang::Redeclarable< decl_type >::isFirstDecl(), isFunctionDefinitionDiscarded(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionPointerType(), clang::Type::isHalfType(), clang::DeclarationName::isIdentifier(), isIncompleteDeclExternC(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::VarDecl::isLocalVarDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::Type::isSamplerT(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isShadowed(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::IdentifierInfo::isStr(), clang::TargetInfo::isTLSSupported(), clang::DeclContext::isTranslationUnit(), clang::TargetInfo::isValidGCCRegisterName(), clang::Name, clang::LangAS::opencl_global, clang::LangAS::opencl_local, S, clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_unspecified, clang::VarDecl::setConcept(), clang::VarDecl::setConstexpr(), clang::VarDecl::setDescribedVarTemplate(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::ASTContext::setManglingNumber(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Declarator::setRedeclaration(), clang::ASTContext::setStaticLocalNumber(), clang::VarDecl::setStorageClass(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::VarDecl::setTSCSpec(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StorageClassSpecToVarDeclStorageClass(), clang::UnqualifiedId::TemplateId, clang::TSCS_thread_local, and clang::DeclSpec::TSCS_thread_local.
| DeclResult Sema::ActOnVarTemplateSpecialization | ( | Scope * | S, |
| Declarator & | D, | ||
| TypeSourceInfo * | DI, | ||
| SourceLocation | TemplateKWLoc, | ||
| TemplateParameterList * | TemplateParams, | ||
| StorageClass | SC, | ||
| bool | IsPartialSpecialization | ||
| ) |
Definition at line 2484 of file SemaTemplate.cpp.
References clang::LookupResult::addDecl(), clang::anyDependentTemplateArguments(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::VarTemplateSpecializationDecl::Create(), clang::VarTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::VarTemplateDecl::findPartialSpecialization(), clang::VarTemplateDecl::findSpecialization(), clang::Decl::getAccess(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getIdentifierLoc(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::Declarator::getName(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarTemplateSpecializationDecl::getSpecializationKind(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), I, clang::UnqualifiedId::IK_TemplateId, clang::TemplateName::isDependent(), clang::VarDecl::isOutOfLine(), isSameAsPrimaryTemplate(), clang::VarDecl::isStaticDataMember(), clang::SourceLocation::isValid(), makeTemplateArgumentListInfo(), MarkUsedTemplateParameters(), clang::Name, clang::SC_Extern, clang::Decl::setAccess(), clang::VarDecl::setInstantiationOfStaticDataMember(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), clang::VarTemplatePartialSpecializationDecl::setMemberSpecialization(), clang::Declarator::setRedeclaration(), clang::VarTemplateSpecializationDecl::setSpecializationKind(), clang::VarTemplateSpecializationDecl::setTemplateArgsInfo(), clang::VarTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::TemplateArgumentListInfo::size(), clang::UnqualifiedId::TemplateId, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
| StmtResult Sema::ActOnWhileStmt | ( | SourceLocation | WhileLoc, |
| FullExprArg | Cond, | ||
| Decl * | CondVar, | ||
| Stmt * | Body | ||
| ) |
Definition at line 1225 of file SemaStmt.cpp.
References Context, clang::Sema::FullExprArg::release(), and clang::StmtError().
| void Sema::AddAlignedAttr | ( | SourceRange | AttrRange, |
| Decl * | D, | ||
| Expr * | E, | ||
| unsigned | SpellingListIndex, | ||
| bool | IsPackExpansion | ||
| ) |
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
Definition at line 3113 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, Diag(), clang::ExpectedVariableFieldOrTag, clang::ExpectedVariableOrField, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::TargetInfo::getMaxTLSAlign(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetInfo::isTLSSupported(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::SC_Register, clang::VarDecl::TLS_None, clang::ASTContext::toCharUnitsFromBits(), and VerifyIntegerConstantExpression().
Referenced by handleAlignedAttr(), and instantiateDependentAlignedAttr().
| void Sema::AddAlignedAttr | ( | SourceRange | AttrRange, |
| Decl * | D, | ||
| TypeSourceInfo * | T, | ||
| unsigned | SpellingListIndex, | ||
| bool | IsPackExpansion | ||
| ) |
Definition at line 3216 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and Context.
| void Sema::AddAlignmentAttributesForRecord | ( | RecordDecl * | RD | ) |
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.
Definition at line 115 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, PackContext, and Stack.
| void Sema::AddAlignValueAttr | ( | SourceRange | AttrRange, |
| Decl * | D, | ||
| Expr * | E, | ||
| unsigned | SpellingListIndex | ||
| ) |
AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
Definition at line 3029 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Decl::getSourceRange(), clang::Type::isAnyPointerType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Type::isReferenceType(), clang::Expr::isValueDependent(), and VerifyIntegerConstantExpression().
Referenced by handleAlignValueAttr(), and instantiateDependentAlignValueAttr().
| void Sema::AddAnyMethodToGlobalPool | ( | Decl * | D | ) |
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
Definition at line 268 of file SemaDeclObjC.cpp.
References AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), and clang::ObjCMethodDecl::isInstanceMethod().
| void Sema::AddArgumentDependentLookupCandidates | ( | DeclarationName | Name, |
| SourceLocation | Loc, | ||
| ArrayRef< Expr * > | Args, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | PartialOverloading = false |
||
| ) |
Add function candidates found via argument-dependent lookup to the set of overloading candidates.
This routine performs argument-dependent name lookup based on the given function name (which may also be an operator name) and adds all of the overload candidates found by ADL to the overload candidate set (C++ [basic.lookup.argdep]).
Definition at line 8434 of file SemaOverload.cpp.
References AddOverloadCandidate(), AddTemplateOverloadCandidate(), ArgumentDependentLookup(), clang::AS_none, clang::OverloadCandidateSet::begin(), clang::ADLResult::begin(), E, clang::OverloadCandidateSet::end(), clang::ADLResult::end(), clang::ADLResult::erase(), I, and clang::DeclAccessPair::make().
Referenced by AddOverloadedCallCandidates(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
| void Sema::AddAssumeAlignedAttr | ( | SourceRange | AttrRange, |
| Decl * | D, | ||
| Expr * | E, | ||
| Expr * | OE, | ||
| unsigned | SpellingListIndex | ||
| ) |
AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
Definition at line 1316 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), Context, Diag(), clang::SourceRange::getBegin(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), I, clang::Expr::isIntegerConstantExpr(), isValidPointerAttrType(), and clang::Expr::isValueDependent().
Referenced by handleAssumeAlignedAttr(), and instantiateDependentAssumeAlignedAttr().
| void Sema::AddBuiltinCandidate | ( | QualType | ResultTy, |
| QualType * | ParamTys, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | IsAssignmentOperator = false, |
||
| unsigned | NumContextualBoolArguments = 0 |
||
| ) |
AddBuiltinCandidate - Add a candidate for a built-in operator.
ResultTy and ParamTys are the result and parameter types of the built-in candidate, respectively. Args and NumArgs are the arguments being passed to the candidate. IsAssignmentOperator should be true when this built-in candidate is an assignment operator. NumContextualBoolArguments is the number of arguments (at the beginning of the argument list) that will be contextually converted to bool.
Definition at line 6753 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::ASTContext::BoolTy, clang::OverloadCandidate::BuiltinTypes, Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidate::IsSurrogate, clang::DeclAccessPair::make(), clang::ovl_fail_bad_conversion, clang::OverloadCandidate::ParamTypes, clang::OverloadCandidate::ResultTy, TryContextuallyConvertToBool(), TryCopyInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.
Referenced by AddBuiltinAssignmentOperatorCandidates().
| void Sema::AddBuiltinOperatorCandidates | ( | OverloadedOperatorKind | Op, |
| SourceLocation | OpLoc, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet | ||
| ) |
AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (C++ [over.built]), based on the operator Op and the arguments given.
For example, if the operator is a binary '+', this routine might add "int operator+(int, int)" to cover integer addition.
Definition at line 8243 of file SemaOverload.cpp.
References clang::Qualifiers::addConst(), CollectVRQualifiers(), Context, clang::NUM_OVERLOADED_OPERATORS, and clang::OO_None.
Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), and FindConditionalOverload().
| void Sema::AddCFAuditedAttribute | ( | Decl * | D | ) |
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.
Definition at line 473 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, clang::Preprocessor::getPragmaARCCFCodeAuditedLoc(), clang::Decl::hasAttr(), clang::SourceLocation::isValid(), and PP.
| void Sema::AddConversionCandidate | ( | CXXConversionDecl * | Conversion, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| Expr * | From, | ||
| QualType | ToType, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | AllowObjCConversionOnExplicit | ||
| ) |
AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over.match.conv], C++ [over.match.copy]).
From is the expression we're converting from, and ToType is the type that we're eventually trying to convert to (which may or may not be the same type as the type that the conversion function produces).
Definition at line 6379 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::ImplicitConversionSequence::BadConversion, CheckEnableIf(), clang::CK_FunctionToPointerDecay, clang::Expr::Classify(), Context, clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, DeduceReturnType(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FinalConversion, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::GetConversionRank(), clang::CXXConversionDecl::getConversionType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Expr::getExprLoc(), getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionDecl::getPrimaryTemplate(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::ICK_Lvalue_To_Rvalue, clang::ICR_Exact_Match, clang::OverloadCandidate::IgnoreObjectArgument, isAllowableExplicitConversion(), clang::ImplicitConversionSequence::isBad(), isCompleteType(), IsDerivedFrom(), clang::CXXConversionDecl::isExplicit(), clang::OverloadCandidateSet::isNewCandidate(), clang::Type::isRValueReferenceType(), clang::OverloadCandidate::IsSurrogate, clang::None, clang::ImplicitCastExpr::OnStack, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_final_conversion, clang::ovl_fail_enable_if, clang::ovl_fail_final_conversion_not_exact, clang::ovl_fail_trivial_conversion, clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setAsIdentityConversion(), clang::StandardConversionSequence::setFromType(), clang::ImplicitConversionSequence::StandardConversion, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::OverloadCandidate::Viable, clang::VK_LValue, and clang::VK_RValue.
Referenced by AddTemplateConversionCandidate(), collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void Sema::addExternalSource | ( | ExternalSemaSource * | E | ) |
Registers an external source.
If an external source already exists, creates a multiplex external source and appends to it.
| [in] | E | - A non-null external sema source. |
Definition at line 327 of file Sema.cpp.
References E.
Referenced by clang::ASTReader::InitializeSema().
|
inline |
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
Definition at line 3187 of file Sema.h.
Referenced by ActOnAtEnd(), and AddAnyMethodToGlobalPool().
| void Sema::AddFunctionCandidates | ( | const UnresolvedSetImpl & | Fns, |
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs = nullptr, |
||
| bool | SuppressUserConversions = false, |
||
| bool | PartialOverloading = false |
||
| ) |
Add all of the function declarations in the given function set to the overload candidate set.
Definition at line 6033 of file SemaOverload.cpp.
References AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::UnresolvedSetImpl::begin(), Context, E, clang::UnresolvedSetImpl::end(), clang::Decl::getDeclContext(), clang::FunctionTemplateDecl::getTemplatedDecl(), and clang::NamedDecl::getUnderlyingDecl().
Referenced by BuildLiteralOperatorCall(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
| void Sema::AddImplicitlyDeclaredMembersToClass | ( | CXXRecordDecl * | ClassDecl | ) |
AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1).
This routine can only be executed just before the definition of the class is complete.
Definition at line 6454 of file SemaDeclCXX.cpp.
References DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), getLangOpts(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CXXRecordDecl::hasUserDeclaredCopyAssignment(), clang::CXXRecordDecl::hasUserDeclaredCopyConstructor(), clang::CXXRecordDecl::hasUserDeclaredDestructor(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForDestructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::ASTContext::NumImplicitCopyAssignmentOperators, clang::ASTContext::NumImplicitCopyConstructors, clang::ASTContext::NumImplicitDefaultConstructors, clang::ASTContext::NumImplicitDestructors, clang::ASTContext::NumImplicitMoveAssignmentOperators, and clang::ASTContext::NumImplicitMoveConstructors.
| void Sema::addImplicitTypedef | ( | StringRef | Name, |
| QualType | T | ||
| ) |
Definition at line 133 of file Sema.cpp.
References clang::IdentifierResolver::begin(), clang::ASTContext::buildImplicitTypedef(), Context, clang::IdentifierResolver::end(), clang::IdentifierTable::get(), clang::ASTContext::Idents, IdResolver, PushOnScopeChains(), and TUScope.
Referenced by Initialize().
| void Sema::AddInitializerToDecl | ( | Decl * | RealDecl, |
| Expr * | Init, | ||
| bool | DirectInit, | ||
| bool | TypeMayContainAuto | ||
| ) |
AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
If DirectInit is true, this is C++ direct initialization rather than copy initialization.
Definition at line 9194 of file SemaDecl.cpp.
References clang::VarDecl::CallInit, Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), Diag(), E, clang::ExprError(), clang::InitializationSequence::Failed(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getBaseElementType(), clang::VarDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::Expr::getExprLoc(), clang::ParenListExpr::getExprs(), clang::NamedDecl::getFormalLinkage(), clang::VarDecl::getInit(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::ParenListExpr::getNumExprs(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::ASTContext::getObjCIdType(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarDecl::getSourceRange(), clang::VarDecl::getStorageClass(), clang::VarDecl::getTemplateSpecializationKind(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasInit(), clang::VarDecl::hasLocalStorage(), clang::InitializedEntity::InitializeVariable(), clang::InternalLinkage, clang::Type::isAggregateType(), clang::Expr::isConstantInitializer(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Expr::isEvaluatable(), clang::VarDecl::isExternC(), clang::VarDecl::isFileVarDecl(), clang::Type::isFloatingType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::NamedDecl::isLinkageValid(), clang::Type::isLiteralType(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::VarDecl::isStaticDataMember(), clang::isTemplateInstantiation(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Expr::isValueDependent(), clang::QualType::isVolatileQualified(), clang::VarDecl::ListInit, clang::Qualifiers::OCL_Strong, clang::LangAS::opencl_local, clang::InitializationSequence::Perform(), clang::Result, clang::SC_Extern, clang::SC_Static, clang::VarDecl::setConstexpr(), clang::VarDecl::setInit(), clang::VarDecl::setInitStyle(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), and clang::ASTContext::UnknownAnyTy.
Referenced by ActOnOpenMPFirstprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPReductionClause(), CheckOpenMPLoop(), FinishForRangeVarDecl(), and InstantiateVariableInitializer().
|
inline |
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool.
This allows us to efficiently associate a selector with a method declaraation for purposes of typechecking messages sent to "id" (where the class of the object is unknown).
Definition at line 3182 of file Sema.h.
Referenced by ActOnAtEnd(), AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().
| void Sema::AddKnownFunctionAttributes | ( | FunctionDecl * | FD | ) |
Adds any function attributes that we know a priori based on the declaration of this function.
These attributes can apply both to implicitly-declared builtins (like __builtin___printf_chk) or to library-declared functions like NSLog or printf.
We need to check for duplicate attributes both here and where user-written attributes are applied to declarations.
Definition at line 11427 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::ASTContext::BuiltinInfo, Context, clang::frontend::CPlusPlus, clang::IdentifierTable::get(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::Builtin::Context::isAuxBuiltinID(), clang::Builtin::Context::isConst(), clang::Builtin::Context::isConstWithoutErrno(), clang::Decl::isInvalidDecl(), clang::Builtin::Context::isNoThrow(), clang::Type::isObjCObjectPointerType(), clang::Builtin::Context::isPrintfLike(), clang::Builtin::Context::isReturnsTwice(), clang::Builtin::Context::isScanfLike(), clang::IdentifierInfo::isStr(), clang::DeclContext::isTranslationUnit(), clang::Builtin::Context::isTSBuiltin(), and clang::LinkageSpecDecl::lang_c.
| void Sema::addLambdaParameters | ( | CXXMethodDecl * | CallOperator, |
| Scope * | CurScope | ||
| ) |
Introduce the lambda parameters into scope.
Definition at line 475 of file SemaLambda.cpp.
References clang::NamedDecl::getIdentifier(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), and p.
| void Sema::AddLaunchBoundsAttr | ( | SourceRange | AttrRange, |
| Decl * | D, | ||
| Expr * | MaxThreads, | ||
| Expr * | MinBlocks, | ||
| unsigned | SpellingListIndex | ||
| ) |
AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
Definition at line 3865 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLaunchBoundsArgument(), and Context.
Referenced by handleLaunchBoundsAttr(), and instantiateDependentCUDALaunchBoundsAttr().
| void Sema::AddMemberOperatorCandidates | ( | OverloadedOperatorKind | Op, |
| SourceLocation | OpLoc, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| SourceRange | OpRange = SourceRange() |
||
| ) |
Add overload candidates for overloaded operators that are member functions.
Add the overloaded operator candidates that are member functions for the operator Op that was used in an operator expression such as "x Op y". , Args/NumArgs provides the operator arguments, and CandidateSet will store the added overload candidates. (C++ [over.match.oper]).
Definition at line 6700 of file SemaOverload.cpp.
References AddMethodCandidate(), clang::LookupResult::begin(), Context, clang::ASTContext::DeclarationNames, clang::LookupResult::end(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), isCompleteType(), LookupOrdinaryName, LookupQualifiedName(), and clang::LookupResult::suppressDiagnostics().
Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
| void Sema::AddMethodCandidate | ( | DeclAccessPair | FoundDecl, |
| QualType | ObjectType, | ||
| Expr::Classification | ObjectClassification, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false |
||
| ) |
AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set.
Definition at line 6073 of file SemaOverload.cpp.
References AddMethodTemplateCandidate(), clang::DeclAccessPair::getDecl(), and clang::Decl::getDeclContext().
Referenced by AddFunctionCandidates(), AddMemberOperatorCandidates(), AddMethodTemplateCandidate(), AddOverloadCandidate(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedArrowExpr(), and LookupSpecialMember().
| void Sema::AddMethodCandidate | ( | CXXMethodDecl * | Method, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| QualType | ObjectType, | ||
| Expr::Classification | ObjectClassification, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false, |
||
| bool | PartialOverloading = false |
||
| ) |
AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object).
For example, in a call o.f(a1,a2), Object will contain o and Args will contain both a1 and a2. If SuppressUserConversions, then don't allow user-defined conversions via constructors or conversion operators.
Definition at line 6109 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::OverloadCandidateSet::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::ValueDecl::getType(), clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::OverloadCandidateSet::isNewCandidate(), clang::QualType::isNull(), clang::CXXMethodDecl::isStatic(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::ovl_fail_bad_conversion, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, TooManyArguments(), TryObjectArgumentInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.
| void Sema::AddMethodTemplateCandidate | ( | FunctionTemplateDecl * | MethodTmpl, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| QualType | ObjectType, | ||
| Expr::Classification | ObjectClassification, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false, |
||
| bool | PartialOverloading = false |
||
| ) |
Add a C++ member function template as a candidate to the candidate set, using template argument deduction to produce an appropriate member function template specialization.
Definition at line 6235 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), AddMethodCandidate(), Context, DeduceTemplateArguments(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::MakeDeductionFailureInfo(), clang::ovl_fail_bad_deduction, clang::Result, and clang::OverloadCandidate::Viable.
Referenced by AddFunctionCandidates(), AddMethodCandidate(), BuildCallToMemberFunction(), and LookupSpecialMember().
| void Sema::addMethodToGlobalList | ( | ObjCMethodList * | List, |
| ObjCMethodDecl * | Method | ||
| ) |
Add the given method to the list of globally-known methods.
Definition at line 3150 of file SemaDeclObjC.cpp.
References clang::AR_Deprecated, BumpAlloc, clang::LangOptions::CurrentModule, clang::Decl::getAvailability(), clang::ObjCMethodList::getBits(), clang::Decl::getDeclContext(), getLangOpts(), clang::ObjCMethodList::getMethod(), clang::ObjCMethodList::getNext(), clang::ObjCMethodDecl::isDefined(), clang::Decl::isDeprecated(), clang::Decl::isUnavailable(), MatchTwoMethodDeclarations(), Previous, clang::ObjCMethodList::setBits(), clang::ObjCMethodDecl::setDefined(), clang::ObjCMethodList::setHasMoreThanOneDecl(), clang::ObjCMethodList::setMethod(), and clang::ObjCMethodList::setNext().
Referenced by addMethodsToPool().
| void Sema::AddMsStructLayoutForRecord | ( | RecordDecl * | RD | ) |
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
Definition at line 132 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, getLangOpts(), MSStructPragmaOn, and VtorDispModeStack.
| void Sema::AddOptnoneAttributeIfNoConflicts | ( | FunctionDecl * | FD, |
| SourceLocation | Loc | ||
| ) |
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).
Definition at line 499 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, and clang::Decl::hasAttr().
Referenced by AddRangeBasedOptnone().
| void Sema::AddOverloadCandidate | ( | FunctionDecl * | Function, |
| DeclAccessPair | FoundDecl, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false, |
||
| bool | PartialOverloading = false, |
||
| bool | AllowExplicit = false |
||
| ) |
AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments.
If SuppressUserConversions, then don't allow user-defined conversions via constructors or conversion operators.
| PartialOverloading | true if we are performing "partial" overloading based on an incomplete set of function arguments. This feature is used by code completion. |
Definition at line 5685 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), AddMethodCandidate(), CheckCUDATarget(), CheckEnableIf(), Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidateSet::CSK_Operator, CurContext, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::OverloadCandidate::IgnoreObjectArgument, IsAcceptableNonMemberOperatorCandidate(), clang::ImplicitConversionSequence::isBad(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), IsDerivedFrom(), clang::CXXConstructorDecl::isMoveConstructor(), clang::OverloadCandidateSet::isNewCandidate(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::Expr::Classification::makeSimpleLValue(), clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_target, clang::ovl_fail_enable_if, clang::ovl_fail_illegal_constructor, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ImplicitConversionSequence::setEllipsis(), TooManyArguments(), TryCopyInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.
Referenced by AddArgumentDependentLookupCandidates(), AddFunctionCandidates(), AddOverloadedCallCandidate(), AddTemplateOverloadCandidate(), BuildCallToMemberFunction(), FindAllocationOverload(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), LookupSpecialMember(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void Sema::AddOverloadedCallCandidates | ( | UnresolvedLookupExpr * | ULE, |
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | PartialOverloading = false |
||
| ) |
Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
Definition at line 10826 of file SemaOverload.cpp.
References AddArgumentDependentLookupCandidates(), AddOverloadedCallCandidate(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), E, clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::hasExplicitTemplateArgs(), I, and clang::UnresolvedLookupExpr::requiresADL().
Referenced by buildOverloadedCallSet().
| void clang::Sema::addOverloadedOperatorToUnresolvedSet | ( | UnresolvedSetImpl & | Functions, |
| DeclAccessPair | Operator, | ||
| QualType | T1, | ||
| QualType | T2 | ||
| ) |
| bool Sema::AddOverriddenMethods | ( | CXXRecordDecl * | DC, |
| CXXMethodDecl * | MD | ||
| ) |
AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it.
Definition at line 6780 of file SemaDecl.cpp.
References clang::CXXMethodDecl::addOverriddenMethod(), clang::CXXBasePaths::found_decls(), I, clang::FunctionDecl::isDeleted(), clang::CXXRecordDecl::lookupInBases(), and ReportOverrides().
Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitDestructor(), and DeclareImplicitMoveAssignment().
| void Sema::AddPushedVisibilityAttribute | ( | Decl * | RD | ) |
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.
Definition at line 516 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, clang::NamedDecl::getExplicitVisibility(), NoVisibility, Stack, clang::ast_matchers::type, VisContext, and clang::NamedDecl::VisibilityForValue.
| void Sema::AddRangeBasedOptnone | ( | FunctionDecl * | FD | ) |
Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.
Definition at line 492 of file SemaAttr.cpp.
References AddOptnoneAttributeIfNoConflicts(), clang::SourceLocation::isValid(), and OptimizeOffPragmaLocation.
| void Sema::AddSurrogateCandidate | ( | CXXConversionDecl * | Conversion, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| const FunctionProtoType * | Proto, | ||
| Expr * | Object, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet | ||
| ) |
AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a function pointer via the conversion function Conversion, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4).
Proto is the type of function that we'll eventually be calling.
Definition at line 6588 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::UserDefinedConversionSequence::After, clang::UserDefinedConversionSequence::Before, CheckEnableIf(), clang::Expr::Classify(), Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::UserDefinedConversionSequence::EllipsisConversion, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::UserDefinedConversionSequence::FoundConversionFunction, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Expr::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::None, clang::ovl_fail_bad_conversion, clang::ovl_fail_enable_if, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::StandardConversionSequence::setAsIdentityConversion(), clang::ImplicitConversionSequence::setEllipsis(), clang::ImplicitConversionSequence::setUserDefined(), clang::ImplicitConversionSequence::Standard, clang::OverloadCandidate::Surrogate, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::ImplicitConversionSequence::UserDefined, and clang::OverloadCandidate::Viable.
Referenced by BuildCallToObjectOfClassType().
| void Sema::AddTemplateConversionCandidate | ( | FunctionTemplateDecl * | FunctionTemplate, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingDC, | ||
| Expr * | From, | ||
| QualType | ToType, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | AllowObjCConversionOnExplicit | ||
| ) |
Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]).
Definition at line 6546 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), AddConversionCandidate(), Context, DeduceTemplateArguments(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::MakeDeductionFailureInfo(), clang::ovl_fail_bad_deduction, clang::Result, and clang::OverloadCandidate::Viable.
Referenced by collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void Sema::AddTemplateOverloadCandidate | ( | FunctionTemplateDecl * | FunctionTemplate, |
| DeclAccessPair | FoundDecl, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false, |
||
| bool | PartialOverloading = false |
||
| ) |
Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization.
Definition at line 6289 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), AddOverloadCandidate(), Context, DeduceTemplateArguments(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::MakeDeductionFailureInfo(), clang::ovl_fail_bad_deduction, clang::Result, and clang::OverloadCandidate::Viable.
Referenced by AddArgumentDependentLookupCandidates(), AddFunctionCandidates(), AddOverloadedCallCandidate(), FindAllocationOverload(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), LookupSpecialMember(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
Definition at line 3526 of file SemaTemplateDeduction.cpp.
References clang::ASTContext::adjustFunctionType(), clang::Type::castAs(), Context, clang::Type::getAs(), clang::FunctionType::getCallConv(), clang::FunctionType::getExtInfo(), clang::FunctionType::getNoReturnAttr(), clang::QualType::isNull(), clang::FunctionType::ExtInfo::withCallingConv(), and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by DeduceTemplateArguments().
|
static |
Adjust the DeclContext for a function or variable that might be a function-local external declaration.
Definition at line 5664 of file SemaDecl.cpp.
References clang::DeclContext::getParent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), and clang::DeclContext::isFunctionOrMethod().
Referenced by ActOnFriendFunctionDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| TemplateDecl * Sema::AdjustDeclIfTemplate | ( | Decl *& | D | ) |
AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration.
Otherwise, do nothing to D and return null.
Definition at line 467 of file SemaTemplate.cpp.
Referenced by ActOnBaseSpecifier(), ActOnBaseSpecifiers(), ActOnFinishCXXMemberSpecification(), ActOnFinishDelayedCXXMethodDeclaration(), ActOnMemInitializers(), ActOnStartDelayedMemberDeclarations(), BuildMemInitializer(), and SetDeclDeleted().
| void Sema::AdjustDestructorExceptionSpec | ( | CXXRecordDecl * | ClassDecl, |
| CXXDestructorDecl * | Destructor | ||
| ) |
Build an exception spec for destructors that don't have one.
C++11 says that user-defined destructors with no exception spec get one that looks as if the destructor was implicitly declared.
Definition at line 9546 of file SemaDeclCXX.cpp.
References clang::frontend::CPlusPlus11, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::ValueDecl::getType(), clang::FunctionProtoType::hasExceptionSpec(), clang::None, clang::ValueDecl::setType(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::ASTContext::VoidTy.
Referenced by CreateNewFunctionDecl().
| void Sema::adjustMemberFunctionCC | ( | QualType & | T, |
| bool | IsStatic, | ||
| bool | IsCtorOrDtor, | ||
| SourceLocation | Loc | ||
| ) |
Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
This handles method types formed from function type typedefs and typename template arguments.
Definition at line 5977 of file SemaType.cpp.
References clang::ASTContext::adjustFunctionType(), clang::CC_X86StdCall, Context, Diag(), clang::ASTContext::getAdjustedType(), clang::FunctionType::getCallConv(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getDefaultCallingConvention(), clang::FunctionType::getExtInfo(), clang::FunctionType::getNameForCallConv(), clang::ASTContext::getTargetInfo(), hasExplicitCallingConv(), clang::TargetCXXABI::isMicrosoft(), and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by BuildMemberPointerType(), and DeduceTemplateArgumentsByTypeMatch().
Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size?
This will also return false if either of the types is neither a vector nor a real type.
Definition at line 5689 of file SemaExpr.cpp.
References breakDownVectorType(), Context, clang::ASTContext::getTypeSize(), clang::Type::isExtVectorType(), clang::Type::isScalarType(), and clang::Type::isVectorType().
Referenced by TryReinterpretCast().
| bool Sema::AreMultipleMethodsInGlobalPool | ( | Selector | Sel, |
| ObjCMethodDecl * | BestMethod, | ||
| SourceRange | R, | ||
| bool | receiverIdOrClass | ||
| ) |
Definition at line 3280 of file SemaDeclObjC.cpp.
References DiagnoseMultipleMethodInGlobalPool(), clang::ObjCMethodList::getNext(), clang::Decl::hasAttr(), clang::ObjCMethodList::hasMoreThanOneDecl(), clang::ObjCMethodDecl::isInstanceMethod(), and MethodPool.
Referenced by BuildInstanceMessage().
| void Sema::ArgumentDependentLookup | ( | DeclarationName | Name, |
| SourceLocation | Loc, | ||
| ArrayRef< Expr * > | Args, | ||
| ADLResult & | Functions | ||
| ) |
Definition at line 3174 of file SemaLookup.cpp.
References findAcceptableDecl(), FindAssociatedClassesAndNamespaces(), clang::Decl::getIdentifierNamespace(), clang::Decl::getPreviousDecl(), clang::Decl::IDNS_Ordinary, clang::Decl::IDNS_OrdinaryFriend, clang::ADLResult::insert(), isVisible(), and clang::DeclContext::lookup().
Referenced by AddArgumentDependentLookupCandidates().
| void Sema::AtomicPropertySetterGetterRules | ( | ObjCImplDecl * | IMPDecl, |
| ObjCInterfaceDecl * | IDecl | ||
| ) |
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property has one but not the other user-declared setter or getter.
Definition at line 1890 of file SemaObjCProperty.cpp.
References clang::FixItHint::CreateInsertion(), Diag(), clang::ObjCPropertyImplDecl::Dynamic, E, clang::ObjCImplDecl::FindPropertyImplDecl(), clang::TypeLoc::getBeginLoc(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ObjCPropertyDecl::getLParenLoc(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getSetterName(), clang::TypeSourceInfo::getTypeLoc(), clang::ObjCPropertyDecl::getTypeSourceInfo(), I, clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCContainerDecl::properties(), and clang::Property.
Referenced by ActOnAtEnd().
| bool Sema::AttachBaseSpecifiers | ( | CXXRecordDecl * | Class, |
| MutableArrayRef< CXXBaseSpecifier * > | Bases | ||
| ) |
Performs the actual work of attaching the given base class specifiers to a C++ class.
Definition at line 1556 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), clang::AS_public, Context, clang::ASTContext::Deallocate(), Diag(), clang::CXXBaseSpecifier::getAccessSpecifier(), getAmbiguousPathsDisplayString(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::QualType::getLocalUnqualifiedType(), clang::CXXBaseSpecifier::getLocStart(), clang::NamedDecl::getName(), getRecordDiagFromTagKind(), clang::TagDecl::getSourceRange(), clang::TagDecl::getTagKind(), clang::CXXBaseSpecifier::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::Decl::hasAttr(), clang::CXXBasePaths::isAmbiguous(), clang::CXXRecordDecl::isDerivedFrom(), clang::TagDecl::isInterface(), NoteIndirectBases(), and clang::CXXRecordDecl::setBases().
Referenced by ActOnBaseSpecifiers(), and SubstBaseSpecifiers().
| Decl * Sema::BuildAnonymousStructOrUnion | ( | Scope * | S, |
| DeclSpec & | DS, | ||
| AccessSpecifier | AS, | ||
| RecordDecl * | Record, | ||
| const PrintingPolicy & | Policy | ||
| ) |
BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
Anonymous unions are a C++ feature (C++ [class.union]) and a C11 feature; anonymous structures are a C11 feature and GNU C++ extension.
Definition at line 4116 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::AS_none, clang::AS_protected, clang::AS_public, checkDuplicateDefaultInit(), clang::DeclSpec::ClearTypeQualifiers(), Context, clang::frontend::CPlusPlus, clang::VarDecl::Create(), clang::FieldDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::DeclContext::decls(), Diag(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), getMSManglingNumber(), clang::ASTContext::getPrintingPolicy(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTypeDeclType(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVolatileSpecLoc(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::DeclContext::isRecord(), clang::TagDecl::isUnion(), clang::Declarator::MemberContext, clang::SC_None, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::RecordDecl::setAnonymousStructOrUnion(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::ASTContext::setManglingNumber(), clang::ASTContext::setStaticLocalNumber(), clang::DeclSpec::SetStorageClassSpec(), StorageClassSpecToVarDeclStorageClass(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, and clang::DeclSpec::TQ_volatile.
| ExprResult Sema::BuildAnonymousStructUnionMemberReference | ( | const CXXScopeSpec & | SS, |
| SourceLocation | nameLoc, | ||
| IndirectFieldDecl * | indirectField, | ||
| DeclAccessPair | FoundDecl = DeclAccessPair::make(nullptr, AS_none), |
||
| Expr * | baseObjectExpr = nullptr, |
||
| SourceLocation | opLoc = SourceLocation() |
||
| ) |
Definition at line 750 of file SemaExprMember.cpp.
References BuildFieldReferenceExpr(), clang::Type::castAs(), clang::IndirectFieldDecl::chain_begin(), clang::IndirectFieldDecl::chain_end(), Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::Type::getAs(), clang::NamedDecl::getDeclName(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::IndirectFieldDecl::getVarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isRecordType(), and clang::DeclAccessPair::make().
| QualType Sema::BuildArrayType | ( | QualType | T, |
| ArrayType::ArraySizeModifier | ASM, | ||
| Expr * | ArraySize, | ||
| unsigned | Quals, | ||
| SourceRange | Brackets, | ||
| DeclarationName | Entity | ||
| ) |
Build an array type.
| T | The type of each element in the array. |
| ASM | C99 array size modifier (e.g., '*', 'static'). |
| ArraySize | Expression describing the size of the array. |
| Brackets | The range from the opening '[' to the closing ']'. |
| Entity | The name of the entity that involves the array type, if known. |
Definition at line 1990 of file SemaType.cpp.
References clang::frontend::C99, CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, DefaultLvalueConversion(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::ASTContext::getConstantArrayType(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPrintableNameForEntity(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getVariableArrayType(), clang::Expr::hasPlaceholderType(), isArraySizeVLA(), isCompleteType(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::QualType::isPODType(), clang::Type::isReferenceType(), clang::Expr::isRValue(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::Type::isUndeducedType(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::ArrayType::Normal, RequireCompleteType(), RequireNonAbstractType(), clang::Result, clang::ArrayType::Star, and clang::ArrayType::Static.
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildArrayTypeTrait | ( | ArrayTypeTrait | ATT, |
| SourceLocation | KWLoc, | ||
| TypeSourceInfo * | TSInfo, | ||
| Expr * | DimExpr, | ||
| SourceLocation | RParen | ||
| ) |
Definition at line 4452 of file SemaExprCXX.cpp.
References Context, EvaluateArrayTypeTrait(), clang::ASTContext::getSizeType(), clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().
Referenced by ActOnArrayTypeTrait().
| QualType Sema::BuildAtomicType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) |
Definition at line 7051 of file SemaType.cpp.
References Context, Diag(), clang::ASTContext::getAtomicType(), clang::QualType::hasQualifiers(), clang::Type::isArrayType(), clang::Type::isAtomicType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isReferenceType(), clang::QualType::isTriviallyCopyableType(), and RequireCompleteType().
Referenced by BuildQualifiedType(), and ConvertDeclSpecToType().
| MemInitResult Sema::BuildBaseInitializer | ( | QualType | BaseType, |
| TypeSourceInfo * | BaseTInfo, | ||
| Expr * | Init, | ||
| CXXRecordDecl * | ClassDecl, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
Definition at line 3193 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), BuildDelegatingInitializer(), clang::Type::containsUnexpandedParameterPack(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), DiscardCleanupsInEvaluationContext(), FindBaseInitializer(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::TypeLoc::getLocalSourceRange(), clang::ASTContext::getTypeDeclType(), clang::TypeDecl::getTypeForDecl(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::ASTContext::hasSameUnqualifiedType(), clang::InitializedEntity::InitializeBase(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::CXXBaseSpecifier::isVirtual(), and UPPC_Initializer.
Referenced by BuildMemInitializer(), and InstantiateMemInitializers().
| void Sema::BuildBasePathArray | ( | const CXXBasePaths & | Paths, |
| CXXCastPath & | BasePath | ||
| ) |
Definition at line 1714 of file SemaDeclCXX.cpp.
References E, clang::CXXBasePaths::front(), I, and clang::CXXBasePaths::isRecordingPaths().
Referenced by CheckDerivedToBaseConversion(), TryLValueToRValueCast(), TryStaticDowncast(), and TryStaticMemberPointerUpcast().
| ExprResult Sema::BuildBinOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| BinaryOperatorKind | Opc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) |
Definition at line 10876 of file SemaExpr.cpp.
References clang::BO_Assign, BuildOverloadedBinOp(), clang::frontend::CPlusPlus, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::Expr::getType(), clang::BinaryOperator::isAssignmentOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), clang::Expr::isTypeDependent(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().
Referenced by ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPReductionClause(), ActOnPropertyImplDecl(), BuildCounterInit(), BuildCounterUpdate(), CheckOpenMPLoop(), and EvaluateBinaryTypeTrait().
| ExprResult Sema::BuildBlockForLambdaConversion | ( | SourceLocation | CurrentLocation, |
| SourceLocation | ConvLocation, | ||
| CXXConversionDecl * | Conv, | ||
| Expr * | Src | ||
| ) |
Definition at line 1631 of file SemaLambda.cpp.
References Context, clang::VarDecl::Create(), clang::ParmVarDecl::Create(), clang::BlockDecl::Create(), clang::ASTContext::DeclarationNames, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CXXConversionDecl::getConversionType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::VarDecl::getStorageClass(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), I, clang::InitializedEntity::InitializeBlock(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionDecl::isVariadic(), clang::DeclContext::lookup(), clang::Decl::markUsed(), clang::SC_None, clang::BlockDecl::setBlockMissingReturnType(), clang::BlockDecl::setBody(), clang::BlockDecl::setCaptures(), clang::BlockDecl::setIsConversionFromLambda(), clang::BlockDecl::setIsVariadic(), clang::BlockDecl::setParams(), clang::Decl::setReferenced(), and clang::BlockDecl::setSignatureAsWritten().
Referenced by BuildCXXMemberCallExpr(), and DefineImplicitLambdaToBlockPointerConversion().
| QualType Sema::BuildBlockPointerType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Build a block pointer type.
| T | The type to which we'll be building a block pointer. |
| Loc | The source location, used for diagnostics. |
| Entity | The name of the entity that involves the block pointer type, if known. |
Definition at line 2340 of file SemaType.cpp.
References checkQualifiedFunction(), Context, Diag(), clang::ASTContext::getBlockPointerType(), and clang::Type::isFunctionType().
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildBuiltinOffsetOf | ( | SourceLocation | BuiltinLoc, |
| TypeSourceInfo * | TInfo, | ||
| ArrayRef< OffsetOfComponent > | Components, | ||
| SourceLocation | RParenLoc | ||
| ) |
__builtin_offsetof(type, a.b[123][456].c)
Definition at line 11344 of file SemaExpr.cpp.
References Context, clang::OffsetOfExpr::Create(), clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::LookupResult::getAsSingle(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::ArrayType::getElementType(), clang::TypeLoc::getLocalSourceRange(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::FieldDecl::getParent(), clang::ASTContext::getSizeType(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::FieldDecl::isBitField(), clang::Type::isDependentType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
| ExprResult Sema::BuildCallToMemberFunction | ( | Scope * | S, |
| Expr * | MemExprE, | ||
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Args, | ||
| SourceLocation | RParenLoc | ||
| ) |
BuildCallToMemberFunction - Build a call to a member function.
MemExpr is the expression that refers to the member function (and includes the object parameter), Args/NumArgs are the arguments to the function call (not including the object parameter). The caller needs to validate that the member expression refers to a non-static member function or an overloaded member function.
Definition at line 11963 of file SemaOverload.cpp.
References AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), clang::AS_public, clang::OverloadCandidateSet::BestViableFunction(), clang::BO_PtrMemD, clang::BO_PtrMemI, clang::ASTContext::BoundMemberTy, BuildResolvedCallExpr(), clang::Type::castAs(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckCUDATarget(), CheckEnableIf(), CheckUnresolvedMemberAccess(), clang::Expr::Classify(), Context, ConvertArgumentsForCall(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadCandidateSet::CSK_Normal, CurContext, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), E, clang::ExprError(), FixOverloadedFunctionReference(), clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Qualifiers::getAsString(), clang::MemberExpr::getBase(), clang::UnresolvedMemberExpr::getBase(), clang::UnresolvedMemberExpr::getBaseType(), clang::FunctionType::getCallResultType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getDeletedOrUnavailableSuffix(), clang::MemberExpr::getFoundDecl(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::MemberExpr::getLocStart(), clang::UnresolvedMemberExpr::getLocStart(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberName(), clang::CXXMemberCallExpr::getMethodDecl(), clang::OverloadExpr::getNameLoc(), clang::QualType::getNonLValueExprType(), clang::CXXMethodDecl::getParent(), clang::PointerType::getPointeeType(), clang::MemberExpr::getQualifier(), clang::OverloadExpr::getQualifier(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::FunctionProtoType::getTypeQuals(), clang::Expr::getValueKindForType(), clang::OverloadExpr::hasExplicitTemplateArgs(), I, IdentifyCUDATarget(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::UnresolvedMemberExpr::isArrow(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionDecl::isPure(), clang::CXXMethodDecl::isStatic(), clang::DeclAccessPair::make(), clang::Expr::Classification::makeSimpleLValue(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::ASTContext::OverloadTy, PerformObjectArgumentInitialization(), clang::MemberExpr::performsVirtualDispatch(), clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::removeObjCGCAttr(), clang::MemberExpr::setBase(), clang::VK_RValue, and clang::ASTContext::VoidTy.
Referenced by buildSingleCopyAssignRecursively(), and tryExprAsCall().
| ExprResult Sema::BuildCallToObjectOfClassType | ( | Scope * | S, |
| Expr * | Obj, | ||
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Args, | ||
| SourceLocation | RParenLoc | ||
| ) |
BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (operator()) or performing a user-defined conversion on the object argument.
Definition at line 12247 of file SemaOverload.cpp.
References ActOnCallExpr(), AddMethodCandidate(), AddSurrogateCandidate(), clang::LookupResult::begin(), BuildCXXDefaultArgExpr(), BuildCXXMemberCallExpr(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), clang::CK_UserDefinedConversion, clang::Expr::Classify(), Context, clang::ImplicitCastExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, DefaultVariadicArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), E, clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Decl::getDeclContext(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Expr::getValueKindForType(), I, clang::InitializedEntity::InitializeParameter(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), clang::FunctionProtoType::isVariadic(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformObjectArgumentInitialization(), RequireCompleteType(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::CallExpr::setNumArgs(), clang::LookupResult::suppressDiagnostics(), VariadicMethod, and clang::VK_RValue.
| ExprResult Sema::BuildClassMessage | ( | TypeSourceInfo * | ReceiverTypeInfo, |
| QualType | ReceiverType, | ||
| SourceLocation | SuperLoc, | ||
| Selector | Sel, | ||
| ObjCMethodDecl * | Method, | ||
| SourceLocation | LBracLoc, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| SourceLocation | RBracLoc, | ||
| MultiExprArg | ArgsIn, | ||
| bool | isImplicit = false |
||
| ) |
Build an Objective-C class message expression.
This routine takes care of both normal class messages and class messages to the superclass.
| ReceiverTypeInfo | Type source information that describes the receiver of this message. This may be NULL, in which case we are sending to the superclass and SuperLoc must be a valid source location. |
| ReceiverType | The type of the object receiving the message. When ReceiverTypeInfo is non-NULL, this is the same type as that refers to. For a superclass send, this is the type of the superclass. |
| SuperLoc | The location of the "super" keyword in a superclass message. |
| Sel | The selector to which the message is being sent. |
| Method | The method that this class message is invoking, if already known. |
| LBracLoc | The location of the opening square bracket ']'. |
| RBracLoc | The location of the closing square bracket ']'. |
| ArgsIn | The message arguments. |
Definition at line 2315 of file SemaExprObjC.cpp.
References checkCocoaAPI(), CheckMessageArgumentTypes(), Context, clang::frontend::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), clang::ExprError(), clang::Type::getAs(), clang::SourceRange::getBegin(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCObjectType::getInterface(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), clang::ObjCInterfaceDecl::lookupClassMethod(), LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupPrivateClassMethod(), MaybeBindToTemporary(), clang::NumArgs, clang::OMF_initialize, RequireCompleteType(), clang::Result, and clang::VK_RValue.
Referenced by ActOnClassMessage(), ActOnSuperMessage(), and BuildClassMessageImplicit().
| ExprResult Sema::BuildClassMessageImplicit | ( | QualType | ReceiverType, |
| bool | isSuperReceiver, | ||
| SourceLocation | Loc, | ||
| Selector | Sel, | ||
| ObjCMethodDecl * | Method, | ||
| MultiExprArg | Args | ||
| ) |
Definition at line 2187 of file SemaExprObjC.cpp.
References BuildClassMessage(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and clang::QualType::isNull().
Referenced by CheckObjCBridgeRelatedConversions().
| ExprResult Sema::BuildCoawaitExpr | ( | SourceLocation | KwLoc, |
| Expr * | E | ||
| ) |
Definition at line 227 of file SemaCoroutine.cpp.
References buildCoawaitCalls(), checkCoroutineContext(), Context, clang::ASTContext::DependentTy, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), and clang::VK_RValue.
| ExprResult Sema::BuildCompoundLiteralExpr | ( | SourceLocation | LParenLoc, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | LiteralExpr | ||
| ) |
Definition at line 5391 of file SemaExpr.cpp.
References Context, clang::InitializationKind::CreateCStyleCast(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getBaseElementType(), clang::TypeSourceInfo::getType(), clang::InitializedEntity::InitializeCompoundLiteralInit(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), clang::InitializationSequence::Perform(), clang::Result, clang::VK_LValue, and clang::VK_RValue.
| StmtResult Sema::BuildCoreturnStmt | ( | SourceLocation | KwLoc, |
| Expr * | E | ||
| ) |
Definition at line 330 of file SemaCoroutine.cpp.
References buildPromiseCall(), checkCoroutineContext(), Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::Type::isVoidType(), clang::None, and clang::StmtError().
| ExprResult Sema::BuildCoyieldExpr | ( | SourceLocation | KwLoc, |
| Expr * | E | ||
| ) |
Definition at line 294 of file SemaCoroutine.cpp.
References buildCoawaitCalls(), checkCoroutineContext(), Context, clang::ASTContext::DependentTy, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), and clang::VK_RValue.
| ExprResult Sema::BuildCStyleCastExpr | ( | SourceLocation | LParenLoc, |
| TypeSourceInfo * | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | Op | ||
| ) |
Definition at line 2463 of file SemaCast.cpp.
References Context, clang::CStyleCastExpr::Create(), clang::ExprError(), getLangOpts(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), and clang::TypeSourceInfo::getTypeLoc().
Referenced by ActOnOpenMPReductionClause().
| ExprResult Sema::BuildCXXConstructExpr | ( | SourceLocation | ConstructLoc, |
| QualType | DeclInitType, | ||
| CXXConstructorDecl * | Constructor, | ||
| MultiExprArg | Exprs, | ||
| bool | HadMultipleCandidates, | ||
| bool | IsListInitialization, | ||
| bool | IsStdInitListInitialization, | ||
| bool | RequiresZeroInit, | ||
| unsigned | ConstructKind, | ||
| SourceRange | ParenRange | ||
| ) |
BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.
| ConstructKind | - a CXXConstructExpr::ConstructionKind |
Definition at line 11331 of file SemaDeclCXX.cpp.
References clang::CXXConstructExpr::CK_Complete, clang::CXXMethodDecl::getParent(), hasOneRealArgument(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), and clang::Expr::isTemporaryObject().
Referenced by BuildCXXCastArgument(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().
| ExprResult Sema::BuildCXXConstructExpr | ( | SourceLocation | ConstructLoc, |
| QualType | DeclInitType, | ||
| CXXConstructorDecl * | Constructor, | ||
| bool | Elidable, | ||
| MultiExprArg | ExprArgs, | ||
| bool | HadMultipleCandidates, | ||
| bool | IsListInitialization, | ||
| bool | IsStdInitListInitialization, | ||
| bool | RequiresZeroInit, | ||
| unsigned | ConstructKind, | ||
| SourceRange | ParenRange | ||
| ) |
BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.
Definition at line 11368 of file SemaDeclCXX.cpp.
References clang::CXXConstructExpr::Create(), and MarkFunctionReferenced().
| ExprResult Sema::BuildCXXDefaultArgExpr | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FD, | ||
| ParmVarDecl * | Param | ||
| ) |
BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
Definition at line 4404 of file SemaExpr.cpp.
References Context, clang::CXXDefaultArgExpr::Create(), clang::InitializationKind::CreateCopy(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Decl::getDeclContext(), clang::ParmVarDecl::getDefaultArg(), clang::VarDecl::getInit(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Decl::getLocation(), clang::DeclaratorDecl::getOuterLocStart(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Result, and clang::ParmVarDecl::setDefaultArg().
Referenced by BuildCallToObjectOfClassType(), CopyObject(), and getDefaultArgExprsForConstructors().
| ExprResult Sema::BuildCXXDefaultInitExpr | ( | SourceLocation | Loc, |
| FieldDecl * | Field | ||
| ) |
Definition at line 11386 of file SemaDeclCXX.cpp.
References clang::CXXDefaultInitExpr::Create(), Diag(), clang::ExprError(), clang::NamedDecl::getDeclName(), clang::FieldDecl::getInClassInitializer(), clang::Decl::getLocEnd(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), getTemplateInstantiationArgs(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FieldDecl::hasInClassInitializer(), InstantiateInClassInitializer(), clang::isTemplateInstantiation(), clang::DeclContext::lookup(), and clang::DeclContextLookupResult::size().
Referenced by CollectFieldInitializer().
| ExprResult Sema::BuildCXXFoldExpr | ( | SourceLocation | LParenLoc, |
| Expr * | LHS, | ||
| BinaryOperatorKind | Operator, | ||
| SourceLocation | EllipsisLoc, | ||
| Expr * | RHS, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 987 of file SemaTemplateVariadic.cpp.
References Context, and clang::ASTContext::DependentTy.
Referenced by ActOnCXXFoldExpr().
| StmtResult Sema::BuildCXXForRangeStmt | ( | SourceLocation | ForLoc, |
| SourceLocation | CoawaitLoc, | ||
| SourceLocation | ColonLoc, | ||
| Stmt * | RangeDecl, | ||
| Stmt * | BeginEndDecl, | ||
| Expr * | Cond, | ||
| Expr * | Inc, | ||
| Stmt * | LoopVarDecl, | ||
| SourceLocation | RParenLoc, | ||
| BuildForRangeKind | Kind | ||
| ) |
BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
Definition at line 2145 of file SemaStmt.cpp.
References BuildNonArrayForRange(), ColonLoc, Context, clang::IntegerLiteral::Create(), clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DependentTy, Diag(), FinishForRangeVarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getAutoDeductType(), clang::DeclRefExpr::getDecl(), clang::QualType::getNonReferenceType(), clang::ASTContext::getPointerDiffType(), clang::DeclStmt::getSingleDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::OCD_AllCandidates, RebuildForRangeWithDereference(), clang::Expr::setType(), clang::StmtError(), and clang::VK_LValue.
| ExprResult Sema::BuildCXXFunctionalCastExpr | ( | TypeSourceInfo * | TInfo, |
| SourceLocation | LParenLoc, | ||
| Expr * | CastExpr, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 2486 of file SemaCast.cpp.
References Context, clang::CXXFunctionalCastExpr::Create(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::SourceLocation::isValid().
Referenced by BuildCXXTypeConstructExpr().
| ExprResult Sema::BuildCXXMemberCallExpr | ( | Expr * | Exp, |
| NamedDecl * | FoundDecl, | ||
| CXXConversionDecl * | Method, | ||
| bool | HadMultipleCandidates | ||
| ) |
Definition at line 6064 of file SemaExprCXX.cpp.
References clang::ASTContext::BoundMemberTy, BuildBlockForLambdaConversion(), clang::CK_NoOp, Context, Diag(), Diags, E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CastExpr::getCastKind(), clang::CXXConversionDecl::getConversionType(), clang::Expr::getExprLoc(), clang::QualType::getNonLValueExprType(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::CastExpr::getSubExpr(), clang::Expr::getValueKindForType(), clang::Expr::IgnoreParens(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXRecordDecl::isLambda(), MarkMemberReferenced(), clang::None, clang::OK_Ordinary, PerformObjectArgumentInitialization(), clang::MemberExpr::setHadMultipleCandidates(), and clang::VK_RValue.
Referenced by BuildCallToObjectOfClassType(), BuildCXXCastArgument(), diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().
| ExprResult Sema::BuildCXXNamedCast | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind, | ||
| TypeSourceInfo * | Ty, | ||
| Expr * | E, | ||
| SourceRange | AngleBrackets, | ||
| SourceRange | Parens | ||
| ) |
Definition at line 236 of file SemaCast.cpp.
References Context, clang::CXXStaticCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::CXXConstCastExpr::Create(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getEnd(), clang::TypeSourceInfo::getType(), clang::Type::isDependentType(), and clang::Expr::isTypeDependent().
Referenced by ActOnCXXNamedCast(), and CastForMoving().
| bool Sema::BuildCXXNestedNameSpecifier | ( | Scope * | S, |
| IdentifierInfo & | Identifier, | ||
| SourceLocation | IdentifierLoc, | ||
| SourceLocation | CCLoc, | ||
| QualType | ObjectType, | ||
| bool | EnteringContext, | ||
| CXXScopeSpec & | SS, | ||
| NamedDecl * | ScopeLookupResult, | ||
| bool | ErrorRecoveryLookup, | ||
| bool * | IsCorrectedToColon = nullptr |
||
| ) |
Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
| S | Scope in which the nested-name-specifier occurs. |
| Identifier | Identifier in the sequence "identifier" "::". |
| IdentifierLoc | Location of the Identifier. |
| CCLoc | Location of "::" following Identifier. |
| ObjectType | Type of postfix expression if the nested-name-specifier occurs in construct like: ptr->nns::f. |
| EnteringContext | If true, enter the context specified by the nested-name-specifier. |
| SS | Optional nested name specifier preceding the identifier. |
| ScopeLookupResult | Provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time. |
| ErrorRecoveryLookup | Specifies if the method is called to improve error recovery and what kind of recovery is performed. |
| IsCorrectedToColon | If not null, suggestion of replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'. |
This routine differs only slightly from ActOnCXXNestedNameSpecifier, in that it contains an extra parameter ScopeLookupResult, which provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.
If ErrorRecoveryLookup is true, then this call is used to improve error recovery. This means that it should not emit diagnostics, it should just return true on failure. It also means it should only return a valid scope if it knows that the result is correct. It should not return in a dependent context, for example. Nor will it extend SS with the scope specifier.
Definition at line 456 of file SemaCXXScopeSpec.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), CTK_ErrorRecovery, CurContext, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::CXXScopeSpec::Extend(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::Decl::getCanonicalDecl(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::ASTContext::getTypeDeclType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXRecordDecl::hasAnyDependentBases(), hasDefinition(), clang::ASTContext::hasSameType(), isAcceptableNestedNameSpecifier(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), LookupName(), LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), MarkAnyDeclReferenced(), clang::Name, PDiag(), clang::TypeLocBuilder::push(), RequireCompleteDeclContext(), S, clang::LookupResult::setContextRange(), clang::LookupResult::setLookupName(), and clang::TypeSpecTypeLoc::setNameLoc().
Referenced by ActOnCXXNestedNameSpecifier(), and IsInvalidUnlessNestedName().
| ExprResult Sema::BuildCXXNew | ( | SourceRange | Range, |
| bool | UseGlobal, | ||
| SourceLocation | PlacementLParen, | ||
| MultiExprArg | PlacementArgs, | ||
| SourceLocation | PlacementRParen, | ||
| SourceRange | TypeIdParens, | ||
| QualType | AllocType, | ||
| TypeSourceInfo * | AllocTypeInfo, | ||
| Expr * | ArraySize, | ||
| SourceRange | DirectInitRange, | ||
| Expr * | Initializer, | ||
| bool | TypeMayContainAuto = true |
||
| ) |
Definition at line 1266 of file SemaExprCXX.cpp.
References AA_Converting, clang::CXXNewExpr::CallInit, CheckAllocatedType(), CheckDestructorAccess(), CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus11, clang::IntegerLiteral::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateRemoval(), DAR_Failed, DeduceAutoType(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindAllocationFunctions(), GatherArgumentsForCall(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getCharWidth(), clang::ASTContext::getConstantArrayType(), clang::SourceRange::getEnd(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::ASTContext::getLifetimeQualifiedType(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getPointerType(), clang::ASTContext::getPreferredTypeAlign(), clang::ASTContext::getSizeType(), getSourceManager(), clang::TypeLoc::getSourceRange(), clang::TargetInfo::getSuitableAlign(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSize(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeNew(), Inits, clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Decl::isImplicit(), clang::SourceManager::isInSystemHeader(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isLegalArrayNewInitializer(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), isStdInitializerList(), clang::Expr::isTypeDependent(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Expr::isValueDependent(), clang::FunctionProtoType::isVariadic(), clang::CXXNewExpr::ListInit, LookupDestructor(), MarkFunctionReferenced(), clang::CXXNewExpr::NoInit, clang::ArrayType::Normal, clang::Qualifiers::OCL_None, PDiag(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), S, VariadicDoesNotApply, and VariadicFunction.
Referenced by ActOnCXXNew().
| ExprResult Sema::BuildCXXNoexceptExpr | ( | SourceLocation | KeyLoc, |
| Expr * | Operand, | ||
| SourceLocation | RParen | ||
| ) |
Definition at line 6116 of file SemaExprCXX.cpp.
References ActiveTemplateInstantiations, clang::ASTContext::BoolTy, canThrow(), CheckPlaceholderExpr(), Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::HasSideEffects(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnNoexceptExpr().
| ExprResult Sema::BuildCXXThrow | ( | SourceLocation | OpLoc, |
| Expr * | Ex, | ||
| bool | IsThrownVarInScope | ||
| ) |
Definition at line 638 of file SemaExprCXX.cpp.
References Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getExceptionObjectType(), clang::Expr::getType(), clang::InitializedEntity::InitializeException(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::ASTContext::VoidTy.
| ExprResult Sema::BuildCXXTypeConstructExpr | ( | TypeSourceInfo * | TInfo, |
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Exprs, | ||
| SourceLocation | RParenLoc | ||
| ) |
ActOnCXXTypeConstructExpr - Parse construction of a specified type.
Can be interpreted either as function-style casting ("int(x)") or class type construction ("ClassType(x,y,z)") or creation of a value-initialized type ("int()").
Definition at line 1007 of file SemaExprCXX.cpp.
References BuildCXXFunctionalCastExpr(), clang::CK_NoOp, Context, clang::CXXFunctionalCastExpr::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::InitializationKind::CreateValue(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getBaseElementType(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Expr::getValueKindForType(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isVoidType(), clang::InitializationSequence::Perform(), RequireCompleteType(), RequireNonAbstractType(), and clang::Result.
Referenced by ActOnCXXTypeConstructExpr().
| ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| TypeSourceInfo * | Operand, | ||
| SourceLocation | RParenLoc | ||
| ) |
Build a C++ typeid expression with a type operand.
Definition at line 372 of file SemaExprCXX.cpp.
References Context, Diag(), clang::ExprError(), clang::Type::getAs(), clang::QualType::getNonReferenceType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getUnqualifiedArrayType(), clang::Type::isVariablyModifiedType(), and clang::QualType::withConst().
| ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| Expr * | Operand, | ||
| SourceLocation | RParenLoc | ||
| ) |
Build a C++ typeid expression with an expression operand.
Definition at line 397 of file SemaExprCXX.cpp.
References clang::CK_NoOp, Context, Diag(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::ASTContext::getUnqualifiedArrayType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::Expr::HasSideEffects(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), clang::CXXRecordDecl::isPolymorphic(), clang::Expr::isTypeDependent(), clang::Type::isVariablyModifiedType(), clang::Result, and clang::QualType::withConst().
| ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| TypeSourceInfo * | Operand, | ||
| SourceLocation | RParenLoc | ||
| ) |
Build a Microsoft __uuidof expression with a type operand.
Definition at line 512 of file SemaExprCXX.cpp.
References Context, Diag(), clang::ExprError(), clang::TypeSourceInfo::getType(), clang::CXXUuidofExpr::GetUuidAttrOfType(), clang::Type::isDependentType(), and clang::QualType::withConst().
| ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| Expr * | Operand, | ||
| SourceLocation | RParenLoc | ||
| ) |
Build a Microsoft __uuidof expression with an expression operand.
Definition at line 532 of file SemaExprCXX.cpp.
References Context, Diag(), E, clang::ExprError(), clang::Expr::getType(), clang::CXXUuidofExpr::GetUuidAttrOfType(), clang::Type::isDependentType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNull, and clang::QualType::withConst().
| ExprResult Sema::BuildDeclarationNameExpr | ( | const CXXScopeSpec & | SS, |
| LookupResult & | R, | ||
| bool | NeedsADL, | ||
| bool | AcceptInvalidDecl = false |
||
| ) |
Definition at line 2739 of file SemaExpr.cpp.
References clang::LookupResult::begin(), CheckDeclInExpr(), Context, clang::UnresolvedLookupExpr::Create(), clang::LookupResult::end(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isOverloadedResult(), clang::LookupResult::isSingleResult(), and clang::LookupResult::suppressDiagnostics().
Referenced by attemptRecovery(), BuildRecoveryCallExpr(), and performLambdaVarCaptureInitialization().
| ExprResult Sema::BuildDeclarationNameExpr | ( | const CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| NamedDecl * | D, | ||
| NamedDecl * | FoundD = nullptr, |
||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr, |
||
| bool | AcceptInvalidDecl = false |
||
| ) |
Complete semantic analysis for a reference to the given declaration.
Definition at line 2772 of file SemaExpr.cpp.
References clang::ASTContext::BuiltinFnTy, clang::ASTContext::BuiltinInfo, clang::Type::castAs(), CheckDeclInExpr(), Context, clang::frontend::CPlusPlus, Diag(), clang::ExprError(), clang::Type::getAs(), clang::FunctionType::getExtInfo(), clang::ASTContext::getFunctionNoProtoType(), clang::Decl::getKind(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CXXScopeSpec::getRange(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Builtin::Context::isPredefinedLibFunction(), clang::Type::isVoidType(), clang::ast_matchers::type, clang::ASTContext::UnknownAnyTy, clang::VK_LValue, and clang::VK_RValue.
| Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup | ( | MutableArrayRef< Decl * > | Group, |
| bool | TypeMayContainAuto = true |
||
| ) |
BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking.
Definition at line 10303 of file SemaDecl.cpp.
References Context, clang::DeclGroupRef::Create(), Diag(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::AutoType::getDeducedType(), clang::VarDecl::getInit(), clang::AutoType::getKeyword(), clang::Decl::getSourceRange(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), and clang::Decl::setInvalidDecl().
Referenced by ActOnFinishObjCImplementation(), ActOnForwardClassDeclaration(), and ActOnForwardProtocolDeclaration().
| ExprResult Sema::BuildDeclRefExpr | ( | ValueDecl * | D, |
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| SourceLocation | Loc, | ||
| const CXXScopeSpec * | SS = nullptr |
||
| ) |
Definition at line 1665 of file SemaExpr.cpp.
References clang::NamedDecl::getDeclName().
Referenced by BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), buildMemcpyForAssignmentOp(), buildPromiseCall(), DefineImplicitLambdaToFunctionPointerConversion(), and performLambdaVarCaptureInitialization().
| ExprResult Sema::BuildDeclRefExpr | ( | ValueDecl * | D, |
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const CXXScopeSpec * | SS = nullptr, |
||
| NamedDecl * | FoundD = nullptr, |
||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr |
||
| ) |
BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture.
Definition at line 1675 of file SemaExpr.cpp.
References Context, clang::DeclRefExpr::Create(), Diag(), E, clang::ExprError(), clang::NamedDecl::getIdentifier(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::VarTemplateSpecializationDecl::getTemplateKeywordLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::FieldDecl::isBitField(), clang::Qualifiers::OCL_Weak, and clang::OK_BitField.
| QualType Sema::BuildDecltypeType | ( | Expr * | E, |
| SourceLocation | Loc, | ||
| bool | AsUnevaluated = true |
||
| ) |
If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto).
Definition at line 7000 of file SemaType.cpp.
References ActiveTemplateInstantiations, CheckPlaceholderExpr(), Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getDecltypeForExpr(), clang::ASTContext::getDecltypeType(), clang::Expr::getExprLoc(), clang::Expr::HasSideEffects(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by ActOnCXXNestedNameSpecifierDecltype(), ActOnPseudoDestructorExpr(), BuildMemInitializer(), ConvertDeclSpecToType(), and DeduceAutoType().
| MemInitResult Sema::BuildDelegatingInitializer | ( | TypeSourceInfo * | TInfo, |
| Expr * | Init, | ||
| CXXRecordDecl * | ClassDecl | ||
| ) |
Definition at line 3137 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), CurContext, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::TypeLoc::getLocalSourceRange(), clang::TypeDecl::getTypeForDecl(), clang::TypeSourceInfo::getTypeLoc(), clang::InitializedEntity::InitializeDelegation(), clang::DeclContext::isDependentContext(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and LangOpts.
Referenced by BuildBaseInitializer(), and InstantiateMemInitializers().
| ExprResult Sema::BuildDependentDeclRefExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
Definition at line 435 of file SemaTemplate.cpp.
References Context, clang::DependentScopeDeclRefExpr::Create(), and clang::CXXScopeSpec::getWithLocInContext().
| ExprResult Sema::BuildEmptyCXXFoldExpr | ( | SourceLocation | EllipsisLoc, |
| BinaryOperatorKind | Operator | ||
| ) |
Definition at line 995 of file SemaTemplateVariadic.cpp.
References ActOnCXXBoolLiteral(), ActOnIntegerConstant(), clang::BO_Add, clang::BO_And, clang::BO_Comma, clang::BO_LAnd, clang::BO_LOr, clang::BO_Mul, clang::BO_Or, Context, CreateBuiltinUnaryOp(), Diag(), clang::BinaryOperator::getOpcodeStr(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::IntTy, clang::UO_Minus, and clang::ASTContext::VoidTy.
| VarDecl * Sema::BuildExceptionDeclaration | ( | Scope * | S, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | Loc, | ||
| IdentifierInfo * | Name | ||
| ) |
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.
Definition at line 11983 of file SemaDeclCXX.cpp.
References AbstractVariableType, clang::construct, Context, clang::VarDecl::Create(), clang::InitializationKind::CreateCopy(), CurContext, Diag(), FinalizeVarWithDestructor(), clang::ASTContext::getArrayDecayedType(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::CXXConstructExpr::getConstructor(), clang::ASTContext::getExceptionObjectType(), getLangOpts(), clang::Type::getPointeeType(), clang::ReferenceType::getPointeeType(), clang::ASTContext::getPointerType(), clang::TypeSourceInfo::getType(), inferObjCARCLifetime(), clang::InitializedEntity::InitializeVariable(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ObjCRuntime::isFragile(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isRValueReferenceType(), clang::FunctionDecl::isTrivial(), clang::Type::isVoidType(), MaybeCreateExprWithCleanups(), clang::LangOptions::ObjCRuntime, clang::OK_Ordinary, clang::InitializationSequence::Perform(), PotentiallyEvaluated, RequireCompleteType(), RequireNonAbstractType(), clang::VarDecl::setExceptionVariable(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), and clang::VK_LValue.
Referenced by ActOnExceptionDeclarator().
| ExprResult Sema::BuildExpressionFromDeclTemplateArgument | ( | const TemplateArgument & | Arg, |
| QualType | ParamType, | ||
| SourceLocation | Loc | ||
| ) |
Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration.
Definition at line 5367 of file SemaTemplate.cpp.
References clang::CK_NoOp, clang::CK_NullToMemberPointer, clang::CK_NullToPointer, Context, clang::NestedNameSpecifier::Create(), clang::TemplateArgument::Declaration, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getKind(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Type::isPointerType(), clang::CXXScopeSpec::MakeTrivial(), clang::TemplateArgument::NullPtr, clang::ASTContext::NullPtrTy, clang::UO_AddrOf, clang::VK_LValue, and clang::VK_RValue.
Referenced by getTrivialTemplateArgumentLoc().
| ExprResult Sema::BuildExpressionFromIntegralTemplateArgument | ( | const TemplateArgument & | Arg, |
| SourceLocation | Loc | ||
| ) |
Construct a new expression that refers to the given integral template argument with the given source-location information.
This routine takes care of the mapping from an integral template argument (which may have any integral type) to the appropriate literal value.
Definition at line 5492 of file SemaTemplate.cpp.
References clang::CharacterLiteral::Ascii, clang::CK_IntegralCast, Context, clang::IntegerLiteral::Create(), clang::CStyleCastExpr::Create(), E, clang::Type::getAs(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TemplateArgument::Integral, clang::Type::isAnyCharacterType(), clang::Type::isBooleanType(), clang::Type::isChar16Type(), clang::Type::isChar32Type(), clang::Type::isNullPtrType(), clang::Type::isWideCharType(), clang::ASTContext::NullPtrTy, clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::VK_RValue, and clang::CharacterLiteral::Wide.
Referenced by checkBuiltinTemplateIdType(), and getTrivialTemplateArgumentLoc().
| ExprResult Sema::BuildExpressionTrait | ( | ExpressionTrait | OET, |
| SourceLocation | KWLoc, | ||
| Expr * | Queried, | ||
| SourceLocation | RParen | ||
| ) |
Definition at line 4495 of file SemaExprCXX.cpp.
References clang::ASTContext::BoolTy, CheckPlaceholderExpr(), Context, EvaluateExpressionTrait(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), and clang::Expr::isTypeDependent().
Referenced by ActOnExpressionTrait().
| QualType Sema::BuildExtVectorType | ( | QualType | T, |
| Expr * | ArraySize, | ||
| SourceLocation | AttrLoc | ||
| ) |
Build an ext-vector type.
Run the required checks for the extended vector type.
Definition at line 2185 of file SemaType.cpp.
References clang::AANT_ArgumentIntegerConstant, Context, Diag(), clang::ASTContext::getDependentSizedExtVectorType(), clang::ASTContext::getExtVectorType(), clang::Type::isDependentType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::VectorType::isVectorSizeTooLarge().
Referenced by HandleExtVectorTypeAttr().
| Sema::ForRangeStatus Sema::BuildForRangeBeginEndCall | ( | SourceLocation | Loc, |
| SourceLocation | RangeLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| LookupResult & | MemberLookup, | ||
| OverloadCandidateSet * | CandidateSet, | ||
| Expr * | Range, | ||
| ExprResult * | CallExpr | ||
| ) |
Build a call to 'begin' or 'end' for a C++11 for-range statement.
If the given LookupResult is non-empty, it is assumed to describe a member which will be invoked. Otherwise, the function will be found via argument dependent lookup. CallExpr is set to a valid expression and FRS_Success returned on success, otherwise CallExpr is set to ExprError() and some non-success value is returned.
Definition at line 12725 of file SemaOverload.cpp.
References ActOnCallExpr(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), BuildMemberReferenceExpr(), buildOverloadedCallSet(), clang::OverloadCandidateSet::clear(), Context, clang::UnresolvedLookupExpr::Create(), clang::LookupResult::empty(), clang::OverloadCandidateSet::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), FinishOverloadedCallExpr(), FRS_DiagnosticIssued, FRS_NoViableFunction, FRS_Success, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::UnresolvedLookupExpr::getLocStart(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::None, clang::OR_No_Viable_Function, clang::OR_Success, and S.
Referenced by BuildNonArrayForRange().
| QualType Sema::BuildFunctionType | ( | QualType | T, |
| MutableArrayRef< QualType > | ParamTypes, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity, | ||
| const FunctionProtoType::ExtProtoInfo & | EPI | ||
| ) |
Build a function type.
This routine checks the function type according to C++ rules and under the assumption that the result type and parameter types have just been instantiated from a template. It therefore duplicates some of the behavior of GetTypeForDeclarator, but in a much simpler form that is only suitable for this narrow use case.
| T | The return type of the function. |
| ParamTypes | The parameter types of the function. This array will be modified to account for adjustments to the types of the function parameters. |
| Loc | The location of the entity whose type involves this function type or, if there is no such entity, the location of the type that will have function type. |
| Entity | The name of the entity that involves the function type, if known. |
| EPI | Extra information about the function type. Usually this will be taken from an existing function with the same prototype. |
Definition at line 2250 of file SemaType.cpp.
References CheckFunctionReturnType(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Type::isHalfType(), and clang::Type::isVoidType().
Referenced by SubstituteExplicitTemplateArguments().
| ExprResult Sema::BuildImplicitMemberExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| bool | IsKnownInstance, | ||
| const Scope * | S | ||
| ) |
Builds an implicit member access expression.
The current context is known to be an instance method, and the given unqualified lookup set is known to contain only instance members, at least one of which is from an appropriate type.
Definition at line 1744 of file SemaExprMember.cpp.
References Context, clang::LookupResult::empty(), clang::SourceRange::getBegin(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::LookupResult::isAmbiguous(), clang::QualType::isNull(), and clang::SourceRange::isValid().
| FieldDecl * Sema::buildInitCaptureField | ( | sema::LambdaScopeInfo * | LSI, |
| VarDecl * | Var | ||
| ) |
Build the implicit field for an init-capture.
Definition at line 787 of file SemaLambda.cpp.
References clang::sema::CapturingScopeInfo::addCapture(), clang::DeclContext::addDecl(), clang::AS_private, Context, clang::FieldDecl::Create(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ICIS_NoInit, clang::Type::isReferenceType(), clang::sema::LambdaScopeInfo::Lambda, clang::Decl::setAccess(), and clang::Decl::setImplicit().
| ExprResult Sema::BuildInstanceMessage | ( | Expr * | Receiver, |
| QualType | ReceiverType, | ||
| SourceLocation | SuperLoc, | ||
| Selector | Sel, | ||
| ObjCMethodDecl * | Method, | ||
| SourceLocation | LBracLoc, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| SourceLocation | RBracLoc, | ||
| MultiExprArg | ArgsIn, | ||
| bool | isImplicit = false |
||
| ) |
Build an Objective-C instance message expression.
This routine takes care of both normal instance messages and instance messages to the superclass instance.
| Receiver | The expression that computes the object that will receive this message. This may be empty, in which case we are sending to the superclass instance and SuperLoc must be a valid source location. |
| ReceiverType | The (static) type of the object receiving the message. When a Receiver expression is provided, this is the same type as that expression. For a superclass instance send, this is a pointer to the type of the superclass. |
| SuperLoc | The location of the "super" keyword in a superclass instance message. |
| Sel | The selector to which the message is being sent. |
| Method | The method that this instance message is invoking, if already known. |
| LBracLoc | The location of the opening square bracket ']'. |
| RBracLoc | The location of the closing square bracket ']'. |
| ArgsIn | The message arguments. |
Definition at line 2518 of file SemaExprObjC.cpp.
References AreMultipleMethodsInGlobalPool(), checkCocoaAPI(), checkInitMethod(), CheckMessageArgumentTypes(), CheckPlaceholderExpr(), checkRetainCycles(), clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_NullToPointer, Context, clang::frontend::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), CurContext, DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), Diags, clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), forceUnknownAnyToType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedClassType(), clang::Type::getAsObjCQualifiedIdType(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getEnclosingFunction(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::ObjCMessageExpr::getMethodFamily(), clang::ASTContext::getObjCIdType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::Type::isBlockPointerType(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::DiagnosticsEngine::isIgnored(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Type::isIntegerType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCClassOrClassKindOfType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdOrObjectKindOfType(), clang::ASTContext::isObjCNSObjectType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), isSelfExpr(), clang::Expr::isTypeDependent(), clang::Selector::isUnarySelector(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupInstanceMethodInGlobalPool(), LookupMethodInQualifiedType(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), MaybeBindToTemporary(), clang::Expr::NPC_ValueDependentIsNull, clang::NumArgs, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::Qualifiers::OCL_Weak, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, PerformContextuallyConvertToObjCPointer(), clang::sema::FunctionScopeInfo::recordUseOfWeak(), RequireCompleteType(), clang::Result, clang::ObjCMessageExpr::setDelegateInitCall(), clang::ASTContext::UnknownAnyTy, and clang::VK_RValue.
Referenced by ActOnInstanceMessage(), ActOnSuperMessage(), and BuildInstanceMessageImplicit().
| ExprResult Sema::BuildInstanceMessageImplicit | ( | Expr * | Receiver, |
| QualType | ReceiverType, | ||
| SourceLocation | Loc, | ||
| Selector | Sel, | ||
| ObjCMethodDecl * | Method, | ||
| MultiExprArg | Args | ||
| ) |
Definition at line 2478 of file SemaExprObjC.cpp.
References BuildInstanceMessage().
Referenced by CheckObjCBridgeRelatedConversions().
| ExprResult Sema::BuildLambdaExpr | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc, | ||
| sema::LambdaScopeInfo * | LSI | ||
| ) |
Complete a lambda-expression having processed and attached the lambda body.
Definition at line 1483 of file SemaLambda.cpp.
References addBlockPointerConversion(), clang::DeclContext::addDecl(), addFunctionPointerConversion(), clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::CapturingScopeInfo::Captures, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, Context, clang::LambdaExpr::Create(), clang::sema::LambdaScopeInfo::ExplicitParams, clang::ExprError(), clang::sema::LambdaScopeInfo::ExprNeedsCleanups, clang::RecordDecl::field_begin(), clang::RecordDecl::fields(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, I, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::CXXRecordDecl::isGenericLambda(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, clang::LCK_VLAType, mapImplicitCaptureStyle(), clang::sema::LambdaScopeInfo::NumExplicitCaptures, performLambdaVarCaptureInitialization(), and clang::Decl::setLexicalDeclContext().
| QualType Sema::buildLambdaInitCaptureInitialization | ( | SourceLocation | Loc, |
| bool | ByRef, | ||
| IdentifierInfo * | Id, | ||
| bool | DirectInit, | ||
| Expr *& | Init | ||
| ) |
Definition at line 703 of file SemaLambda.cpp.
References Context, clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ASTContext::getAutoDeductType(), clang::ParenListExpr::getExprs(), clang::ParenListExpr::getNumExprs(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::InitializedEntity::InitializeLambdaCapture(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::InitializationSequence::Perform(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), clang::Result, and clang::TypeSpecTypeLoc::setNameLoc().
Referenced by actOnLambdaInitCaptureInitialization().
| void Sema::buildLambdaScope | ( | sema::LambdaScopeInfo * | LSI, |
| CXXMethodDecl * | CallOperator, | ||
| SourceRange | IntroducerRange, | ||
| LambdaCaptureDefault | CaptureDefault, | ||
| SourceLocation | CaptureDefaultLoc, | ||
| bool | ExplicitParams, | ||
| bool | ExplicitResultType, | ||
| bool | Mutable | ||
| ) |
Endow the lambda scope info with the relevant properties.
Definition at line 436 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::LambdaScopeInfo::ExplicitParams, clang::DeclaratorDecl::getLocStart(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::Type::isDependentType(), clang::Type::isVoidType(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, clang::sema::LambdaScopeInfo::Mutable, and clang::sema::CapturingScopeInfo::ReturnType.
| ExprResult Sema::BuildLiteralOperatorCall | ( | LookupResult & | R, |
| DeclarationNameInfo & | SuffixInfo, | ||
| ArrayRef< Expr * > | Args, | ||
| SourceLocation | LitEndLoc, | ||
| TemplateArgumentListInfo * | TemplateArgs = nullptr |
||
| ) |
BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator described by the provided lookup results.
Definition at line 12645 of file SemaOverload.cpp.
References AddFunctionCandidates(), clang::LookupResult::asUnresolvedSet(), CheckCallReturnType(), Context, CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), MaybeBindToTemporary(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and PerformCopyInitialization().
Referenced by BuildCookedLiteralOperatorCall().
| MemInitResult Sema::BuildMemberInitializer | ( | ValueDecl * | Member, |
| Expr * | Init, | ||
| SourceLocation | IdLoc | ||
| ) |
Definition at line 3061 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), CheckForDanglingReferenceOrPointer(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), DiagnoseUnexpandedParameterPack(), DiscardCleanupsInEvaluationContext(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::ValueDecl::getType(), clang::InitializedEntity::InitializeMember(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Expr::isTypeDependent(), and UPPC_Initializer.
Referenced by BuildMemInitializer(), and InstantiateMemInitializers().
| QualType Sema::BuildMemberPointerType | ( | QualType | T, |
| QualType | Class, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Build a member pointer type T Class::*.
| T | the type to which the member pointer refers. |
| Class | the class type into which the member pointer points. |
| Loc | the location where this type begins |
| Entity | the name of the entity that will have this member pointer type |
Definition at line 2289 of file SemaType.cpp.
References adjustMemberFunctionCC(), CheckDistantExceptionSpec(), Context, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::ASTContext::getMemberPointerType(), clang::DeclarationName::getNameKind(), getPrintableNameForEntity(), clang::QualType::getTypePtr(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), and clang::Type::isVoidType().
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildMemberReferenceExpr | ( | Expr * | Base, |
| QualType | BaseType, | ||
| SourceLocation | OpLoc, | ||
| bool | IsArrow, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| NamedDecl * | FirstQualifierInScope, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| const Scope * | S, | ||
| ActOnMemberAccessExtraArgs * | ExtraArgs = nullptr |
||
| ) |
Definition at line 685 of file SemaExprMember.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isSet(), LookupMemberExpr(), LookupMemberExprInRecord(), clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, and clang::Result.
Referenced by BuildForRangeBeginEndCall(), BuildImplicitMemberInitializer(), buildMemberCall(), buildSingleCopyAssignRecursively(), and LookupMemberExprInRecord().
| ExprResult Sema::BuildMemberReferenceExpr | ( | Expr * | Base, |
| QualType | BaseType, | ||
| SourceLocation | OpLoc, | ||
| bool | IsArrow, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| NamedDecl * | FirstQualifierInScope, | ||
| LookupResult & | R, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| const Scope * | S, | ||
| bool | SuppressQualifierCheck = false, |
||
| ActOnMemberAccessExtraArgs * | ExtraArgs = nullptr |
||
| ) |
Definition at line 904 of file SemaExprMember.cpp.
References clang::sema::LambdaScopeInfo::addPotentialThisCapture(), clang::LookupResult::begin(), clang::ASTContext::BoundMemberTy, BuildFieldReferenceExpr(), BuildMemberExpr(), BuildMSPropertyRefExpr(), clang::Type::castAs(), Context, clang::UnresolvedMemberExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::UnresolvedSetIterator::getPair(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Sema::ActOnMemberAccessExtraArgs::Id, clang::Expr::IgnoreImpCasts(), clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXInstanceMember(), clang::DeclContext::isDependentContext(), IsInFnTryBlockHandler(), clang::Decl::isInvalidDecl(), clang::LookupResult::isOverloadedResult(), clang::Type::isPointerType(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isUnresolvableResult(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceRange::isValid(), clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, clang::OK_Ordinary, clang::Sema::ActOnMemberAccessExtraArgs::S, clang::LookupResult::setBaseObjectType(), clang::LookupResult::suppressDiagnostics(), clang::ast_matchers::type, clang::VK_LValue, and clang::VK_RValue.
| MemInitResult Sema::BuildMemInitializer | ( | Decl * | ConstructorD, |
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | MemberOrBase, | ||
| ParsedType | TemplateTypeTy, | ||
| const DeclSpec & | DS, | ||
| SourceLocation | IdLoc, | ||
| Expr * | Init, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
Handle a C++ member initializer.
Definition at line 2848 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), BuildBaseInitializer(), BuildDecltypeType(), BuildMemberInitializer(), clang::TypeLoc::castAs(), CheckTypenameType(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectDelayedTyposInExpr(), CorrectTypo(), clang::ASTContext::CreateTypeSourceInfo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), clang::LookupResult::empty(), clang::DeclContextLookupResult::empty(), clang::ETK_None, FindBaseInitializer(), clang::DeclContextLookupResult::front(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ASTContext::getElaboratedType(), clang::Decl::getLocation(), clang::CXXBaseSpecifier::getLocStart(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::CXXMethodDecl::getParent(), clang::DeclSpec::getRepAsExpr(), clang::CXXScopeSpec::getScopeRep(), clang::CXXBaseSpecifier::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CXXBaseSpecifier::getType(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), isDependentScopeSpecifier(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::DeclContext::lookup(), LookupOrdinaryName, LookupParsedName(), MarkAnyDeclReferenced(), PDiag(), clang::Result, S, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::LookupResult::setLookupName(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::LookupResult::suppressDiagnostics(), and clang::TST_decltype.
Referenced by ActOnMemInitializer().
| Decl * Sema::BuildMicrosoftCAnonymousStruct | ( | Scope * | S, |
| DeclSpec & | DS, | ||
| RecordDecl * | Record | ||
| ) |
BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
Ref: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx Example:
struct A { int a; }; struct B { struct A; int b; };
void foo() { B var; var.a = 3; }
Definition at line 4379 of file SemaDecl.cpp.
References clang::AS_none, Context, clang::FieldDecl::Create(), clang::RecordDecl::getDefinition(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::ASTContext::getTypeDeclType(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and clang::Declarator::TypeNameContext.
| StmtResult Sema::BuildMSDependentExistsStmt | ( | SourceLocation | KeywordLoc, |
| bool | IsIfExists, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| DeclarationNameInfo | NameInfo, | ||
| Stmt * | Nested | ||
| ) |
Definition at line 3737 of file SemaStmt.cpp.
References Context.
| ExprResult Sema::BuildObjCArrayLiteral | ( | SourceRange | SR, |
| MultiExprArg | Elements | ||
| ) |
Definition at line 766 of file SemaExprObjC.cpp.
References clang::Type::castAs(), CheckObjCCollectionLiteralElement(), Context, clang::ObjCArrayLiteral::Create(), clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::hasSameUnqualifiedType(), I, clang::ASTContext::Idents, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), LK_Array, LookupObjCInterfaceDeclForLiteral(), clang::None, clang::NSAPI::NSArr_arrayWithObjectsCount, clang::ObjCMethodDecl::parameters(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::ObjCMethodDecl::setMethodParams(), clang::ASTContext::UnsignedLongTy, validateBoxingMethod(), and clang::QualType::withConst().
| StmtResult Sema::BuildObjCAtThrowStmt | ( | SourceLocation | AtLoc, |
| Expr * | Throw | ||
| ) |
Definition at line 3360 of file SemaStmt.cpp.
References Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::Type::isVoidType(), clang::Result, and clang::StmtError().
| ExprResult Sema::BuildObjCBoxedExpr | ( | SourceRange | SR, |
| Expr * | ValueExpr | ||
| ) |
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
The type of the expression will either be "NSNumber *", "NSString *" or "NSValue *" depending on the type of ValueType, which is allowed to be a built-in numeric type, "char *", "const char *" or C structure with attribute 'objc_boxable'.
Definition at line 499 of file SemaExprObjC.cpp.
References clang::CharacterLiteral::Ascii, bytes(), clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), getNSNumberFactoryMethod(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::SelectorTable::getSelector(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::getWideCharType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), clang::InitializedEntity::InitializeTemporary(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), LK_Boxed, LK_String, LookupObjCInterfaceDeclForLiteral(), clang::None, clang::ObjCMethodDecl::parameters(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::ASTContext::Selectors, clang::ObjCMethodDecl::setMethodParams(), clang::ast_matchers::type, clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::CharacterLiteral::UTF8, validateBoxingMethod(), clang::ASTContext::VoidPtrTy, clang::CharacterLiteral::Wide, and clang::CanQual< T >::withConst().
| ExprResult Sema::BuildObjCBridgedCast | ( | SourceLocation | LParenLoc, |
| ObjCBridgeCastKind | Kind, | ||
| SourceLocation | BridgeKeywordLoc, | ||
| TypeSourceInfo * | TSInfo, | ||
| Expr * | SubExpr | ||
| ) |
Definition at line 4192 of file SemaExprObjC.cpp.
References clang::CK_AnyPointerToBlockPointerCast, clang::CK_ARCConsumeObject, clang::CK_ARCProduceObject, clang::CK_BitCast, clang::CK_CPointerToObjCPointerCast, clang::CK_Dependent, Context, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::ExprError(), ExprNeedsCleanups, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isBlockPointerType(), clang::Type::isCARCBridgableType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isKnownName(), clang::Type::isObjCARCBridgableType(), clang::Expr::isTypeDependent(), maybeUndoReclaimObject(), clang::OBC_Bridge, clang::OBC_BridgeRetained, clang::OBC_BridgeTransfer, clang::Result, UsualUnaryConversions(), and clang::VK_RValue.
Referenced by ActOnObjCBridgedCast().
| ExprResult Sema::BuildObjCDictionaryLiteral | ( | SourceRange | SR, |
| MutableArrayRef< ObjCDictionaryElement > | Elements | ||
| ) |
Definition at line 870 of file SemaExprObjC.cpp.
References Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), Diag(), clang::ExprError(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Type::isIntegerType(), LK_Dictionary, LookupObjCInterfaceDeclForLiteral(), clang::None, clang::NSAPI::NSDict_dictionaryWithObjectsForKeysCount, clang::ASTContext::ObjCBuiltinIdTy, clang::ObjCMethodDecl::parameters(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::ObjCMethodDecl::setMethodParams(), clang::ASTContext::UnsignedLongTy, validateBoxingMethod(), and clang::QualType::withConst().
| ExprResult Sema::BuildObjCEncodeExpression | ( | SourceLocation | AtLoc, |
| TypeSourceInfo * | EncodedTypeInfo, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 1048 of file SemaExprObjC.cpp.
References clang::QualType::addConst(), clang::ASTContext::CharTy, Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getConstantArrayType(), getLangOpts(), clang::ASTContext::getObjCEncodingForType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::if(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::ArrayType::Normal, and RequireCompleteType().
Referenced by ParseObjCEncodeExpression().
| VarDecl * Sema::BuildObjCExceptionDecl | ( | TypeSourceInfo * | TInfo, |
| QualType | ExceptionType, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo * | Id, | ||
| bool | Invalid = false |
||
| ) |
Build a type-check a new Objective-C exception variable declaration.
Definition at line 4413 of file SemaDeclObjC.cpp.
References Context, clang::VarDecl::Create(), CurContext, Diag(), clang::QualType::getAddressSpace(), getLangOpts(), inferObjCARCLifetime(), clang::Type::isDependentType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::SC_None, clang::VarDecl::setExceptionVariable(), and clang::Decl::setInvalidDecl().
Referenced by ActOnObjCExceptionDecl().
| ExprResult Sema::BuildObjCNumericLiteral | ( | SourceLocation | AtLoc, |
| Expr * | Number | ||
| ) |
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
Type of the expression will be "NSNumber *" or "id" if NSNumber is unavailable.
Type of the expression will be "NSNumber *".
Definition at line 314 of file SemaExprObjC.cpp.
References clang::CharacterLiteral::Ascii, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getNSNumberFactoryMethod(), clang::Expr::getType(), clang::ASTContext::getWideCharType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::CharacterLiteral::UTF8, and clang::CharacterLiteral::Wide.
Referenced by CheckObjCCollectionLiteralElement().
| QualType Sema::BuildObjCObjectType | ( | QualType | BaseType, |
| SourceLocation | Loc, | ||
| SourceLocation | TypeArgsLAngleLoc, | ||
| ArrayRef< TypeSourceInfo * > | TypeArgs, | ||
| SourceLocation | TypeArgsRAngleLoc, | ||
| SourceLocation | ProtocolLAngleLoc, | ||
| ArrayRef< ObjCProtocolDecl * > | Protocols, | ||
| ArrayRef< SourceLocation > | ProtocolLocs, | ||
| SourceLocation | ProtocolRAngleLoc, | ||
| bool | FailOnError = false |
||
| ) |
Build an Objective-C object pointer type.
Definition at line 1005 of file SemaType.cpp.
References applyObjCProtocolQualifiers(), applyObjCTypeArgs(), clang::QualType::isNull(), and clang::Result.
Referenced by actOnObjCTypeArgsAndProtocolQualifiers().
| ExprResult Sema::BuildObjCStringLiteral | ( | SourceLocation | AtLoc, |
| StringLiteral * | S | ||
| ) |
Definition at line 80 of file SemaExprObjC.cpp.
References clang::NSAPI::ClassId_NSString, Context, clang::ObjCInterfaceDecl::Create(), Diag(), clang::IdentifierTable::get(), clang::StringLiteral::getLocStart(), clang::ASTContext::getObjCConstantStringInterface(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCNSStringType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::Idents, clang::QualType::isNull(), clang::ASTContext::setObjCConstantStringInterface(), and clang::ASTContext::setObjCNSStringType().
Referenced by CheckObjCCollectionLiteralElement(), and ConversionToObjCStringLiteralCheck().
| ExprResult Sema::BuildObjCSubscriptExpression | ( | SourceLocation | RB, |
| Expr * | BaseExpr, | ||
| Expr * | IndexExpr, | ||
| ObjCMethodDecl * | getterMethod, | ||
| ObjCMethodDecl * | setterMethod | ||
| ) |
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
Definition at line 736 of file SemaExprObjC.cpp.
References Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::OK_ObjCSubscript, clang::ASTContext::PseudoObjectTy, clang::Result, and clang::VK_LValue.
| ExprResult Sema::BuildOverloadedArrowExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| bool * | NoArrowOperatorFound = nullptr |
||
| ) |
BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists), where Base is an expression of class type and Member is the name of the member we're trying to find.
Definition at line 12532 of file SemaOverload.cpp.
References AddMethodCandidate(), clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), clang::Expr::Classify(), Context, CreateFunctionRefExpr(), clang::FixItHint::CreateReplacement(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, Diag(), clang::OverloadCandidateSet::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), getDeletedOrUnavailableSuffix(), clang::Expr::getExprLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::None, clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformObjectArgumentInitialization(), RequireCompleteType(), clang::OverloadCandidateSet::size(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnStartCXXMemberReference().
| ExprResult Sema::BuildOverloadedCallExpr | ( | Scope * | S, |
| Expr * | Fn, | ||
| UnresolvedLookupExpr * | ULE, | ||
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Args, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | ExecConfig, | ||
| bool | AllowTypoCorrection = true, |
||
| bool | CalleesAddressIsTaken = false |
||
| ) |
BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the declaration Func) and the call arguments Args/NumArgs, attempt to resolve the function call down to a specific function.
If overload resolution succeeds, returns the call expression produced by overload resolution. Otherwise, emits diagnostics and returns ExprError.
Definition at line 11280 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::BestViableFunction(), buildOverloadedCallSet(), clang::OverloadCandidateSet::CSK_Normal, FinishOverloadedCallExpr(), clang::Expr::getExprLoc(), and markUnaddressableCandidatesUnviable().
| bool Sema::buildOverloadedCallSet | ( | Scope * | S, |
| Expr * | Fn, | ||
| UnresolvedLookupExpr * | ULE, | ||
| MultiExprArg | Args, | ||
| SourceLocation | RParenLoc, | ||
| OverloadCandidateSet * | CandidateSet, | ||
| ExprResult * | Result | ||
| ) |
Constructs and populates an OverloadedCandidateSet from the given function.
Definition at line 11113 of file SemaOverload.cpp.
References AddOverloadedCallCandidates(), clang::OverloadCandidateSet::BestViableFunction(), checkArgPlaceholdersForOverload(), Context, clang::frontend::CPlusPlus, CurContext, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::ASTContext::DependentTy, clang::OverloadCandidateSet::empty(), clang::ExprError(), getLangOpts(), clang::OverloadExpr::getQualifier(), clang::DeclContext::isDependentContext(), clang::Decl::isImplicit(), isSFINAEContext(), clang::OR_No_Viable_Function, clang::UnresolvedLookupExpr::requiresADL(), clang::Expr::setInstantiationDependent(), clang::Expr::setTypeDependent(), clang::Expr::setValueDependent(), and clang::VK_RValue.
Referenced by BuildForRangeBeginEndCall(), and BuildOverloadedCallExpr().
Build a paren type including T.
Definition at line 1732 of file SemaType.cpp.
References Context, and clang::ASTContext::getParenType().
Referenced by GetFullTypeForDeclarator().
| ParmVarDecl * Sema::BuildParmVarDeclForTypedef | ( | DeclContext * | DC, |
| SourceLocation | Loc, | ||
| QualType | T | ||
| ) |
Synthesizes a variable for a parameter arising from a typedef.
Definition at line 10516 of file SemaDecl.cpp.
References Context, clang::ParmVarDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::SC_None, and clang::Decl::setImplicit().
Referenced by DeclClonePragmaWeak(), and clang::TemplateDeclInstantiator::SubstFunctionType().
| QualType Sema::BuildPipeType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) |
Build a Pipe type.
| T | The type to which we'll be building a Pipe. |
| Loc | We do not use it for now. |
Definition at line 1946 of file SemaType.cpp.
References Context, clang::ASTContext::getPipeType(), and clang::Type::isObjCObjectType().
Referenced by GetFullTypeForDeclarator().
| QualType Sema::BuildPointerType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Build a pointer type.
| T | The type to which we'll be building a pointer. |
| Loc | The location of the entity whose type involves this pointer type or, if there is no such entity, the location of the type that will have pointer type. |
| Entity | The name of the entity that involves the pointer type, if known. |
Definition at line 1854 of file SemaType.cpp.
References checkQualifiedFunction(), Context, Diag(), getLangOpts(), clang::ASTContext::getPointerType(), getPrintableNameForEntity(), inferARCLifetimeForPointee(), clang::Type::isObjCObjectType(), and clang::Type::isReferenceType().
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildPossibleImplicitMemberExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| const Scope * | S | ||
| ) |
Builds an expression which might be an implicit member expression.
Definition at line 234 of file SemaExprMember.cpp.
References ClassifyImplicitMemberAccess(), Diag(), diagnoseInstanceReference(), clang::ExprError(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getRepresentativeDecl(), IMA_Abstract, IMA_Error_StaticContext, IMA_Error_Unrelated, IMA_Field_Uneval_Context, IMA_Instance, IMA_Mixed, IMA_Mixed_StaticContext, IMA_Mixed_Unrelated, IMA_Static, IMA_Unresolved, IMA_Unresolved_StaticContext, and clang::SourceLocation::isValid().
Referenced by attemptRecovery(), and BuildRecoveryCallExpr().
| ExprResult Sema::BuildPredefinedExpr | ( | SourceLocation | Loc, |
| PredefinedExpr::IdentType | IT | ||
| ) |
Definition at line 2993 of file SemaExpr.cpp.
References clang::StringLiteral::Ascii, clang::ASTContext::CharTy, clang::PredefinedExpr::ComputeName(), Context, ConvertUTF8ToWideString(), clang::StringLiteral::Create(), clang::ASTContext::DependentTy, Diag(), clang::ASTContext::getConstantArrayType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTypeSizeInChars(), Length, clang::PredefinedExpr::LFunction, clang::ArrayType::Normal, clang::StringLiteral::Wide, clang::ASTContext::WideCharTy, and clang::CanQual< T >::withConst().
| ExprResult Sema::BuildPseudoDestructorExpr | ( | Expr * | Base, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| const CXXScopeSpec & | SS, | ||
| TypeSourceInfo * | ScopeType, | ||
| SourceLocation | CCLoc, | ||
| SourceLocation | TildeLoc, | ||
| PseudoDestructorTypeStorage | DestroyedType | ||
| ) |
Definition at line 5806 of file SemaExprCXX.cpp.
References CheckArrow(), Context, Diag(), clang::ExprError(), clang::SourceRange::getBegin(), getLangOpts(), clang::TypeLoc::getLocalSourceRange(), clang::QualType::getObjCLifetime(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::PseudoDestructorTypeStorage::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), clang::Type::isScalarType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Qualifiers::OCL_None, and clang::Result.
Referenced by ActOnPseudoDestructorExpr().
| ExprResult Sema::BuildQualifiedDeclarationNameExpr | ( | CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| bool | IsAddressOfOperand, | ||
| const Scope * | S, | ||
| TypeSourceInfo ** | RecoveryTSI = nullptr |
||
| ) |
BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template instantiation.
There's a large number of things which don't need to be done along this path.
Definition at line 2285 of file SemaExpr.cpp.
References clang::LookupResult::begin(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::LookupResult::empty(), clang::ETK_None, clang::ExprEmpty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), clang::LookupResult::NotFoundInCurrentInstantiation, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), S, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::TypeSpecTypeLoc::setNameLoc(), and clang::ElaboratedTypeLoc::setQualifierLoc().
| ExprResult Sema::BuildQualifiedTemplateIdExpr | ( | CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
Definition at line 2936 of file SemaTemplate.cpp.
References Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::LookupResult::isAmbiguous(), and clang::SourceLocation::isValid().
| QualType Sema::BuildQualifiedType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| Qualifiers | Qs, | ||
| const DeclSpec * | DS = nullptr |
||
| ) |
Definition at line 1654 of file SemaType.cpp.
References Context, Diag(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::DeclSpec::getRestrictSpecLoc(), clang::Qualifiers::hasRestrict(), clang::Type::isAnyPointerType(), clang::Type::isDependentType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isReferenceType(), and clang::Qualifiers::removeRestrict().
Referenced by BuildQualifiedType(), and GetFullTypeForDeclarator().
| QualType Sema::BuildQualifiedType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| unsigned | CVRA, | ||
| const DeclSpec * | DS = nullptr |
||
| ) |
Definition at line 1695 of file SemaType.cpp.
References clang::Qualifiers::addCVRQualifiers(), BuildAtomicType(), BuildQualifiedType(), clang::Qualifiers::fromCVRMask(), clang::DeclSpec::getAtomicSpecLoc(), clang::QualType::getSplitUnqualifiedType(), clang::Type::isAtomicType(), clang::QualType::isNull(), clang::SplitQualType::Quals, clang::DeclSpec::TQ_atomic, and clang::SplitQualType::Ty.
| QualType Sema::BuildReferenceType | ( | QualType | T, |
| bool | SpelledAsLValue, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Build a reference type.
| T | The type to which we'll be building a reference. |
| Loc | The location of the entity whose type involves this reference type or, if there is no such entity, the location of the type that will have reference type. |
| Entity | The name of the entity that involves the reference type, if known. |
Definition at line 1889 of file SemaType.cpp.
References checkQualifiedFunction(), Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), inferARCLifetimeForPointee(), clang::Type::isVoidType(), and clang::ASTContext::OverloadTy.
Referenced by CastForMoving(), and GetFullTypeForDeclarator().
| ExprResult Sema::BuildResolvedCallExpr | ( | Expr * | Fn, |
| NamedDecl * | NDecl, | ||
| SourceLocation | LParenLoc, | ||
| ArrayRef< Expr * > | Args, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | Config = nullptr, |
||
| bool | IsExecConfig = false |
||
| ) |
BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
an expression not of OverloadTy. The expression should unary-convert to an expression of function-pointer or block-pointer type.
| NDecl | the declaration being called, if available |
Definition at line 5187 of file SemaExpr.cpp.
References clang::ASTContext::BoolTy, clang::ASTContext::BuiltinInfo, clang::Type::castAs(), clang::CK_BuiltinFnToFnPtr, Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CallExpr::getArgs(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::FunctionDecl::getBuiltinID(), clang::FunctionType::getCallResultType(), clang::NamedDecl::getName(), clang::CallExpr::getNumArgs(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::Builtin::Context::hasCustomTypechecking(), clang::FunctionDecl::hasPrototype(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionProtoType::isParamConsumed(), clang::Type::isSpecificBuiltinType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::FunctionProtoType::isVariadic(), clang::Type::isVoidType(), clang::FunctionDecl::param_size(), rebuildUnknownAnyFunction(), clang::Result, clang::CallExpr::setArg(), clang::CallExpr::setCallee(), clang::Expr::setType(), clang::Expr::setValueKind(), clang::ASTContext::UnknownAnyTy, and clang::VK_RValue.
Referenced by BuildCallToMemberFunction(), and FinishOverloadedCallExpr().
| StmtResult Sema::BuildReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp | ||
| ) |
Definition at line 3116 of file SemaStmt.cpp.
References clang::frontend::C99, clang::CK_ToVoid, Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::frontend::CPlusPlus14, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Decl::getAttrs(), clang::Type::getContainedAutoType(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ReturnStmt::getNRVOCandidate(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::Decl::hasAttrs(), clang::InitializedEntity::InitializeRelatedResult(), clang::InitializedEntity::InitializeResult(), clang::FunctionDecl::isConstexpr(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionDecl::isNoReturn(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), clang::Result, clang::Decl::setInvalidDecl(), clang::StmtError(), and clang::ASTContext::VoidTy.
Referenced by DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), and DefineImplicitMoveAssignment().
| Decl * Sema::BuildStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc, |
| Expr * | AssertExpr, | ||
| StringLiteral * | AssertMessageExpr, | ||
| SourceLocation | RParenLoc, | ||
| bool | Failed | ||
| ) |
Definition at line 12171 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::StaticAssertDecl::Create(), CurContext, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getPrintingPolicy(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), PerformContextuallyConvertToBool(), and VerifyIntegerConstantExpression().
Referenced by ActOnStaticAssertDeclaration().
| QualType Sema::BuildStdInitializerList | ( | QualType | Element, |
| SourceLocation | Loc | ||
| ) |
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found.
Definition at line 7458 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentListInfo::addArgument(), CheckTemplateIdType(), Context, clang::ASTContext::getCanonicalType(), clang::ASTContext::getTrivialTypeSourceInfo(), LookupStdInitializerList(), and StdInitializerList.
Referenced by DeduceAutoType().
| ExprResult Sema::BuildTemplateIdExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| bool | RequiresADL, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
Definition at line 2891 of file SemaTemplate.cpp.
References clang::anyDependentTemplateArguments(), clang::LookupResult::begin(), Context, clang::UnresolvedLookupExpr::Create(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::LookupResult::getAsSingle(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNamingClass(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), and clang::LookupResult::suppressDiagnostics().
Referenced by BuildRecoveryCallExpr().
| QualType Sema::BuildTypeofExprType | ( | Expr * | E, |
| SourceLocation | Loc | ||
| ) |
Definition at line 6915 of file SemaType.cpp.
References CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus, Diag(), DiagnoseUseOfDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::ASTContext::getTypeOfExprType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::refersToBitField().
Referenced by ConvertDeclSpecToType().
| ExprResult Sema::BuildTypeTrait | ( | TypeTrait | Kind, |
| SourceLocation | KWLoc, | ||
| ArrayRef< TypeSourceInfo * > | Args, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 4170 of file SemaExprCXX.cpp.
References CheckUnaryTypeTraitTypeCompleteness(), Context, clang::TypeTraitExpr::Create(), evaluateTypeTrait(), clang::ExprError(), clang::ASTContext::getLogicalOperationType(), I, clang::Result, and clang::UTT_Last.
Referenced by ActOnTypeTrait().
| ExprResult Sema::BuildUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| UnaryOperatorKind | Opc, | ||
| Expr * | Input | ||
| ) |
Definition at line 11171 of file SemaExpr.cpp.
References clang::frontend::CPlusPlus, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::UnaryOperator::getOverloadedOperator(), clang::Expr::getType(), clang::UnaryOperator::isIncrementDecrementOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), isQualifiedMemberAccess(), clang::OO_None, clang::Result, clang::UO_AddrOf, and clang::UO_Extension.
Referenced by RebuildForRangeWithDereference().
| QualType Sema::BuildUnaryTransformType | ( | QualType | BaseType, |
| UnaryTransformType::UTTKind | UKind, | ||
| SourceLocation | Loc | ||
| ) |
Definition at line 7016 of file SemaType.cpp.
References Context, Diag(), DiagnoseUseOfDecl(), clang::UnaryTransformType::EnumUnderlyingType, clang::Type::getAs(), clang::EnumDecl::getIntegerType(), clang::Decl::getLocation(), clang::ASTContext::getUnaryTransformType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isIncompleteType(), and clang::QualType::isNull().
Referenced by ConvertDeclSpecToType().
| NamedDecl * Sema::BuildUsingDeclaration | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| SourceLocation | UsingLoc, | ||
| CXXScopeSpec & | SS, | ||
| DeclarationNameInfo | NameInfo, | ||
| AttributeList * | AttrList, | ||
| bool | IsInstantiation, | ||
| bool | HasTypenameKeyword, | ||
| SourceLocation | TypenameLoc | ||
| ) |
Builds a using declaration.
| IsInstantiation | - Whether this call arises from an instantiation of an unresolved using declaration. We treat the lookup differently for these declarations. |
Definition at line 8044 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), clang::DeclContext::addDecl(), clang::LookupResult::begin(), Builder, BuildUsingShadowDecl(), CheckInheritingConstructorUsingDecl(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), Context, CorrectTypo(), clang::UsingDecl::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::UnresolvedUsingTypenameDecl::Create(), CTK_ErrorRecovery, CurContext, clang::DeclarationName::CXXConstructorName, clang::ASTContext::DeclarationNames, Diag(), diagnoseTypo(), clang::LookupResult::Filter::done(), E, clang::LookupResult::empty(), clang::LookupResult::end(), clang::LookupResult::Filter::erase(), ForRedeclaration, clang::LookupResult::getAsSingle(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::LookupResult::getFoundDecl(), clang::Decl::getIdentifierNamespace(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getRecordType(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ASTContext::getTypeDeclType(), clang::CXXScopeSpec::getWithLocInContext(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), I, clang::Decl::IDNS_Ordinary, clang::LookupResult::isAmbiguous(), isDeclInScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFunctionOrMethod(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isLocalExternDecl(), clang::DeclContext::isRecord(), LookupConstructors(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, clang::LookupResult::makeFilter(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::LookupResult::Filter::next(), PDiag(), Previous, RequireCompleteDeclContext(), S, clang::Decl::setAccess(), clang::LookupResult::setBaseObjectType(), clang::LookupResult::setHideTags(), clang::Decl::setInvalidDecl(), clang::DeclarationNameInfo::setName(), clang::DeclarationNameInfo::setNamedTypeInfo(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnUsingDeclaration().
| UsingShadowDecl * Sema::BuildUsingShadowDecl | ( | Scope * | S, |
| UsingDecl * | UD, | ||
| NamedDecl * | Target, | ||
| UsingShadowDecl * | PrevDecl | ||
| ) |
Builds a shadow declaration corresponding to a 'using' declaration.
Definition at line 7867 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::UsingDecl::addShadowDecl(), Context, clang::UsingShadowDecl::Create(), CurContext, clang::Decl::getAccess(), clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), and clang::Redeclarable< decl_type >::setPreviousDecl().
Referenced by BuildUsingDeclaration().
| ExprResult Sema::BuildVAArgExpr | ( | SourceLocation | BuiltinLoc, |
| Expr * | E, | ||
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | RPLoc | ||
| ) |
Definition at line 11859 of file SemaExpr.cpp.
References clang::TargetInfo::CharPtrBuiltinVaList, CheckForModifiableLvalue(), Context, Diag(), clang::ASTContext::DoubleTy, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getBuiltinMSVaListType(), clang::TargetInfo::getBuiltinVaListKind(), clang::ASTContext::getBuiltinVaListType(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonLValueExprType(), clang::ASTContext::getPromotedIntegerType(), clang::TypeLoc::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TargetInfo::hasBuiltinMSVaList(), clang::ASTContext::hasSameType(), clang::if(), clang::InitializedEntity::InitializeParameter(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), clang::QualType::isPODType(), clang::Type::isPromotableIntegerType(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), clang::Result, and clang::ASTContext::typesAreCompatible().
| void Sema::BuildVariableInstantiation | ( | VarDecl * | NewVar, |
| VarDecl * | OldVar, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| LateInstantiatedAttrVec * | LateAttrs, | ||
| DeclContext * | Owner, | ||
| LocalInstantiationScope * | StartingScope, | ||
| bool | InstantiatingVarTemplate = false |
||
| ) |
BuildVariableInstantiation - Used after a new variable has been created.
Sets basic variable data and decides whether to postpone the variable instantiation.
Definition at line 3610 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addHiddenDecl(), CheckVariableDeclaration(), Context, CurrentInstantiationScope, DiagnoseUnusedDecl(), FindInstantiatedDecl(), ForRedeclaration, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getInitStyle(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::ASTContext::getManglingNumber(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ASTContext::getStaticLocalNumber(), clang::VarDecl::getTSCSpec(), clang::ValueDecl::getType(), clang::NamedDecl::hasLinkage(), InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateVariableInitializer(), clang::VarDecl::isConstexpr(), clang::VarDecl::isCXXForRangeDecl(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclContext::isFunctionOrMethod(), clang::VarDecl::isInitCapture(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isPreviousDeclInSameBlockScope(), clang::Decl::isReferenced(), clang::VarDecl::isStaticDataMember(), clang::Type::isUndeducedType(), clang::Decl::isUsed(), LookupOrdinaryName, LookupQualifiedName(), LookupRedeclarationWithLinkage, clang::DeclContext::makeDeclVisibleInContext(), Previous, clang::Decl::setAccess(), clang::VarDecl::setConstexpr(), clang::VarDecl::setCXXForRangeDecl(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), clang::VarDecl::setInstantiationOfStaticDataMember(), clang::Decl::setIsUsed(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::ASTContext::setManglingNumber(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Decl::setReferenced(), clang::ASTContext::setStaticLocalNumber(), and clang::VarDecl::setTSCSpec().
Referenced by clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
| VarTemplateSpecializationDecl * Sema::BuildVarTemplateInstantiation | ( | VarTemplateDecl * | VarTemplate, |
| VarDecl * | FromVar, | ||
| const TemplateArgumentList & | TemplateArgList, | ||
| const TemplateArgumentListInfo & | TemplateArgsInfo, | ||
| SmallVectorImpl< TemplateArgument > & | Converted, | ||
| SourceLocation | PointOfInstantiation, | ||
| void * | InsertPos, | ||
| LateInstantiatedAttrVec * | LateAttrs = nullptr, |
||
| LocalInstantiationScope * | StartingScope = nullptr |
||
| ) |
Definition at line 3538 of file SemaTemplateInstantiateDecl.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Sema::InstantiatingTemplate::isInvalid(), and clang::Decl::isInvalidDecl().
| ExprResult Sema::BuildVectorLiteral | ( | SourceLocation | LParenLoc, |
| SourceLocation | RParenLoc, | ||
| Expr * | E, | ||
| TypeSourceInfo * | TInfo | ||
| ) |
Build an altivec or OpenCL literal.
Definition at line 5884 of file SemaExpr.cpp.
References clang::VectorType::AltiVecVector, Context, Diag(), E, clang::ExprError(), clang::VectorType::GenericVector, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), getElementType(), clang::Expr::getExprLoc(), clang::TypeSourceInfo::getType(), clang::VectorType::getVectorKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isVectorType(), and clang::Expr::setType().
| ExprResult Sema::CallExprUnaryConversions | ( | Expr * | E | ) |
CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression.
Definition at line 727 of file SemaExpr.cpp.
References clang::CK_FunctionToPointerDecay, Context, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Type::isFunctionType(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
| bool Sema::canDelayFunctionBody | ( | const Declarator & | D | ) |
Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function.
This will be false if we may need the body of the function in the middle of parsing an expression (where it's impractical to switch to parsing a different function), for instance, if it's constexpr in C++11 or has an 'auto' return type in C++14. These cases are essentially bugs.
Definition at line 10995 of file SemaDecl.cpp.
References clang::DeclSpec::containsPlaceholderType(), clang::DeclaratorChunk::Function, clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), clang::DeclSpec::isConstexprSpecified(), clang::QualType::isNull(), and clang::Type::isUndeducedType().
| bool Sema::CanPerformCopyInitialization | ( | const InitializedEntity & | Entity, |
| ExprResult | Init | ||
| ) |
Definition at line 7652 of file SemaInit.cpp.
References clang::InitializationKind::CreateCopy(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by TryListConversion().
Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function.
This will be false only if we may need the body of the function in order to parse the rest of the program (for instance, if it is constexpr in C++11 or has an 'auto' return type in C++14).
Definition at line 11019 of file SemaDecl.cpp.
References clang::Decl::getAsFunction().
| CanThrowResult clang::Sema::canThrow | ( | const Expr * | E | ) |
Definition at line 944 of file SemaExceptionSpec.cpp.
References clang::canCalleeThrow(), clang::canDynamicCastThrow(), clang::canSubExprsThrow(), clang::canTypeidThrow(), clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), clang::CT_Can, clang::CT_Cannot, clang::CT_Dependent, E, clang::Type::getAs(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::CXXRecordDecl::getDestructor(), clang::Expr::IgnoreParens(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::mergeCanThrow().
Referenced by BuildCXXNoexceptExpr(), clang::canSubExprsThrow(), EvaluateBinaryTypeTrait(), and evaluateTypeTrait().
Determine whether the use of this declaration is valid, without emitting diagnostics.
Definition at line 52 of file SemaExpr.cpp.
References clang::AR_Unavailable, and clang::Decl::getAvailability().
| QualType Sema::CheckAdditionOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| QualType * | CompLHSTy = nullptr |
||
| ) |
Definition at line 8092 of file SemaExpr.cpp.
References clang::BO_Add, checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOpPointerOperand(), Context, diagnoseStringPlusChar(), diagnoseStringPlusInt(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::ASTContext::isPromotableBitField(), clang::Type::isPromotableIntegerType(), and clang::Type::isVectorType().
| bool Sema::checkAddressOfFunctionIsAvailable | ( | const FunctionDecl * | Function, |
| bool | Complain = false, |
||
| SourceLocation | Loc = SourceLocation() |
||
| ) |
Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if the address can't be taken.
Returns false if taking the address of the function is illegal.
Definition at line 8908 of file SemaOverload.cpp.
References checkAddressOfFunctionIsAvailable().
Referenced by clang::InitializationSequence::Diagnose(), FinishOverloadedCallExpr(), isExprAnUnaddressableFunction(), IsStandardConversion(), markUnaddressableCandidatesUnviable(), and maybeDiagnoseAssignmentToFunction().
| Sema::AccessResult Sema::CheckAddressOfMemberAccess | ( | Expr * | OvlExpr, |
| DeclAccessPair | FoundDecl | ||
| ) |
Definition at line 1777 of file SemaAccess.cpp.
References AR_accessible, clang::AS_none, clang::AS_public, CheckAccess(), Context, clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::DeclAccessPair::getAccess(), clang::OverloadExpr::getNameLoc(), and clang::OverloadExpr::getNamingClass().
Referenced by clang::InitializationSequence::Perform(), and ResolveAddressOfOverloadedFunction().
| QualType Sema::CheckAddressOfOperand | ( | ExprResult & | OrigOp, |
| SourceLocation | OpLoc | ||
| ) |
CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object.
If it is an lvalue, the object cannot be declared with storage class register or be a bit field. Note: The usual conversions are not applied to the operand of the & operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue. In C++, the operand might be an overloaded function name, in which case we allow the '&' but retain the overloaded-function type.
Definition at line 10000 of file SemaExpr.cpp.
References bool, clang::frontend::C99, checkAddressOfFunctionIsAvailable(), clang::Expr::ClassifyLValue(), Context, clang::FixItHint::CreateInsertion(), clang::ASTContext::DependentTy, Diag(), diagnoseAddressOfInvalidType(), E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::TargetInfo::getCXXABI(), clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::DeclContext::getParent(), clang::ASTContext::getPointerType(), getPrimaryDecl(), clang::DeclRefExpr::getQualifier(), clang::getQualifier(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::if(), clang::Expr::IgnoreParens(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCObjectType(), clang::Type::isPlaceholderType(), clang::DeclContext::isRecord(), clang::Type::isReferenceType(), clang::Expr::isTypeDependent(), clang::Expr::LV_ArrayTemporary, clang::Expr::LV_ClassTemporary, clang::Expr::LV_IncompleteVoidType, clang::Expr::LV_MemberFunction, clang::Expr::LV_Valid, clang::OK_BitField, clang::OK_VectorComponent, clang::ASTContext::OverloadTy, clang::SC_Register, clang::ASTContext::UnknownAnyTy, clang::UO_AddrOf, and clang::UO_Deref.
Referenced by SemaBuiltinAddressof().
| void Sema::CheckAlignasUnderalignment | ( | Decl * | D | ) |
Definition at line 3226 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::CharUnits::getQuantity(), clang::ASTContext::getTagDeclType(), clang::ASTContext::getTypeAlignInChars(), clang::Decl::hasAttrs(), I, clang::Decl::specific_attrs(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by ActOnEnumBody().
| bool Sema::CheckAllocatedType | ( | QualType | AllocType, |
| SourceLocation | Loc, | ||
| SourceRange | R | ||
| ) |
Checks that a type is suitable as the allocated type in a new-expression.
Definition at line 1665 of file SemaExprCXX.cpp.
References Context, Diag(), clang::QualType::getAddressSpace(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), getLangOpts(), clang::QualType::getObjCLifetime(), clang::QualType::getUnqualifiedType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isObjCLifetimeType(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::Qualifiers::OCL_None, RequireCompleteType(), and RequireNonAbstractType().
Referenced by BuildCXXNew().
| Sema::AccessResult Sema::CheckAllocationAccess | ( | SourceLocation | OperatorLoc, |
| SourceRange | PlacementRange, | ||
| CXXRecordDecl * | NamingClass, | ||
| DeclAccessPair | FoundDecl, | ||
| bool | Diagnose = true |
||
| ) |
Checks access to an overloaded operator new or delete.
Definition at line 1689 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, and clang::DeclAccessPair::getAccess().
Referenced by FindAllocationFunctions(), FindAllocationOverload(), and FindDeallocationFunction().
| bool Sema::CheckARCMethodDecl | ( | ObjCMethodDecl * | method | ) |
Check a method declaration for compatibility with the Objective-C ARC conventions.
Definition at line 195 of file SemaDeclObjC.cpp.
References clang::Decl::addAttr(), checkInitMethod(), Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::ObjCMethodDecl::getSelectorLoc(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::SourceRange::isInvalid(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, and clang::ASTContext::VoidTy.
Referenced by ActOnMethodDeclaration(), and ProcessPropertyDecl().
| Sema::AssignConvertType Sema::CheckAssignmentConstraints | ( | SourceLocation | Loc, |
| QualType | LHSType, | ||
| QualType | RHSType | ||
| ) |
CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values.
C99 6.5.16.
Definition at line 7066 of file SemaExpr.cpp.
References clang::CK_Invalid, and clang::VK_RValue.
Referenced by ActOnPropertyImplDecl(), DiagnosePropertyAccessorMismatch(), and handleCleanupAttr().
| Sema::AssignConvertType Sema::CheckAssignmentConstraints | ( | QualType | LHSType, |
| ExprResult & | RHS, | ||
| CastKind & | Kind, | ||
| bool | ConvertRHS = true |
||
| ) |
Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type.
CheckAssignmentConstraints (C99 6.5.16) - This routine currently has code to accommodate several GCC extensions when type checking pointers.
The conversion is prepared for if ConvertRHS is true.
Here are some objectionable examples that GCC considers warnings:
int a, *pint; short *pshort; struct foo *pfoo;
pint = pshort; // warning: assignment from incompatible pointer type a = pint; // warning: assignment makes integer from pointer without a cast pint = a; // warning: assignment makes pointer from integer without a cast pint = pfoo; // warning: assignment from incompatible pointer type
As a result, the code for dealing with pointers is more complex than the C99 spec dictates.
Sets 'Kind' for any result kind except Incompatible.
Definition at line 7097 of file SemaExpr.cpp.
References clang::ASTContext::areCompatibleVectorTypes(), clang::ASTContext::BoolTy, checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_LValueBitCast, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, clang::CK_VectorSplat, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getObjCClassRedefinitionType(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::Type::isArithmeticType(), clang::Type::isBlockCompatibleObjCPointerType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isExtVectorType(), clang::Type::isIntegerType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), and clang::ASTContext::typesAreCompatible().
| QualType Sema::CheckAssignmentOperands | ( | Expr * | LHSExpr, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| QualType | CompoundType | ||
| ) |
Definition at line 9698 of file SemaExpr.cpp.
References CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckIdentityFieldAssignment(), Context, clang::frontend::CPlusPlus, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclRefExpr::getDecl(), clang::SourceLocation::getLocWithOffset(), clang::QualType::getObjCLifetime(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenCasts(), clang::SourceLocation::isFileID(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Qualifiers::OCL_Strong, clang::UO_Minus, and clang::UO_Plus.
| Sema::AccessResult Sema::CheckBaseClassAccess | ( | SourceLocation | AccessLoc, |
| QualType | Base, | ||
| QualType | Derived, | ||
| const CXXBasePath & | Path, | ||
| unsigned | DiagID, | ||
| bool | ForceCheck = false, |
||
| bool | ForceUnprivileged = false |
||
| ) |
Checks access for a hierarchy conversion.
| ForceCheck | true if this check should be performed even if access control is disabled; some things rely on this for semantics |
| ForceUnprivileged | true if this check should proceed as if the context had no special privileges |
Definition at line 1801 of file SemaAccess.cpp.
References clang::CXXBasePath::Access, AR_accessible, AR_accessible, AR_dependent, AR_dependent, AR_inaccessible, AR_inaccessible, clang::AS_public, CheckAccess(), CheckEffectiveAccess(), Context, and clang::Type::getAs().
Referenced by CheckDerivedToBaseConversion(), CheckExceptionSpecSubset(), TryStaticDowncast(), and TryStaticMemberPointerUpcast().
| CXXBaseSpecifier * Sema::CheckBaseSpecifier | ( | CXXRecordDecl * | Class, |
| SourceRange | SpecifierRange, | ||
| bool | Virtual, | ||
| AccessSpecifier | Access, | ||
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | EllipsisLoc | ||
| ) |
ActOnBaseSpecifier - Parsed a base specifier.
Check the validity of a C++ base class specifier.
Definition at line 1351 of file SemaDeclCXX.cpp.
References clang::Type::containsUnexpandedParameterPack(), Context, Diag(), findCircularInheritance(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::TypeLoc::getBeginLoc(), clang::CXXRecordDecl::getCanonicalDecl(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getDeclName(), clang::RecordDecl::getDefinition(), clang::getDLLAttr(), clang::Decl::getLocation(), clang::TypeLoc::getSourceRange(), clang::TagDecl::getTagKind(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isRecordType(), clang::TagDecl::isUnion(), clang::Type::isUnionType(), clang::SourceLocation::isValid(), propagateDLLAttrToBaseClassTemplate(), RequireCompleteType(), clang::Decl::setInvalidDecl(), and clang::TTK_Class.
Referenced by ActOnBaseSpecifier(), and SubstBaseSpecifiers().
|
inline |
Definition at line 9266 of file SemaExpr.cpp.
References checkArithmeticNull(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::Type::isVectorType().
| ExprResult Sema::CheckBooleanCondition | ( | Expr * | E, |
| SourceLocation | Loc | ||
| ) |
CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g.
in an if statement). Also performs the standard function and array decays, possibly changing the input variable.
| Loc | - A location associated with the condition, e.g. the 'if' keyword. |
Definition at line 13990 of file SemaExpr.cpp.
References CheckCXXBooleanCondition(), CheckPlaceholderExpr(), DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseAssignmentAsCondition(), DiagnoseEqualityWithExtraParens(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getLangOpts(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isScalarType(), and clang::Expr::isTypeDependent().
Referenced by ActOnBooleanCondition(), and CheckConditionVariable().
| bool Sema::CheckCallingConvAttr | ( | const AttributeList & | attr, |
| CallingConv & | CC, | ||
| const FunctionDecl * | FD = nullptr |
||
| ) |
Definition at line 3729 of file SemaDeclAttr.cpp.
References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_C, clang::CC_IntelOclBicc, clang::CC_X86_64SysV, clang::CC_X86_64Win64, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86StdCall, clang::CC_X86ThisCall, clang::CC_X86VectorCall, clang::TargetInfo::CCCR_OK, clang::TargetInfo::CCCR_Warning, clang::TargetInfo::CCMT_Member, clang::TargetInfo::CCMT_NonMember, clang::TargetInfo::CCMT_Unknown, checkAttributeNumArgs(), clang::TargetInfo::checkCallingConvention(), checkStringLiteralArgumentAttr(), Context, Diag(), clang::TargetInfo::getDefaultCallingConv(), clang::AttributeList::getKind(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::NamedDecl::isCXXInstanceMember(), clang::AttributeList::isInvalid(), and clang::AttributeList::setInvalid().
Referenced by handleCallConvAttr(), and handleFunctionTypeAttr().
| bool Sema::CheckCallReturnType | ( | QualType | ReturnType, |
| SourceLocation | Loc, | ||
| CallExpr * | CE, | ||
| FunctionDecl * | FD | ||
| ) |
CheckCallReturnType - Checks that a call expression's return type is complete.
Returns true on failure. The location passed in is the location that best represents the call.
Definition at line 13863 of file SemaExpr.cpp.
References Diag(), ExprEvalContexts, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Type::isIncompleteType(), clang::Type::isVoidType(), and RequireCompleteType().
Referenced by ActOnDecltypeExpression(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
Definition at line 14640 of file SemaExpr.cpp.
References Context, clang::Expr::getType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrEnumerationType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
| void Sema::CheckCastAlign | ( | Expr * | Op, |
| QualType | T, | ||
| SourceRange | TRange | ||
| ) |
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements.
Definition at line 8479 of file SemaChecking.cpp.
References Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::PointerType::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), and clang::CharUnits::isOne().
| void Sema::CheckCategoryVsClassMethodMatches | ( | ObjCCategoryImplDecl * | CatIMPDecl | ) |
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found.
Definition at line 2800 of file SemaDeclObjC.cpp.
References clang::ObjCContainerDecl::class_methods(), clang::ObjCCategoryImplDecl::getCategoryDecl(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCInterfaceDecl::getSuperClass(), I, clang::ObjCContainerDecl::instance_methods(), clang::ObjCInterfaceDecl::lookupMethod(), and MatchAllMethodDeclarations().
Referenced by ImplMethodsVsClassMethods().
| void Sema::checkClassLevelDLLAttribute | ( | CXXRecordDecl * | Class | ) |
Check class-level dllimport/dllexport attribute.
Definition at line 4729 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), clang::Attr::clone(), Context, clang::DeclContext::decls(), DelayedDllExportClasses, Diag(), clang::Decl::dropAttr(), ForceDeclarationOfImplicitMembers(), getASTContext(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::getDLLAttr(), clang::Attr::getKind(), getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::LangOptions::isCompatibleWithMSVC(), clang::NamedDecl::isExternallyVisible(), clang::Attr::isInherited(), clang::TargetCXXABI::isMicrosoft(), clang::LangOptions::MSVC2015, and clang::TSK_ExplicitInstantiationDeclaration.
Referenced by CheckCompletedCXXClass(), and propagateDLLAttrToBaseClassTemplate().
| DeclResult Sema::CheckClassTemplate | ( | Scope * | S, |
| unsigned | TagSpec, | ||
| TagUseKind | TUK, | ||
| SourceLocation | KWLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| AttributeList * | Attr, | ||
| TemplateParameterList * | TemplateParams, | ||
| AccessSpecifier | AS, | ||
| SourceLocation | ModulePrivateLoc, | ||
| SourceLocation | FriendLoc, | ||
| unsigned | NumOuterTemplateParamLists, | ||
| TemplateParameterList ** | OuterTemplateParamLists, | ||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
Definition at line 834 of file SemaTemplate.cpp.
References clang::AS_none, clang::AS_public, clang::LookupResult::begin(), clang::LookupResult::clear(), Context, clang::FriendDecl::Create(), clang::CXXRecordDecl::Create(), clang::ClassTemplateDecl::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::DeclContext::Encloses(), clang::LookupResult::end(), clang::DeclContext::Equals(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::Scope::getFlags(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInjectedClassNameType(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::DeclContext::getLookupParent(), clang::Scope::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getScopeRep(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), clang::DeclContext::makeDeclVisibleInContext(), clang::Name, Previous, S, clang::Decl::setAccess(), clang::CXXRecordDecl::setDescribedClassTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setObjectOfFriendDecl(), clang::TagDecl::setTemplateParameterListsInfo(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TagDecl::startDefinition(), clang::Scope::TemplateParamScope, and clang::TTK_Enum.
Referenced by ActOnTemplatedFriendTag().
| QualType Sema::CheckCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| bool | isRelational | ||
| ) |
Definition at line 8786 of file SemaExpr.cpp.
References clang::ASTContext::areComparableObjCPointerTypes(), clang::BO_EQ, clang::BO_GE, clang::BO_LE, clang::BO_NE, clang::Type::castAs(), checkArithmeticNull(), checkEnumComparison(), clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_NullToMemberPointer, clang::CK_NullToPointer, Context, convertPointersToCompositeType(), clang::frontend::CPlusPlus, Diag(), diagnoseDistinctPointerComparison(), diagnoseFunctionPointerToVoidComparison(), diagnoseLogicalNotOnLHSofComparison(), diagnoseObjCLiteralComparison(), E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), getCompareDecl(), clang::ASTContext::getLogicalOperationType(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Type::hasFloatingRepresentation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::PointerType::isAddressSpaceOverlapping(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isArrayType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), isObjCObjectLiteral(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRealType(), clang::Type::isReferenceType(), clang::Type::isVectorType(), clang::Type::isVoidType(), IsWithinTemplateSpecialization(), clang::Expr::NPC_ValueDependentIsNull, clang::Expr::NPCK_NotNull, and clang::ASTContext::typesAreCompatible().
| void Sema::CheckCompatibleReinterpretCast | ( | QualType | SrcType, |
| QualType | DestType, | ||
| bool | IsDereference, | ||
| SourceRange | Range | ||
| ) |
Definition at line 1660 of file SemaCast.cpp.
References Context, Diag(), Diags, clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Type::getPointeeType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isAnyCharacterType(), clang::DiagnosticsEngine::isIgnored(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), and clang::Type::isVoidType().
Referenced by CheckIndirectionOperand(), and TryReinterpretCast().
| void Sema::CheckCompletedCoroutineBody | ( | FunctionDecl * | FD, |
| Stmt *& | Body | ||
| ) |
Definition at line 362 of file SemaCoroutine.cpp.
References buildPromiseCall(), Context, clang::sema::FunctionScopeInfo::CoroutinePromise, clang::sema::FunctionScopeInfo::CoroutineStmts, Diag(), clang::sema::FunctionScopeInfo::FirstReturnLoc, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::InitializedEntity::InitializeResult(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceLocation::isValid(), clang::None, and clang::Decl::setInvalidDecl().
| void Sema::CheckCompletedCXXClass | ( | CXXRecordDecl * | Record | ) |
Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc.
Definition at line 4893 of file SemaDeclCXX.cpp.
References clang::AS_public, clang::DeclContextLookupResult::begin(), CheckAbstractClassUsage(), checkClassLevelDLLAttribute(), CheckExplicitlyDefaultedSpecialMember(), Context, CXXInvalid, DeclareInheritingConstructors(), Diag(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseHiddenVirtualMethods(), E, clang::DeclContextLookupResult::end(), clang::RecordDecl::fields(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::Decl::getAccess(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDestructor(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumBases(), clang::ASTContext::getRecordType(), getSpecialMember(), clang::TagDecl::getTagKind(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), I, clang::CXXRecordDecl::isAbstract(), clang::CXXRecordDecl::isAggregate(), clang::TagDecl::isDependentType(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::RecordDecl::isMsStruct(), clang::CXXRecordDecl::isPolymorphic(), clang::CXXMethodDecl::isVirtual(), clang::DeclContext::lookup(), clang::CXXRecordDecl::methods(), and SpecialMemberIsTrivial().
Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().
| void Sema::CheckCompleteVariableDeclaration | ( | VarDecl * | var | ) |
Definition at line 9957 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::VarDecl::checkInitIsICE(), Context, clang::frontend::CPlusPlus11, clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, Diag(), clang::Decl::dropAttr(), clang::VarDecl::evaluateValue(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::Decl::getDeclContext(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::DeclContext::getRedeclContext(), clang::StringLiteral::getString(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::hasInit(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::CXXRecordDecl::hasTrivialDestructor(), I, clang::InitializedEntity::InitializeBlock(), clang::Expr::isConstantInitializer(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isInitICE(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), clang::VarDecl::isStaticLocal(), clang::Type::isStructureOrClassType(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarDecl::isUsableInConstantExpressions(), clang::Expr::isValueDependent(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::ASTContext::PSF_Write, clang::ASTContext::setBlockVarCopyInits(), Stack, clang::VarDecl::TLS_Static, clang::ast_matchers::type, and clang::VK_LValue.
Referenced by ActOnEndOfTranslationUnit().
| QualType Sema::CheckConditionalOperands | ( | ExprResult & | Cond, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| ExprValueKind & | VK, | ||
| ExprObjectKind & | OK, | ||
| SourceLocation | QuestionLoc | ||
| ) |
Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
In that case, LHS = cond. C99 6.5.15
Definition at line 6419 of file SemaExpr.cpp.
References checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalVoidType(), checkPointerIntegerMismatch(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Type::isArithmeticType(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::OK_Ordinary, OpenCLCheckVectorConditional(), and clang::VK_RValue.
| ExprResult Sema::CheckConditionVariable | ( | VarDecl * | ConditionVar, |
| SourceLocation | StmtLoc, | ||
| bool | ConvertToBoolean | ||
| ) |
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement.
Definition at line 2822 of file SemaExprCXX.cpp.
References CheckBooleanCondition(), Context, clang::DeclRefExpr::Create(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), MarkDeclRefReferenced(), and clang::VK_LValue.
| void Sema::CheckConflictingOverridingMethod | ( | ObjCMethodDecl * | Method, |
| ObjCMethodDecl * | Overridden, | ||
| bool | IsProtocolMethodDecl | ||
| ) |
Definition at line 2465 of file SemaDeclObjC.cpp.
References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by CheckObjCMethodOverrides().
| bool Sema::CheckConstexprFunctionBody | ( | const FunctionDecl * | Dcl, |
| Stmt * | Body | ||
| ) |
Check the body for the given constexpr function declaration only contains the permitted types of statement.
C++11 [dcl.constexpr]p3,p4.
Definition at line 1133 of file SemaDeclCXX.cpp.
References clang::CompoundStmt::body(), CheckConstexprCtorInitializer(), CheckConstexprFunctionStmt(), Diag(), Diags, E, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::RecordDecl::fields(), getLangOpts(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumBases(), clang::CXXRecordDecl::getNumVBases(), clang::DeclContext::getParent(), clang::FunctionDecl::getReturnType(), clang::CXXRecordDecl::hasVariantMembers(), I, Inits, clang::Type::isDependentType(), clang::Expr::isPotentialConstantExpr(), clang::TagDecl::isUnion(), and clang::Type::isVoidType().
| bool Sema::CheckConstexprFunctionDecl | ( | const FunctionDecl * | FD | ) |
Definition at line 803 of file SemaDeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), CheckConstexprParameterTypes(), Diag(), clang::CXXMethodDecl::getCanonicalDecl(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), getRecordDiagFromTagKind(), clang::FunctionDecl::getReturnType(), clang::TagDecl::getTagKind(), I, clang::Type::isDependentType(), clang::CXXMethodDecl::isInstance(), clang::CXXMethodDecl::isVirtual(), RequireLiteralType(), and clang::CXXRecordDecl::vbases().
| void Sema::CheckConstructor | ( | CXXConstructorDecl * | Constructor | ) |
CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required.
Returns true if the constructor declarator is invalid.
Definition at line 6722 of file SemaDeclCXX.cpp.
References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getTagDeclType(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ParmVarDecl::hasDefaultArg(), clang::Decl::isInvalidDecl(), clang::Decl::setInvalidDecl(), and clang::TSK_ImplicitInstantiation.
Referenced by ActOnFinishDelayedCXXMethodDeclaration().
| Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc, |
| CXXConstructorDecl * | D, | ||
| const InitializedEntity & | Entity, | ||
| AccessSpecifier | Access, | ||
| bool | IsCopyBindingRefToTemp = false |
||
| ) |
Checks access to a constructor.
Definition at line 1616 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_LambdaCapture, clang::InitializedEntity::EK_Member, clang::InitializedEntity::getBaseSpecifier(), clang::InitializedEntity::getCapturedVarName(), clang::InitializedEntity::getDecl(), clang::InitializedEntity::getKind(), clang::CXXBaseSpecifier::getType(), clang::InitializedEntity::getType(), clang::ValueDecl::getType(), and clang::InitializedEntity::isInheritedVirtualBase().
Referenced by BuildCXXCastArgument(), CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().
| Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc, |
| CXXConstructorDecl * | D, | ||
| const InitializedEntity & | Entity, | ||
| AccessSpecifier | Access, | ||
| const PartialDiagnostic & | PDiag | ||
| ) |
Checks access to a constructor.
Definition at line 1659 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::InitializedEntity::EK_Base, clang::InitializedEntity::getKind(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTypeDeclType(), and clang::DeclAccessPair::make().
| QualType Sema::CheckConstructorDeclarator | ( | Declarator & | D, |
| QualType | R, | ||
| StorageClass & | SC | ||
| ) |
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R.
If there are any errors in the declarator, this routine will emit diagnostics and set the invalid bit to true. In any case, the type will be updated to reflect a well-formed type for the constructor and returned.
Definition at line 6648 of file SemaDeclCXX.cpp.
References clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), Diag(), diagnoseIgnoredQualifiers(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::FunctionProtoType::getParamTypes(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::FunctionType::getReturnType(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::Declarator::isInvalidType(), clang::DeclSpec::isVirtualSpecified(), clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::Qualifiers::Restrict, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::ASTContext::VoidTy, and clang::Qualifiers::Volatile.
Referenced by CreateNewFunctionDecl().
| void Sema::CheckConversionDeclarator | ( | Declarator & | D, |
| QualType & | R, | ||
| StorageClass & | SC | ||
| ) |
CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator D with type R.
If there are any errors in the declarator, this routine will emit diagnostics and return true. Otherwise, it will return false. Either way, the type R will be updated to reflect a well-formed type for the conversion operator.
Definition at line 6928 of file SemaDeclCXX.cpp.
References clang::frontend::After, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, Context, clang::UnqualifiedId::ConversionFunctionId, clang::frontend::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateInsertionFromRange(), clang::FixItHint::CreateRemoval(), Diag(), extendLeft(), extendRight(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::DeclaratorChunk::Function, clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Declarator::getDeclSpec(), clang::DeclSpec::getExplicitSpecLoc(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::TypeLoc::getLocEnd(), getLocForEndOfToken(), clang::Declarator::getName(), clang::FunctionProtoType::getNumParams(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::TypeLoc::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::DeclSpec::getStorageClassSpecLoc(), clang::CharSourceRange::getTokenRange(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::hasTypeSpecifier(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::DeclSpec::isExplicitSpecified(), clang::Type::isFunctionType(), clang::Declarator::isInvalidType(), clang::SourceRange::isValid(), clang::FunctionProtoType::isVariadic(), clang::DeclaratorChunk::MemberPointer, clang::None, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), and clang::Declarator::type_objects().
Referenced by CreateNewFunctionDecl().
| ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| llvm::APSInt & | Value, | ||
| CCEKind | CCE | ||
| ) |
Definition at line 5230 of file SemaOverload.cpp.
References clang::Type::isIntegralOrEnumerationType().
Referenced by ActOnCXXNew().
| ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| APValue & | Value, | ||
| CCEKind | CCE | ||
| ) |
Definition at line 5225 of file SemaOverload.cpp.
References CheckConvertedConstantExpression().
| bool Sema::CheckCUDATarget | ( | const FunctionDecl * | Caller, |
| const FunctionDecl * | Callee | ||
| ) |
Definition at line 151 of file SemaCUDA.cpp.
References CFP_Never, CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, Diag(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getNameAsString(), IdentifyCUDAPreference(), IdentifyCUDATarget(), and clang::Decl::isImplicit().
Referenced by AddOverloadCandidate(), and BuildCallToMemberFunction().
| ExprResult Sema::CheckCXXBooleanCondition | ( | Expr * | CondExpr | ) |
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
CheckCXXBooleanCondition - Returns true if a conversion to bool is invalid.
Definition at line 2858 of file SemaExprCXX.cpp.
References PerformContextuallyConvertToBool().
Referenced by CheckBooleanCondition(), and CXXCheckConditionalOperands().
| void Sema::CheckCXXDefaultArguments | ( | FunctionDecl * | FD | ) |
CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default].
Definition at line 712 of file SemaDeclCXX.cpp.
References Diag(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::hasDefaultArg(), clang::Decl::isInvalidDecl(), clang::ParmVarDecl::isParameterPack(), p, and clang::ParmVarDecl::setDefaultArg().
Referenced by ActOnFinishDelayedCXXMethodDeclaration().
| bool Sema::CheckCXXThisCapture | ( | SourceLocation | Loc, |
| bool | Explicit = false, |
||
| bool | BuildAndDiagnose = true, |
||
| const unsigned *const | FunctionScopeIndexToStopAt = nullptr |
||
| ) |
Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.
| Loc | The location at which the capture of 'this' occurs. |
| Explicit | Whether 'this' is explicitly captured in a lambda capture list. |
| FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture 'this' that may or may not be used in certain specializations of a nested generic lambda (depending on whether the name resolves to a non-static member function or a static function). |
Definition at line 899 of file SemaExprCXX.cpp.
References clang::sema::CapturingScopeInfo::addThisCapture(), clang::sema::LambdaScopeInfo::CallOperator, captureThis(), Context, Diag(), FunctionScopes, getCurrentThisType(), clang::sema::CapturingScopeInfo::ImpCap_Block, clang::sema::CapturingScopeInfo::ImpCap_CapturedRegion, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::isGenericLambdaCallOperatorSpecialization(), and isUnevaluatedContext().
Referenced by ActOnCXXThis(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), FixOverloadedFunctionReference(), and clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().
| bool Sema::CheckCXXThrowOperand | ( | SourceLocation | ThrowLoc, |
| QualType | ThrowTy, | ||
| Expr * | E | ||
| ) |
CheckCXXThrowOperand - Validate the operand of a throw.
Definition at line 736 of file SemaExprCXX.cpp.
References clang::ASTContext::addCopyConstructorForExceptionObject(), clang::ASTContext::addDefaultArgExprForConstructor(), Context, E, clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getDefaultArgExprForConstructor(), clang::Expr::getExprLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ASTContext::getTargetInfo(), getUnambiguousPublicSubobjects(), clang::CXXRecordDecl::hasIrrelevantDestructor(), I, clang::TargetCXXABI::isMicrosoft(), clang::FunctionDecl::isTrivial(), and clang::Type::isVoidType().
| void Sema::CheckDelayedMemberExceptionSpecs | ( | ) |
Definition at line 5425 of file SemaDeclCXX.cpp.
References CheckExplicitlyDefaultedMemberExceptionSpec(), CheckOverridingFunctionExceptionSpec(), DelayedDefaultedMemberExceptionSpecs, and DelayedExceptionSpecChecks.
Referenced by ActOnEndOfTranslationUnit(), and ActOnFinishDelayedMemberInitializers().
| void Sema::CheckDelegatingCtorCycles | ( | ) |
Definition at line 13514 of file SemaDeclCXX.cpp.
References clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), Current, DelegatingCtorDecls, DelegatingCycleHelper(), E, clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), and I.
Referenced by ActOnEndOfTranslationUnit().
| bool Sema::CheckDependentFunctionTemplateSpecialization | ( | FunctionDecl * | FD, |
| const TemplateArgumentListInfo & | ExplicitTemplateArgs, | ||
| LookupResult & | Previous | ||
| ) |
Perform semantic analysis for the given dependent function template specialization.
The only possible way to get a dependent function template specialization is with a friend declaration, like so:
There really isn't any useful analysis we can do here, so we just store the information.
Definition at line 6784 of file SemaTemplate.cpp.
References clang::LookupResult::asUnresolvedSet(), Context, clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::Filter::erase(), clang::Decl::getDeclContext(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), and clang::FunctionDecl::setDependentTemplateSpecialization().
| bool Sema::CheckDerivedToBaseConversion | ( | QualType | Derived, |
| QualType | Base, | ||
| SourceLocation | Loc, | ||
| SourceRange | Range, | ||
| CXXCastPath * | BasePath = nullptr, |
||
| bool | IgnoreAccess = false |
||
| ) |
Definition at line 1814 of file SemaDeclCXX.cpp.
Referenced by CheckOverridingFunctionReturnType(), CheckPointerToMemberOperands(), MarkBaseAndMemberDestructorsReferenced(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().
| bool Sema::CheckDerivedToBaseConversion | ( | QualType | Derived, |
| QualType | Base, | ||
| unsigned | InaccessibleBaseID, | ||
| unsigned | AmbigiousBaseConvID, | ||
| SourceLocation | Loc, | ||
| SourceRange | Range, | ||
| DeclarationName | Name, | ||
| CXXCastPath * | BasePath, | ||
| bool | IgnoreAccess = false |
||
| ) |
CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible).
Returns true and emits a diagnostic if the code is ill-formed, returns false otherwise. Loc is the location where this routine should point to if there is an error, and Range is the source range to highlight if there is an error.
If either InaccessibleBaseID or AmbigiousBaseConvID are 0, then the diagnostic for the respective type of error will be suppressed, but the check for ill-formed code will still be performed.
Definition at line 1750 of file SemaDeclCXX.cpp.
References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, BuildBasePathArray(), CheckBaseClassAccess(), clang::CXXBasePaths::clear(), Context, Diag(), clang::CXXBasePaths::front(), getAmbiguousPathsDisplayString(), clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getUnqualifiedType(), clang::CXXBasePaths::isAmbiguous(), IsDerivedFrom(), clang::Name, and clang::CXXBasePaths::setRecordingPaths().
| bool Sema::CheckDestructor | ( | CXXDestructorDecl * | Destructor | ) |
CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required.
Returns true on error.
Definition at line 6759 of file SemaDeclCXX.cpp.
References Context, clang::ASTContext::DeclarationNames, FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Decl::getLocation(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::Decl::isImplicit(), clang::CXXMethodDecl::isVirtual(), MarkFunctionReferenced(), and clang::CXXDestructorDecl::setOperatorDelete().
Referenced by DefineImplicitDestructor(), and MarkVTableUsed().
| Sema::AccessResult Sema::CheckDestructorAccess | ( | SourceLocation | Loc, |
| CXXDestructorDecl * | Dtor, | ||
| const PartialDiagnostic & | PDiag, | ||
| QualType | objectType = QualType() |
||
| ) |
Definition at line 1592 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::Decl::getAccess(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTypeDeclType(), clang::QualType::isNull(), and clang::DeclAccessPair::make().
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), BuildCXXNew(), FinalizeVarWithDestructor(), MarkBaseAndMemberDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), and SetIvarInitializers().
| QualType Sema::CheckDestructorDeclarator | ( | Declarator & | D, |
| QualType | R, | ||
| StorageClass & | SC | ||
| ) |
CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator D with type R.
If there are any errors in the declarator, this routine will emit diagnostics and set the declarator to invalid. Even if this happens, will be updated to reflect a well-formed type for the destructor and returned.
Definition at line 6795 of file SemaDeclCXX.cpp.
References clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), diagnoseIgnoredQualifiers(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::FTIHasNonVoidParameters(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpecLoc(), GetTypeFromParser(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::DeclSpec::hasTypeSpecifier(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, clang::None, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::Qualifiers::Restrict, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), clang::TemplateSpecializationType(), clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, clang::FunctionProtoType::ExtProtoInfo::Variadic, clang::ASTContext::VoidTy, and clang::Qualifiers::Volatile.
Referenced by CreateNewFunctionDecl().
CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification.
This means that it is invalid to add another level of indirection.
Definition at line 125 of file SemaExceptionSpec.cpp.
References clang::Type::getAs(), clang::Type::getPointeeType(), and clang::FunctionProtoType::hasExceptionSpec().
Referenced by BuildMemberPointerType(), and GetFullTypeForDeclarator().
| EnableIfAttr * Sema::CheckEnableIf | ( | FunctionDecl * | Function, |
| ArrayRef< Expr * > | Args, | ||
| bool | MissingImplicitThis = false |
||
| ) |
Check the enable_if expressions on the given function.
Returns the first failing attribute, or NULL if they were all successful.
Definition at line 5946 of file SemaOverload.cpp.
References Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ParmVarDecl::getDefaultArg(), clang::APValue::getInt(), clang::FunctionDecl::getNumParams(), getOrderedEnableIfAttrs(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::InitializedEntity::InitializeParameter(), clang::APValue::isInt(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isValueDependent(), clang::FunctionDecl::isVariadic(), P, PerformCopyInitialization(), PerformObjectArgumentInitialization(), and clang::Result.
Referenced by AddConversionCandidate(), AddOverloadCandidate(), AddSurrogateCandidate(), and BuildCallToMemberFunction().
| EnumConstantDecl * Sema::CheckEnumConstant | ( | EnumDecl * | Enum, |
| EnumConstantDecl * | LastEnumConst, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo * | Id, | ||
| Expr * | val | ||
| ) |
Definition at line 13896 of file SemaDecl.cpp.
References CheckConvertedConstantExpression(), clang::CK_IntegralCast, Context, clang::frontend::CPlusPlus, clang::ASTContext::DependentTy, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::EnumDecl::getIntegerType(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::if(), clang::ASTContext::IntTy, clang::TagDecl::isDependentType(), clang::EnumDecl::isFixed(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isRepresentableIntegerValue(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by ActOnEnumConstant(), and clang::TemplateDeclInstantiator::InstantiateEnumDefinition().
| bool Sema::CheckEnumRedeclaration | ( | SourceLocation | EnumLoc, |
| bool | IsScoped, | ||
| QualType | EnumUnderlyingTy, | ||
| bool | EnumUnderlyingIsImplicit, | ||
| const EnumDecl * | Prev | ||
| ) |
Check whether this is a valid redeclaration of a previous enumeration.
Definition at line 11600 of file SemaDecl.cpp.
References Context, Diag(), clang::EnumDecl::getIntegerType(), clang::EnumDecl::getIntegerTypeRange(), clang::EnumDecl::getIntegerTypeSourceInfo(), clang::Decl::getLocation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), clang::EnumDecl::isFixed(), clang::QualType::isNull(), and clang::EnumDecl::isScoped().
| bool Sema::CheckEnumUnderlyingType | ( | TypeSourceInfo * | TI | ) |
Check that this is a valid underlying type for an enum declaration.
Definition at line 11583 of file SemaDecl.cpp.
References Diag(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isDependentType().
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | FunctionDecl * | Old, |
| FunctionDecl * | New | ||
| ) |
Definition at line 206 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), Context, clang::FixItHint::CreateInsertion(), Diag(), E, clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::FunctionProtoType::exceptions(), clang::TypeLoc::getAs(), clang::Type::getAs(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionProtoType::getNoexceptExpr(), clang::FunctionProtoType::getParamTypes(), getPrintingPolicy(), clang::FunctionType::getReturnType(), clang::ASTContext::getSourceManager(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::hasImplicitExceptionSpec(), clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isExternC(), clang::SourceManager::isInSystemHeader(), clang::SourceLocation::isInvalid(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::SourceLocation::isValid(), PDiag(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().
Referenced by CheckEquivalentExceptionSpec(), CheckExplicitlyDefaultedMemberExceptionSpec(), clang::CheckSpecForTypesEquivalent(), MergeCXXFunctionDecl(), and MergeVarDeclExceptionSpecs().
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | const FunctionProtoType * | Old, |
| SourceLocation | OldLoc, | ||
| const FunctionProtoType * | New, | ||
| SourceLocation | NewLoc | ||
| ) |
CheckEquivalentExceptionSpec - Check if the two types have equivalent exception specifications.
Exception specifications are equivalent if they allow exactly the same set of exception types. It does not matter how that is achieved. See C++ [except.spec]p2.
Definition at line 370 of file SemaExceptionSpec.cpp.
References CheckEquivalentExceptionSpec(), getLangOpts(), PDiag(), and clang::Result.
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | const PartialDiagnostic & | DiagID, |
| const PartialDiagnostic & | NoteID, | ||
| const FunctionProtoType * | Old, | ||
| SourceLocation | OldLoc, | ||
| const FunctionProtoType * | New, | ||
| SourceLocation | NewLoc, | ||
| bool * | MissingExceptionSpecification = nullptr, |
||
| bool * | MissingEmptyExceptionSpecification = nullptr, |
||
| bool | AllowNoexceptAllMatchWithNoSpec = false, |
||
| bool | IsOperatorNew = false |
||
| ) |
CheckEquivalentExceptionSpec - Check if the two types have compatible exception specifications.
See C++ [except.spec]p3.
false if the exception specifications match, true if there is a problem. If true is returned, either a diagnostic has already been produced or *MissingExceptionSpecification is set to true. Definition at line 391 of file SemaExceptionSpec.cpp.
References Context, Diag(), clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_None, clang::FunctionProtoType::exception_begin(), clang::FunctionProtoType::exceptions(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getCanonicalType(), clang::PartialDiagnostic::getDiagID(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::IdentifierInfo::getName(), clang::FunctionProtoType::getNoexceptSpec(), clang::FunctionProtoType::getNumExceptions(), clang::CanQual< T >::getUnqualifiedType(), clang::FunctionProtoType::hasExceptionSpec(), I, clang::isUnresolvedExceptionSpec(), clang::SourceLocation::isValid(), clang::Name, clang::FunctionProtoType::NR_BadNoexcept, clang::FunctionProtoType::NR_NoNoexcept, clang::FunctionProtoType::NR_Nothrow, clang::FunctionProtoType::NR_Throw, and ResolveExceptionSpec().
Definition at line 797 of file SemaExceptionSpec.cpp.
References CheckExceptionSpecSubset(), clang::Expr::getType(), clang::GetUnderlyingFunction(), clang::FunctionProtoType::hasDependentExceptionSpec(), and PDiag().
Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().
| void Sema::checkExceptionSpecification | ( | bool | IsTopLevel, |
| ExceptionSpecificationType | EST, | ||
| ArrayRef< ParsedType > | DynamicExceptions, | ||
| ArrayRef< SourceRange > | DynamicExceptionRanges, | ||
| Expr * | NoexceptExpr, | ||
| SmallVectorImpl< QualType > & | Exceptions, | ||
| FunctionProtoType::ExceptionSpecInfo & | ESI | ||
| ) |
Check the given exception-specification and update the exception specification information with the results.
Definition at line 13662 of file SemaDeclCXX.cpp.
References clang::ASTContext::BoolTy, CheckSpecifiedExceptionType(), collectUnexpandedParameterPacks(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getCanonicalTypeUnqualified(), clang::Expr::getType(), GetTypeFromParser(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr, clang::FunctionProtoType::ExceptionSpecInfo::Type, UPPC_ExceptionType, and VerifyIntegerConstantExpression().
Referenced by actOnDelayedExceptionSpecification(), and GetFullTypeForDeclarator().
| bool clang::Sema::CheckExceptionSpecSubset | ( | const PartialDiagnostic & | DiagID, |
| const PartialDiagnostic & | NoteID, | ||
| const FunctionProtoType * | Superset, | ||
| SourceLocation | SuperLoc, | ||
| const FunctionProtoType * | Subset, | ||
| SourceLocation | SubLoc | ||
| ) |
CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type.
This is used by override and pointer assignment checks.
Definition at line 583 of file SemaExceptionSpec.cpp.
References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, CheckBaseClassAccess(), CheckParamExceptionSpec(), clang::CXXBasePaths::clear(), Context, Diag(), clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_None, clang::FunctionProtoType::exceptions(), clang::CXXBasePaths::front(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::PartialDiagnostic::getDiagID(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::QualType::getLocalUnqualifiedType(), clang::FunctionProtoType::getNoexceptSpec(), clang::Type::getPointeeType(), clang::CXXBasePaths::isAmbiguous(), IsDerivedFrom(), clang::Type::isRecordType(), clang::isUnresolvedExceptionSpec(), clang::SourceLocation::isValid(), clang::FunctionProtoType::NR_BadNoexcept, clang::FunctionProtoType::NR_Dependent, clang::FunctionProtoType::NR_Nothrow, clang::FunctionProtoType::NR_Throw, and ResolveExceptionSpec().
Referenced by CheckExceptionSpecCompatibility(), and CheckOverridingFunctionExceptionSpec().
| void Sema::CheckExplicitlyDefaultedMemberExceptionSpec | ( | CXXMethodDecl * | MD, |
| const FunctionProtoType * | SpecifiedType | ||
| ) |
Check whether the exception specification provided for an explicitly-defaulted special member matches the exception specification that would have been generated for an implicit special member, per C++11 [dcl.fct.def.default]p2.
Definition at line 5400 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckEquivalentExceptionSpec(), computeImplicitExceptionSpec(), Context, clang::EST_Unparsed, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::ASTContext::getDefaultCallingConvention(), clang::FunctionProtoType::getExceptionSpecType(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), getSpecialMember(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::None, PDiag(), and clang::ASTContext::VoidTy.
Referenced by CheckDelayedMemberExceptionSpecs(), and CheckExplicitlyDefaultedSpecialMember().
| void Sema::CheckExplicitlyDefaultedSpecialMember | ( | CXXMethodDecl * | MD | ) |
Definition at line 5228 of file SemaDeclCXX.cpp.
References CheckExplicitlyDefaultedMemberExceptionSpec(), Context, clang::frontend::CPlusPlus14, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, defaultedSpecialMemberIsConstexpr(), DelayedDefaultedMemberExceptionSpecs, Diag(), clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::Type::getAs(), clang::CXXMethodDecl::getCanonicalDecl(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getSourceRange(), getSpecialMember(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::FunctionProtoType::getTypeQuals(), clang::FunctionProtoType::hasExceptionSpec(), clang::ASTContext::hasSameType(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), InstantiateExceptionSpec(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::Type::isReferenceType(), clang::FunctionDecl::isVariadic(), clang::QualType::isVolatileQualified(), clang::FunctionDecl::setConstexpr(), SetDeclDeleted(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionDecl::TK_NonTemplate, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::ASTContext::VoidTy.
Referenced by CheckCompletedCXXClass(), and SetDeclDefaulted().
| void Sema::CheckExtraCXXDefaultArguments | ( | Declarator & | D | ) |
CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator, which is not a function declaration or definition and therefore is not permitted to have default arguments.
This routine should be invoked for every declarator that is not a function declaration or definition.
Definition at line 374 of file SemaDeclCXX.cpp.
References clang::DeclaratorChunk::ParamInfo::DefaultArgTokens, Diag(), clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::ParmVarDecl::getDefaultArg(), clang::Decl::getLocation(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::Declarator::isFunctionDeclarationContext(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, clang::ParmVarDecl::setDefaultArg(), and UnparsedDefaultArgLocs.
Referenced by ActOnCXXNamedCast(), ActOnObjCExceptionDecl(), ActOnTypeName(), and HandleMSProperty().
| ExprResult Sema::CheckExtVectorCast | ( | SourceRange | R, |
| QualType | DestTy, | ||
| Expr * | CastExpr, | ||
| CastKind & | Kind | ||
| ) |
Definition at line 5777 of file SemaExpr.cpp.
References clang::CK_BitCast, clang::CK_VectorSplat, Diag(), clang::ExprError(), clang::SourceRange::getBegin(), clang::QualType::getCanonicalType(), clang::Expr::getType(), and clang::Type::isExtVectorType().
| FieldDecl * Sema::CheckFieldDecl | ( | DeclarationName | Name, |
| QualType | T, | ||
| TypeSourceInfo * | TInfo, | ||
| RecordDecl * | Record, | ||
| SourceLocation | Loc, | ||
| bool | Mutable, | ||
| Expr * | BitWidth, | ||
| InClassInitStyle | InitStyle, | ||
| SourceLocation | TSSL, | ||
| AccessSpecifier | AS, | ||
| NamedDecl * | PrevDecl, | ||
| Declarator * | D = nullptr |
||
| ) |
Build a new FieldDecl and check its well-formedness.
This routine builds a new FieldDecl given the fields name, type, record, etc. PrevDecl should refer to any previous declaration with the same name and in the same scope as the field to be created.
Definition at line 13043 of file SemaDecl.cpp.
References checkDuplicateDefaultInit(), Context, clang::frontend::CPlusPlus, clang::FieldDecl::Create(), Diag(), clang::Type::getAs(), clang::DeclarationName::getAsIdentifierInfo(), clang::ASTContext::getBaseElementType(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::Decl::hasAttrs(), clang::ICIS_NoInit, clang::ASTContext::IntTy, clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::RecordDecl::isMsStruct(), clang::QualType::isNull(), clang::QualType::isObjCGCWeak(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::SourceLocation::isValid(), clang::Type::isVariablyModifiedType(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
type checking declaration initializers (C99 6.7.8)
Definition at line 8752 of file SemaDecl.cpp.
References Context, Diag(), clang::Expr::getExprLoc(), and clang::Expr::isConstantInitializer().
| void Sema::CheckForFunctionRedefinition | ( | FunctionDecl * | FD, |
| const FunctionDecl * | EffectiveDefinition = nullptr, |
||
| SkipBodyInfo * | SkipBody = nullptr |
||
| ) |
Definition at line 10749 of file SemaDecl.cpp.
References canRedefineFunction(), Diag(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getLocation(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::FunctionDecl::getStorageClass(), clang::InternalLinkage, clang::FunctionDecl::isDefined(), clang::FunctionDecl::isInlined(), clang::FunctionDecl::isInlineSpecified(), clang::SC_Extern, clang::Decl::setInvalidDecl(), and clang::Sema::SkipBodyInfo::ShouldSkip.
Referenced by checkNewAttributesAfterDef().
| void Sema::CheckFormatString | ( | const StringLiteral * | FExpr, |
| const Expr * | OrigFormatExpr, | ||
| ArrayRef< const Expr * > | Args, | ||
| bool | HasVAListArg, | ||
| unsigned | format_idx, | ||
| unsigned | firstDataArg, | ||
| FormatStringType | Type, | ||
| bool | inFunctionCall, | ||
| VariadicCallType | CallType, | ||
| llvm::SmallBitVector & | CheckedVarArgs | ||
| ) |
Definition at line 4668 of file SemaChecking.cpp.
References clang::ASTContext::getAsConstantArrayType(), clang::StringLiteral::getLocStart(), clang::ConstantArrayType::getSize(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::StringLiteral::isAscii(), clang::StringLiteral::isUTF8(), clang::analyze_format_string::ParsePrintfString(), and clang::analyze_format_string::ParseScanfString().
Referenced by checkFormatStringExpr().
| bool Sema::CheckForwardProtocolDeclarationForCircularDependency | ( | IdentifierInfo * | PName, |
| SourceLocation & | PLoc, | ||
| SourceLocation | PrevLoc, | ||
| const ObjCList< ObjCProtocolDecl > & | PList | ||
| ) |
Definition at line 1096 of file SemaDeclObjC.cpp.
References clang::ObjCList< T >::begin(), Diag(), E, clang::ObjCList< T >::end(), I, and LookupProtocol().
Referenced by ActOnStartProtocolInterface().
| Sema::AccessResult Sema::CheckFriendAccess | ( | NamedDecl * | D | ) |
Checks access to the target of a friend declaration.
Definition at line 1746 of file SemaAccess.cpp.
References AR_accessible, AR_accessible, AR_dependent, AR_dependent, AR_inaccessible, AR_inaccessible, clang::AS_public, CheckEffectiveAccess(), Context, clang::Decl::getAccess(), clang::Decl::getAsFunction(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getNameInfo(), clang::DeclaratorDecl::getQualifier(), clang::DeclaratorDecl::getQualifierLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::DeclarationNameInfo::getSourceRange(), and clang::DeclAccessPair::make().
Referenced by ActOnFriendFunctionDecl(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| FriendDecl * Sema::CheckFriendTypeDecl | ( | SourceLocation | LocStart, |
| SourceLocation | FriendLoc, | ||
| TypeSourceInfo * | TSInfo | ||
| ) |
Perform semantic analysis of the given friend type declaration.
Definition at line 12213 of file SemaDeclCXX.cpp.
References ActiveTemplateInstantiations, clang::frontend::CPlusPlus11, clang::FriendDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::TagDecl::getKindName(), getLangOpts(), clang::TypeLoc::getLocalSourceRange(), getLocForEndOfToken(), clang::TypeLoc::getLocStart(), clang::TagDecl::getTagKind(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isElaboratedTypeSpecifier().
Referenced by ActOnFriendTypeDecl().
| bool Sema::CheckFunctionDeclaration | ( | Scope * | S, |
| FunctionDecl * | NewFD, | ||
| LookupResult & | Previous, | ||
| bool | IsExplicitSpecialization | ||
| ) |
Perform semantic checking of a new function declaration.
Performs semantic analysis of the new function declaration NewFD. This routine performs all semantic checking that does not require the actual declarator involved in the declaration, and is used both for the declaration of functions as they are parsed (called via ActOnDeclarator) and for the declaration of functions that have been instantiated via C++ template instantiation (called via InstantiateDecl).
| IsExplicitSpecialization | whether this new function declaration is an explicit specialization of the previous declaration. |
This sets NewFD->isInvalidDecl() to true if there was an error.
Definition at line 8323 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::LookupResult::addDecl(), AllowOverloadingOfFunction(), clang::ASTContext::BuiltinInfo, clang::Type::castAs(), checkForConflictWithNonVisibleExternC(), clang::LookupResult::clear(), clang::Qualifiers::Const, Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::ASTContext::DeclarationNames, Diag(), clang::LookupResult::empty(), clang::serialized_diags::Error, clang::Builtin::Context::forgetBuiltin(), clang::Decl::getAccess(), clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::FunctionDecl::getBuiltinID(), clang::ASTContext::GetBuiltinType(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXDestructorName(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionProtoType::getExtProtoInfo(), clang::LookupResult::getFoundDecl(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), clang::FunctionDecl::getLiteralIdentifier(), clang::Decl::getLocation(), clang::FunctionProtoType::getParamTypes(), clang::DeclContext::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getStorageClass(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::ASTContext::Idents, clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isConstexpr(), clang::Type::isDependentType(), clang::FunctionDecl::isExternC(), clang::Type::isIncompleteType(), clang::Type::isObjCObjectPointerType(), clang::FunctionDecl::isOverloadedOperator(), clang::QualType::isPODType(), clang::LookupResult::isShadowed(), clang::CXXMethodDecl::isStatic(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LookupPredefedObjCSuperType(), clang::Name, ReportOverrides(), clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::FunctionDecl::setPreviousDeclaration(), clang::ValueDecl::setType(), and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.
Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool Sema::CheckFunctionReturnType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) |
Definition at line 2226 of file SemaType.cpp.
References clang::FixItHint::CreateInsertion(), Diag(), getLangOpts(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isHalfType(), and clang::Type::isObjCObjectType().
Referenced by ActOnMethodDeclaration(), and BuildFunctionType().
| bool Sema::CheckFunctionTemplateSpecialization | ( | FunctionDecl * | FD, |
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| LookupResult & | Previous | ||
| ) |
Perform semantic analysis for the given function template specialization.
This routine performs all of the semantic analysis required for an explicit function template specialization. On successful completion, the function declaration FD will become a function template specialization.
| FD | the function declaration, which will be updated to become a function template specialization. |
| ExplicitTemplateArgs | the explicitly-provided template arguments, if any. Note that this may be valid info even when 0 arguments are explicitly provided as in, e.g., void sort<>(char*, char*); as it anyway contains info on the angle brackets locations. |
| Previous | the set of declarations that may be specialized by this function specialization. |
Definition at line 6826 of file SemaTemplate.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::LookupResult::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), clang::Type::castAs(), CheckTemplateSpecializationScope(), clang::LookupResult::clear(), clang::Qualifiers::Const, Context, DeduceTemplateArguments(), E, clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::Decl::FOK_None, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), clang::FunctionProtoType::getParamTypes(), clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation(), clang::FunctionDecl::getPrimaryTemplate(), clang::DeclContext::getRedeclContext(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), I, clang::DeclContext::InEnclosingNamespaceSetOf(), clang::CXXMethodDecl::isConst(), clang::FunctionDecl::isConstexpr(), clang::MakeDeductionFailureInfo(), clang::Result, clang::FunctionDecl::setConstexpr(), clang::Decl::setLocation(), clang::FunctionTemplateSpecializationInfo::setTemplateSpecializationKind(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.
Referenced by clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool Sema::CheckIfOverriddenFunctionIsMarkedFinal | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old | ||
| ) |
CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.
CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.
Definition at line 1969 of file SemaDeclCXX.cpp.
References Diag(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), and clang::Decl::getLocation().
| void Sema::CheckImplementationIvars | ( | ObjCImplementationDecl * | ImpDecl, |
| ObjCIvarDecl ** | Fields, | ||
| unsigned | nIvars, | ||
| SourceLocation | Loc | ||
| ) |
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface.
Check case of non-existing @interface decl. (legacy objective-c @implementation decl without an @interface decl). Add implementations's ivar to the synthesize class's ivar list.
Definition at line 1993 of file SemaDeclObjC.cpp.
References clang::DeclContext::addDecl(), Context, Diag(), clang::FieldDecl::getBitWidth(), clang::FieldDecl::getBitWidthValue(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getLocation(), clang::ObjCImplementationDecl::getSuperClass(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::FieldDecl::isBitField(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::ObjCRuntime::isNonFragile(), clang::ObjCInterfaceDecl::ivar_begin(), clang::ObjCInterfaceDecl::ivar_end(), LangOpts, clang::DeclContext::makeDeclVisibleInContext(), clang::LangOptions::ObjCRuntime, clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::Decl::setLexicalDeclContext(), and clang::ObjCInterfaceDecl::visible_extensions().
Additional checks for a using declaration referring to a constructor name.
Definition at line 8255 of file SemaDeclCXX.cpp.
References CurContext, Diag(), findDirectBaseWithType(), clang::NestedNameSpecifier::getAsType(), clang::UsingDecl::getNameInfo(), clang::UsingDecl::getQualifier(), clang::DeclarationNameInfo::getSourceRange(), clang::UsingDecl::getUsingLoc(), clang::UsingDecl::hasTypename(), clang::CXXBaseSpecifier::setInheritConstructors(), and clang::Decl::setInvalidDecl().
Referenced by BuildUsingDeclaration().
| bool Sema::checkInitMethod | ( | ObjCMethodDecl * | method, |
| QualType | receiverTypeIfCall | ||
| ) |
Check whether the given method, which must be in the 'init' family, is a valid member of that family.
| receiverTypeIfCall | - if null, check this as if declaring it; if non-null, check this as if making a call to it with the given receiver type |
Definition at line 43 of file SemaDeclObjC.cpp.
References clang::Decl::addAttr(), clang::Type::castAs(), Context, Diag(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), getObjectType(), clang::ObjCMethodDecl::getReturnType(), getSourceManager(), clang::ObjCInterfaceDecl::hasDefinition(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::ObjCInterfaceDecl::isSuperClassOf(), and clang::Decl::setInvalidDecl().
Referenced by BuildInstanceMessage(), and CheckARCMethodDecl().
| Sema::ObjCLiteralKind Sema::CheckLiteralKind | ( | Expr * | FromE | ) |
Definition at line 8638 of file SemaExpr.cpp.
References clang::CK_IntegralCast, clang::CK_IntegralToBoolean, clang::Expr::IgnoreParenImpCasts(), and clang::Expr::IgnoreParens().
Referenced by checkUnsafeAssignLiteral(), and diagnoseObjCLiteralComparison().
| bool Sema::CheckLiteralOperatorDeclaration | ( | FunctionDecl * | FnDecl | ) |
CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed.
If so, returns false; otherwise, emits appropriate diagnostics and returns true.
Definition at line 11771 of file SemaDeclCXX.cpp.
References ActiveTemplateInstantiations, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Diag(), clang::Type::getAs(), clang::DeclarationName::getCXXLiteralIdentifier(), clang::NamedDecl::getDeclName(), clang::TemplateTypeParmDecl::getDepth(), clang::TemplateTypeParmType::getDepth(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::TemplateTypeParmDecl::getIndex(), clang::TemplateTypeParmType::getIndex(), getLangOpts(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::TemplateParameterList::getParam(), clang::PointerType::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::ASTContext::getSizeType(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::QualType::isConstQualified(), clang::FunctionDecl::isExternC(), clang::Decl::isTemplateParameterPack(), clang::NumericLiteralParser::isValidUDSuffix(), clang::QualType::isVolatileQualified(), clang::ASTContext::LongDoubleTy, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::FunctionDecl::param_size(), clang::FunctionDecl::params(), clang::TemplateParameterList::size(), clang::ASTContext::UnsignedLongLongTy, and clang::ASTContext::WideCharTy.
| bool Sema::checkLiteralOperatorId | ( | const CXXScopeSpec & | SS, |
| const UnqualifiedId & | Id | ||
| ) |
Definition at line 342 of file SemaExprCXX.cpp.
References Diag(), clang::NestedNameSpecifier::getKind(), clang::UnqualifiedId::getKind(), clang::UnqualifiedId::getLocStart(), clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::UnqualifiedId::IK_LiteralOperatorId, clang::CXXScopeSpec::isValid(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
|
inline |
Definition at line 9294 of file SemaExpr.cpp.
References clang::BO_LAnd, clang::ASTContext::BoolTy, Context, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::Expr::EvaluateAsInt(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ASTContext::getLangOpts(), clang::Expr::getType(), clang::ASTContext::IntTy, clang::Type::isBooleanType(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceLocation::isMacroID(), clang::Type::isScalarType(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), and clang::Result.
| void Sema::CheckLookupAccess | ( | const LookupResult & | R | ) |
Checks access to all the declarations in the given result set.
Definition at line 1836 of file SemaAccess.cpp.
References clang::AS_public, clang::LookupResult::begin(), CheckAccess(), Context, E, clang::LookupResult::end(), clang::LookupResult::getBaseObjectType(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), I, and clang::sema::AccessedEntity::Member.
| bool Sema::CheckLoopHintExpr | ( | Expr * | E, |
| SourceLocation | Loc | ||
| ) |
Definition at line 3152 of file SemaExpr.cpp.
References Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::Type::isCharType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Expr::isValueDependent().
Referenced by handleLoopHintAttr().
| void Sema::CheckMain | ( | FunctionDecl * | FD, |
| const DeclSpec & | D | ||
| ) |
Definition at line 8585 of file SemaDecl.cpp.
References clang::Type::castAs(), clang::ASTContext::CharTy, Context, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::Qualifiers::empty(), clang::Type::getAs(), clang::DeclSpec::getConstexprSpecLoc(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::DeclSpec::getInlineSpecLoc(), clang::Decl::getLocation(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::IntTy, clang::FunctionDecl::isConstexpr(), clang::Type::isFunctionType(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isNoreturnSpecified(), clang::SourceRange::isValid(), clang::FunctionProtoType::isVariadic(), clang::Qualifiers::removeConst(), clang::SC_Static, clang::FunctionDecl::setConstexpr(), clang::FunctionDecl::setHasImplicitReturnZero(), clang::Decl::setInvalidDecl(), and clang::QualifierCollector::strip().
| Sema::AccessResult Sema::CheckMemberAccess | ( | SourceLocation | UseLoc, |
| CXXRecordDecl * | NamingClass, | ||
| DeclAccessPair | Found | ||
| ) |
Checks access to a member.
Definition at line 1709 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, and clang::DeclAccessPair::getAccess().
| Sema::AccessResult Sema::CheckMemberOperatorAccess | ( | SourceLocation | OpLoc, |
| Expr * | ObjectExpr, | ||
| Expr * | ArgExpr, | ||
| DeclAccessPair | Found | ||
| ) |
Checks access to an overloaded member operator, including conversion operators.
Definition at line 1725 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::Type::castAs(), CheckAccess(), Context, clang::DeclAccessPair::getAccess(), clang::RecordType::getDecl(), and clang::Expr::getType().
Referenced by BuildCallToObjectOfClassType(), BuildCXXCastArgument(), BuildOverloadedArrowExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().
| bool Sema::CheckMemberPointerConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| CastKind & | Kind, | ||
| CXXCastPath & | BasePath, | ||
| bool | IgnoreBaseAccess | ||
| ) |
CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the type ToType.
This routine checks for ambiguous or virtual or inaccessible base-to-derived member pointer conversions for which IsMemberPointerConversion has already returned true. It returns true and produces a diagnostic if there was an error, or returns false otherwise.
Definition at line 2815 of file SemaOverload.cpp.
References clang::CK_BaseToDerivedMemberPointer, clang::CK_NullToMemberPointer, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::MemberPointerType::getClass(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by PerformImplicitConversion().
| bool Sema::CheckMemberSpecialization | ( | NamedDecl * | Member, |
| LookupResult & | Previous | ||
| ) |
Perform semantic analysis for the given non-template member specialization.
This routine performs all of the semantic analysis required for an explicit member function specialization. On successful completion, the function declaration FD will become a member function specialization.
| Member | the member declaration, which will be updated to become a specialization. |
| Previous | the set of declarations, one of which may be specialized by this function specialization; the set will be modified to contain the redeclared member. |
Definition at line 7000 of file SemaTemplate.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::begin(), CheckTemplateSpecializationScope(), clang::LookupResult::clear(), Context, Diag(), E, clang::LookupResult::empty(), clang::LookupResult::end(), clang::Decl::FOK_None, clang::LookupResult::getFoundDecl(), clang::Decl::getFriendObjectKind(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLocation(), clang::VarDecl::getMemberSpecializationInfo(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::EnumDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::EnumDecl::getTemplateSpecializationKind(), clang::NamedDecl::getUnderlyingDecl(), clang::ASTContext::hasSameType(), I, clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::Decl::setLocation(), clang::VarDecl::setTemplateSpecializationKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::EnumDecl::setTemplateSpecializationKind(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
| bool Sema::CheckMessageArgumentTypes | ( | QualType | ReceiverType, |
| MultiExprArg | Args, | ||
| Selector | Sel, | ||
| ArrayRef< SourceLocation > | SelectorLocs, | ||
| ObjCMethodDecl * | Method, | ||
| bool | isClassMessage, | ||
| bool | isSuperMessage, | ||
| SourceLocation | lbrac, | ||
| SourceLocation | rbrac, | ||
| SourceRange | RecRange, | ||
| QualType & | ReturnType, | ||
| ExprValueKind & | VK | ||
| ) |
CheckMessageArgumentTypes - Check types in an Obj-C message send.
| Method | - May be null. | |
| [out] | ReturnType | - The return type of the send. |
Definition at line 1495 of file SemaExprObjC.cpp.
References checkUnknownAnyArg(), Context, clang::FixItHint::CreateReplacement(), DefaultArgumentPromotion(), DefaultVariadicArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::Selector::getAsString(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), clang::ObjCObjectPointerType::getInterfaceDecl(), getLangOpts(), getMessageSendResultType(), clang::Selector::getNumArgs(), clang::ASTContext::getObjCIdType(), clang::Type::getObjCSubstitutions(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::InitializedEntity::InitializeParameter(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceRange::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectPointerType(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::isVariadic(), maybeExtendBlockObject(), clang::ObjCMethodDecl::param_size(), clang::Parameter, clang::ObjCMethodDecl::parameters(), PerformCopyInitialization(), RequireCompleteType(), SelectorsForTypoCorrection(), clang::ValueDecl::setType(), stripARCUnbridgedCast(), clang::QualType::substObjCTypeArgs(), clang::ASTContext::UnknownAnyTy, VariadicMethod, and clang::VK_RValue.
Referenced by BuildClassMessage(), and BuildInstanceMessage().
| Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| const DeclarationNameInfo & | TargetNameInfo | ||
| ) |
Definition at line 6796 of file SemaExprCXX.cpp.
References clang::LookupResult::Ambiguous, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::DeclarationNameInfo::getName(), clang::LookupResult::getResultKind(), IER_Dependent, IER_DoesNotExist, IER_Exists, clang::DeclarationName::isDependentName(), LookupAnyName, LookupParsedName(), NotForRedeclaration, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, and clang::LookupResult::suppressDiagnostics().
Referenced by CheckMicrosoftIfExistsSymbol().
| Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S, |
| SourceLocation | KeywordLoc, | ||
| bool | IsIfExists, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name | ||
| ) |
Definition at line 6831 of file SemaExprCXX.cpp.
References CheckMicrosoftIfExistsSymbol(), collectUnexpandedParameterPacks(), DiagnoseUnexpandedParameterPacks(), GetNameFromUnqualifiedId(), IER_Error, UPPC_IfExists, and UPPC_IfNotExists.
| bool Sema::checkMSInheritanceAttrOnDefinition | ( | CXXRecordDecl * | RD, |
| SourceRange | Range, | ||
| bool | BestCase, | ||
| MSInheritanceAttr::Spelling | SemanticSpelling | ||
| ) |
Definition at line 3263 of file SemaDeclAttr.cpp.
References clang::CXXRecordDecl::calculateInheritanceModel(), Diag(), clang::SourceRange::getBegin(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::NamedDecl::getNameAsString(), clang::CXXRecordDecl::hasDefinition(), and clang::TagDecl::isCompleteDefinition().
Referenced by mergeMSInheritanceAttr().
| void Sema::CheckMSVCRTEntryPoint | ( | FunctionDecl * | FD | ) |
Definition at line 8732 of file SemaDecl.cpp.
References clang::Type::castAs(), Diag(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::ValueDecl::getType(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::setHasImplicitReturnZero(), and clang::Decl::setInvalidDecl().
| QualType Sema::CheckMultiplyDivideOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign, | ||
| bool | IsDivide | ||
| ) |
Definition at line 7787 of file SemaExpr.cpp.
References checkArithmeticNull(), DiagnoseBadDivideOrRemainderValues(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::Type::isVectorType().
Definition at line 13219 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, clang::frontend::CPlusPlus, Diag(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasNonTrivialCopyAssignment(), clang::CXXRecordDecl::hasNonTrivialCopyConstructor(), clang::CXXRecordDecl::hasNonTrivialDestructor(), clang::RecordDecl::hasObjectMember(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), and clang::TagDecl::isUnion().
| QualType Sema::CheckNonTypeTemplateParameterType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) |
Check that the type of a non-type template parameter is well-formed.
Definition at line 619 of file SemaTemplate.cpp.
References Context, Diag(), clang::ASTContext::getDecayedType(), clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isMemberPointerType(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and clang::Type::isVariablyModifiedType().
| bool Sema::CheckNoReturnAttr | ( | const AttributeList & | attr | ) |
Definition at line 1666 of file SemaDeclAttr.cpp.
References checkAttributeNumArgs(), and clang::AttributeList::setInvalid().
Referenced by handleFunctionTypeAttr(), and handleNoReturnAttr().
| bool Sema::checkNullabilityTypeSpecifier | ( | QualType & | type, |
| NullabilityKind | nullability, | ||
| SourceLocation | nullabilityLoc, | ||
| bool | isContextSensitive | ||
| ) |
Check whether a nullability type specifier can be added to the given type.
| type | The type to which the nullability specifier will be added. On success, this type will be updated appropriately. |
| nullability | The nullability specifier to add. |
| nullabilityLoc | The location of the nullability specifier. |
| isContextSensitive | Whether this nullability specifier was written as a context-sensitive keyword (in an Objective-C method) or an Objective-C property attribute, rather than as an underscored type specifier. |
Definition at line 5554 of file SemaType.cpp.
References clang::Type::canHaveNullability(), Context, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::Type::getAs(), clang::ASTContext::getAttributedType(), clang::Decl::getLocation(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), getNullabilityCompletenessCheckFileID(), clang::getNullabilitySpelling(), clang::Type::getPointeeType(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::isAnyPointerType(), clang::FileID::isInvalid(), clang::Type::isMemberPointerType(), clang::Type::isObjCObjectPointerType(), clang::SourceLocation::isValid(), NullabilityMap, clang::FileNullability::PointerKind, clang::FileNullability::PointerLoc, clang::FileNullability::SawTypeNullability, clang::AttributedType::stripOuterNullability(), clang::ast_matchers::type, and clang::ast_matchers::typedefDecl.
| Sema::ARCConversionResult Sema::CheckObjCARCConversion | ( | SourceRange | castRange, |
| QualType | castType, | ||
| Expr *& | op, | ||
| CheckedConversionKind | CCK, | ||
| bool | Diagnose = true, |
||
| bool | DiagnoseCFAudited = false, |
||
| BinaryOperatorKind | Opc = BO_PtrMemD |
||
| ) |
Checks for invalid conversions and casts between retainable pointers and other pointer kinds.
Definition at line 3980 of file SemaExprObjC.cpp.
References ACR_okay, ACR_unbridged, ACTC_coreFoundation, ACTC_indirectRetainable, ACTC_none, ACTC_retainable, ACTC_voidPtr, clang::BO_EQ, clang::BO_NE, clang::ast_matchers::castExpr, CCK_CStyleCast, CCK_ImplicitConversion, CCK_OtherCast, clang::CK_ARCConsumeObject, classifyTypeForARCConversion(), Context, ConversionToObjCStringLiteralCheck(), clang::ImplicitCastExpr::Create(), Diag(), diagnoseObjCARCConversion(), ExprNeedsCleanups, clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::QualType::getTypePtr(), isAnyCLike(), isAnyRetainable(), clang::Type::isIntegralType(), clang::SourceRange::isValid(), clang::Qualifiers::OCL_None, and clang::VK_RValue.
Referenced by CheckKeyForObjCARCConversion(), and PerformImplicitConversion().
Definition at line 4161 of file SemaExprObjC.cpp.
References Context, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::QualType::getObjCLifetime(), clang::CanQual< T >::getUnqualifiedType(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::OCL_Weak.
Referenced by PerformImplicitConversion().
Definition at line 3773 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, CheckObjCBridgeRelatedConversions(), classifyTypeForARCConversion(), and clang::Expr::getType().
| bool Sema::checkObjCBridgeRelatedComponents | ( | SourceLocation | Loc, |
| QualType | DestType, | ||
| QualType | SrcType, | ||
| ObjCInterfaceDecl *& | RelatedClass, | ||
| ObjCMethodDecl *& | ClassMethod, | ||
| ObjCMethodDecl *& | InstanceMethod, | ||
| TypedefNameDecl *& | TDNDecl, | ||
| bool | CfToNs, | ||
| bool | Diagnose = true |
||
| ) |
Definition at line 3813 of file SemaExprObjC.cpp.
References Context, Diag(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocStart(), clang::TypeDecl::getLocStart(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getUnarySelector(), clang::ObjCInterfaceDecl::lookupMethod(), LookupName(), LookupOrdinaryName, ObjCBridgeRelatedAttrFromType(), clang::ASTContext::Selectors, and TUScope.
Referenced by CheckObjCBridgeRelatedConversions().
| bool Sema::CheckObjCBridgeRelatedConversions | ( | SourceLocation | Loc, |
| QualType | DestType, | ||
| QualType | SrcType, | ||
| Expr *& | SrcExpr, | ||
| bool | Diagnose = true |
||
| ) |
Definition at line 3887 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, BuildClassMessageImplicit(), BuildInstanceMessageImplicit(), checkObjCBridgeRelatedComponents(), classifyTypeForARCConversion(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ObjCMethodDecl::findPropertyDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Selector::getAsString(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::Decl::getLocStart(), clang::TypeDecl::getLocStart(), clang::NamedDecl::getNameAsString(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::None.
Referenced by CheckObjCBridgeRelatedCast(), and clang::InitializationSequence::InitializeFrom().
Checks that the Objective-C declaration is declared in the global scope.
Emits an error and marks the declaration as invalid if it's not declared in the global scope.
Definition at line 4353 of file SemaDeclObjC.cpp.
References CurContext, Diag(), getCurLexicalContext(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), and clang::Decl::setInvalidDecl().
Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().
| ExprResult Sema::CheckObjCForCollectionOperand | ( | SourceLocation | forLoc, |
| Expr * | collection | ||
| ) |
Definition at line 1675 of file SemaStmt.cpp.
References Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::SelectorTable::getSelector(), clang::Expr::getType(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::ObjCObjectType::qual_empty(), and clang::ASTContext::Selectors.
| bool Sema::checkObjCKindOfType | ( | QualType & | type, |
| SourceLocation | loc | ||
| ) |
Check the application of the Objective-C '__kindof' qualifier to the given type.
Definition at line 5659 of file SemaType.cpp.
References clang::AttributedType::attr_objc_kindof, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getAttributedType(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::ObjCObjectPointerType::getObjectType(), and clang::ast_matchers::type.
| void Sema::CheckObjCMethodOverride | ( | ObjCMethodDecl * | NewMethod, |
| const ObjCMethodDecl * | Overridden | ||
| ) |
Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
Definition at line 113 of file SemaDeclObjC.cpp.
References Context, Diag(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
| void Sema::CheckObjCMethodOverrides | ( | ObjCMethodDecl * | ObjCMethod, |
| ObjCInterfaceDecl * | CurrentClass, | ||
| ResultTypeCompatibilityKind | RTC | ||
| ) |
Definition at line 3947 of file SemaDeclObjC.cpp.
References CheckConflictingOverridingMethod(), Context, Diag(), E, clang::ObjCMethodList::getBits(), clang::ASTContext::getCanonicalType(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isOverriding(), mergeObjCMethodDecls(), MethodPool, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), RTC_Incompatible, clang::ObjCMethodDecl::setOverriding(), clang::ObjCMethodDecl::SetRelatedResultType(), and clang::ASTContext::typesAreCompatible().
Referenced by ActOnMethodDeclaration(), and ProcessPropertyDecl().
| void Sema::CheckObjCPropertyAttributes | ( | Decl * | PropertyPtrTy, |
| SourceLocation | Loc, | ||
| unsigned & | Attributes, | ||
| bool | propertyInPrimaryClass | ||
| ) |
Ensure attributes are consistent with type.
| [in,out] | Attributes | The attributes to check; they will be modified to be consistent with PropertyTy. |
Definition at line 2278 of file SemaObjCProperty.cpp.
References Context, Diag(), clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_atomic, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_setter, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::LangOptions::GCOnly, getLangOpts(), getOwnershipRule(), clang::ObjCPropertyDecl::getType(), clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), clang::LangOptions::NonGC, clang::NonNull, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::Decl::setInvalidDecl(), and clang::ObjCPropertyDecl::setPropertyAttributes().
Referenced by ActOnProperty().
| OMPThreadPrivateDecl * Sema::CheckOMPThreadPrivateDecl | ( | SourceLocation | Loc, |
| ArrayRef< Expr * > | VarList | ||
| ) |
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
Definition at line 1178 of file SemaOpenMP.cpp.
References clang::AS_public, Context, clang::OMPThreadPrivateDecl::Create(), clang::VarDecl::DeclarationOnly, Diag(), DSAStack, getASTContext(), clang::ASTContext::getASTMutationListener(), getCurLexicalContext(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), getLangOpts(), clang::getOpenMPDirectiveName(), clang::ASTContext::getTargetInfo(), clang::Type::isDependentType(), clang::Type::isInstantiationDependentType(), clang::TargetInfo::isTLSSupported(), clang::OMPC_threadprivate, RequireCompleteType(), clang::SC_Register, clang::Decl::setAccess(), and clang::VarDecl::TLS_None.
Referenced by ActOnOpenMPThreadprivateDirective().
| Sema::OverloadKind Sema::CheckOverload | ( | Scope * | S, |
| FunctionDecl * | New, | ||
| const LookupResult & | OldDecls, | ||
| NamedDecl *& | OldDecl, | ||
| bool | IsForUsingDecl | ||
| ) |
Definition at line 920 of file SemaOverload.cpp.
References clang::LookupResult::begin(), E, clang::LookupResult::end(), clang::Decl::getAsFunction(), clang::Decl::getFriendObjectKind(), clang::LookupResult::getLookupKind(), and I.
Referenced by CheckUsingShadowDecl().
| bool Sema::CheckOverloadedOperatorDeclaration | ( | FunctionDecl * | FnDecl | ) |
CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is well-formed.
If so, returns false; otherwise, emits appropriate diagnostics and returns true.
Definition at line 11634 of file SemaDeclCXX.cpp.
References CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), Diag(), clang::Type::getAs(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::NUM_OVERLOADED_OPERATORS, and clang::FunctionDecl::params().
| void Sema::CheckOverrideControl | ( | NamedDecl * | D | ) |
CheckOverrideControl - Check C++11 override control semantics.
Definition at line 1873 of file SemaDeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), clang::FixItHint::CreateRemoval(), Diag(), clang::Decl::dropAttr(), clang::CXXMethodDecl::end_overridden_methods(), FindHiddenVirtualMethods(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::Decl::hasAttr(), clang::Type::isDependentType(), clang::CXXMethodDecl::isInstance(), clang::Decl::isInvalidDecl(), clang::CXXMethodDecl::isVirtual(), NoteHiddenVirtualMethods(), and clang::Decl::setInvalidDecl().
Referenced by ActOnCXXMemberDeclarator(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| bool Sema::CheckOverridingFunctionAttributes | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old | ||
| ) |
Definition at line 12959 of file SemaDeclCXX.cpp.
References Diag(), clang::Type::getAs(), clang::FunctionType::getCallConv(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::FunctionDecl::getStorageClass(), clang::ValueDecl::getType(), and clang::SC_Static.
| bool clang::Sema::CheckOverridingFunctionExceptionSpec | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old | ||
| ) |
CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
Definition at line 827 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), CheckExceptionSpecSubset(), DelayedExceptionSpecChecks, clang::EST_Unparsed, clang::Type::getAs(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::TagDecl::isBeingDefined(), clang::TagDecl::isDependentType(), and PDiag().
Referenced by actOnDelayedExceptionSpecification(), and CheckDelayedMemberExceptionSpecs().
| bool Sema::CheckOverridingFunctionReturnType | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old | ||
| ) |
CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5.
Both types must be pointers or references to classes.
Definition at line 12984 of file SemaDeclCXX.cpp.
References CheckDerivedToBaseConversion(), Diag(), clang::Type::getAs(), clang::NamedDecl::getDeclName(), clang::QualType::getLocalCVRQualifiers(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), IsDerivedFrom(), clang::QualType::isMoreQualifiedThan(), clang::QualType::isNull(), and RequireCompleteType().
| TypeSourceInfo * Sema::CheckPackExpansion | ( | TypeSourceInfo * | Pattern, |
| SourceLocation | EllipsisLoc, | ||
| Optional< unsigned > | NumExpansions | ||
| ) |
Construct a pack expansion type from the pattern of the pack expansion.
Definition at line 468 of file SemaTemplateVariadic.cpp.
References Context, clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::isNull(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::Result, and clang::PackExpansionTypeLoc::setEllipsisLoc().
Referenced by ActOnPackExpansion(), and SubstParmVarDecl().
| QualType Sema::CheckPackExpansion | ( | QualType | Pattern, |
| SourceRange | PatternRange, | ||
| SourceLocation | EllipsisLoc, | ||
| Optional< unsigned > | NumExpansions | ||
| ) |
Construct a pack expansion type from the pattern of the pack expansion.
Definition at line 485 of file SemaTemplateVariadic.cpp.
References clang::Type::containsUnexpandedParameterPack(), Context, Diag(), and clang::ASTContext::getPackExpansionType().
| ExprResult Sema::CheckPackExpansion | ( | Expr * | Pattern, |
| SourceLocation | EllipsisLoc, | ||
| Optional< unsigned > | NumExpansions | ||
| ) |
Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
| Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 505 of file SemaTemplateVariadic.cpp.
References clang::Expr::containsUnexpandedParameterPack(), Context, clang::ASTContext::DependentTy, Diag(), and clang::ExprError().
| ParmVarDecl * Sema::CheckParameter | ( | DeclContext * | DC, |
| SourceLocation | StartLoc, | ||
| SourceLocation | NameLoc, | ||
| IdentifierInfo * | Name, | ||
| QualType | T, | ||
| TypeSourceInfo * | TSInfo, | ||
| StorageClass | SC | ||
| ) |
Definition at line 10574 of file SemaDecl.cpp.
References clang::Sema::DelayedDiagnostics::add(), Context, clang::ParmVarDecl::Create(), clang::FixItHint::CreateInsertion(), Diag(), clang::QualType::getAddressSpace(), clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getLifetimeQualifiedType(), clang::TypeLoc::getLocEnd(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isArrayType(), clang::QualType::isConstQualified(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::sema::DelayedDiagnostic::makeForbiddenType(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().
Referenced by ActOnMethodDeclaration(), and SubstParmVarDecl().
| bool Sema::CheckParameterPacksForExpansion | ( | SourceLocation | EllipsisLoc, |
| SourceRange | PatternRange, | ||
| ArrayRef< UnexpandedParameterPack > | Unexpanded, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool & | ShouldExpand, | ||
| bool & | RetainExpansion, | ||
| Optional< unsigned > & | NumExpansions | ||
| ) |
Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.
| EllipsisLoc | The location of the ellipsis that identifies the pack expansion. |
| PatternRange | The source range that covers the entire pattern of the pack expansion. |
| Unexpanded | The set of unexpanded parameter packs within the pattern. |
| ShouldExpand | Will be set to true if the transformer should expand the corresponding pack expansions into separate arguments. When set, NumExpansions must also be set. |
| RetainExpansion | Whether the caller should add an unexpanded pack expansion after all of the expanded arguments. This is used when extending explicitly-specified template argument packs per C++0x [temp.arg.explicit]p9. |
| NumExpansions | The number of separate arguments that will be in the expanded form of the corresponding pack expansion. This is both an input and an output parameter, which can be set by the caller if the number of expansions is known a priori (e.g., due to a prior substitution) and will be set by the callee when the number of expansions is known. The callee must set this value when ShouldExpand is true; it may set this value in other cases. |
ShouldExpand (and possibly NumExpansions) must be set. Definition at line 538 of file SemaTemplateVariadic.cpp.
References CurrentInstantiationScope, Depth, Diag(), clang::end(), clang::LocalInstantiationScope::findInstantiationOf(), getDepthAndIndex(), clang::NamedDecl::getIdentifier(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), and clang::Name.
Referenced by instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and SubstBaseSpecifiers().
| bool clang::Sema::CheckParamExceptionSpec | ( | const PartialDiagnostic & | NoteID, |
| const FunctionProtoType * | Target, | ||
| SourceLocation | TargetLoc, | ||
| const FunctionProtoType * | Source, | ||
| SourceLocation | SourceLoc | ||
| ) |
CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs.
This is part of the assignment and override compatibility check. We do not check the parameters of parameter function pointers recursively, as no sane programmer would even be able to write such a function type.
Definition at line 772 of file SemaExceptionSpec.cpp.
References clang::CheckSpecForTypesEquivalent(), E, clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), and PDiag().
Referenced by CheckExceptionSpecSubset().
| bool Sema::CheckParmsForFunctionDef | ( | ParmVarDecl *const * | P, |
| ParmVarDecl *const * | PEnd, | ||
| bool | CheckParameterNames | ||
| ) |
Helpers for dealing with blocks and functions.
CheckParmsForFunctionDef - Check that the parameters of the given function are appropriate for the definition of a function.
This takes care of any checks that cannot be performed on the declaration itself, e.g., that the types of each of the function parameters are complete.
Definition at line 8406 of file SemaChecking.cpp.
References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), Diag(), diagnoseArrayStarInParamType(), clang::Type::getAs(), clang::Decl::getAttr(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ParmVarDecl::getOriginalType(), clang::Attr::getSpelling(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::QualType::isConstQualified(), clang::DeclContext::isDependentContext(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), P, and clang::Decl::setInvalidDecl().
Referenced by ActOnStartOfObjCMethodDef().
| ExprResult Sema::CheckPlaceholderExpr | ( | Expr * | E | ) |
Check for operands with placeholder types and complain if found.
Returns true if there was an error and no recovery was possible.
Definition at line 14543 of file SemaExpr.cpp.
References checkPseudoObjectRValue(), clang::CK_BuiltinFnToFnPtr, Context, CorrectDelayedTyposInExpr(), clang::frontend::CPlusPlus, clang::DeclarationName::CXXDestructorName, Diag(), diagnoseARCUnbridgedCast(), diagnoseUnknownAnyExpr(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::BuiltinType::getKind(), getLangOpts(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), ImpCastExprToType(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::None, PDiag(), ResolveAndFixSingleFunctionTemplateSpecialization(), stripARCUnbridgedCast(), tryToRecoverWithCall(), and clang::VK_RValue.
Referenced by ActOnFinishFullExpr(), ActOnStartCXXMemberReference(), BuildArrayType(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildDecltypeType(), BuildExpressionTrait(), BuildInstanceMessage(), BuildTypeofExprType(), checkArgsForPlaceholders(), CheckArrow(), CheckBooleanCondition(), CheckCommaOperands(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckObjCCollectionLiteralElement(), checkPlaceholderForOverload(), CheckRealImagOperand(), DeduceAutoType(), IgnoredValueConversions(), clang::InitializationSequence::InitializeFrom(), and PerformContextualImplicitConversion().
| bool Sema::CheckPointerConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| CastKind & | Kind, | ||
| CXXCastPath & | BasePath, | ||
| bool | IgnoreBaseAccess, | ||
| bool | Diagnose = true |
||
| ) |
CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
This routine checks for ambiguous or inaccessible derived-to-base pointer conversions for which IsPointerConversion has already returned true. It returns true and produces a diagnostic if there was an error, or returns false otherwise.
Definition at line 2687 of file SemaOverload.cpp.
References clang::ASTContext::BoolTy, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_DerivedToBase, clang::CK_NullToPointer, Context, Diag(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPC_ValueDependentIsNull, and clang::Expr::NPCK_ZeroExpression.
Referenced by PerformImplicitConversion().
| QualType Sema::CheckPointerToMemberOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| ExprValueKind & | VK, | ||
| SourceLocation | OpLoc, | ||
| bool | isIndirect | ||
| ) |
Definition at line 4513 of file SemaExprCXX.cpp.
References clang::ASTContext::BoundMemberTy, CheckDerivedToBaseConversion(), clang::CK_DerivedToBase, clang::Expr::Classify(), Context, clang::FixItHint::CreateReplacement(), DefaultLvalueConversion(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::ASTContext::getCVRQualifiedType(), clang::QualType::getCVRQualifiers(), clang::Type::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParens(), ImpCastExprToType(), IsDerivedFrom(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::Classification::isLValue(), clang::Type::isPlaceholderType(), clang::Expr::Classification::isRValue(), RequireCompleteType(), clang::Result, clang::RQ_LValue, clang::RQ_None, clang::RQ_RValue, clang::VK_LValue, and clang::VK_RValue.
| ExprResult Sema::checkPseudoObjectAssignment | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| BinaryOperatorKind | Opcode, | ||
| Expr * | LHS, | ||
| Expr * | RHS | ||
| ) |
Definition at line 1581 of file SemaPseudoObject.cpp.
References Builder, Context, clang::ASTContext::DependentTy, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isNonOverloadPlaceholderType(), clang::Expr::isTypeDependent(), clang::OK_Ordinary, and clang::VK_RValue.
| ExprResult Sema::checkPseudoObjectIncDec | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| UnaryOperatorKind | Opcode, | ||
| Expr * | Op | ||
| ) |
Check an increment or decrement of a pseudo-object expression.
Definition at line 1552 of file SemaPseudoObject.cpp.
References Builder, Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::Expr::IgnoreParens(), clang::UnaryOperator::isIncrementDecrementOp(), clang::Expr::isTypeDependent(), clang::OK_Ordinary, and clang::VK_RValue.
| ExprResult Sema::checkPseudoObjectRValue | ( | Expr * | E | ) |
Definition at line 1527 of file SemaPseudoObject.cpp.
References Builder, and clang::Expr::IgnoreParens().
Referenced by CheckPlaceholderExpr().
| bool Sema::CheckPureMethod | ( | CXXMethodDecl * | Method, |
| SourceRange | InitRange | ||
| ) |
Mark the given method pure.
| Method | the method to be marked pure. |
| InitRange | the source range that covers the "0" initializer. |
Definition at line 13094 of file SemaDeclCXX.cpp.
References Diag(), clang::NamedDecl::getDeclName(), clang::SourceRange::getEnd(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::CXXMethodDecl::isVirtual(), clang::FunctionDecl::setPure(), and clang::FunctionDecl::setRangeEnd().
Referenced by ActOnPureSpecifier(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| bool Sema::CheckQualifiedMemberReference | ( | Expr * | BaseExpr, |
| QualType | BaseType, | ||
| const CXXScopeSpec & | SS, | ||
| const LookupResult & | R | ||
| ) |
Definition at line 495 of file SemaExprMember.cpp.
References clang::LookupResult::begin(), DiagnoseQualifiedMemberReference(), E, clang::LookupResult::end(), clang::CXXRecordDecl::getCanonicalDecl(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getParent(), clang::LookupResult::getRepresentativeDecl(), I, clang::Type::isDependentType(), clang::CXXRecordDecl::isProvablyNotDerivedFrom(), clang::DeclContext::isRecord(), and clang::DeclContext::isTransparentContext().
| bool Sema::CheckRegparmAttr | ( | const AttributeList & | Attr, |
| unsigned & | numParams | ||
| ) |
Checks a regparm attribute, returning true if it is ill-formed and otherwise setting numParams to the appropriate value.
Definition at line 3798 of file SemaDeclAttr.cpp.
References checkAttributeNumArgs(), checkUInt32Argument(), Context, Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getLoc(), clang::TargetInfo::getRegParmMax(), clang::ASTContext::getTargetInfo(), clang::AttributeList::isInvalid(), and clang::AttributeList::setInvalid().
Referenced by handleFunctionTypeAttr().
| QualType Sema::CheckRemainderOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign = false |
||
| ) |
Definition at line 7810 of file SemaExpr.cpp.
References checkArithmeticNull(), DiagnoseBadDivideOrRemainderValues(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::Type::isVectorType().
| void Sema::checkRetainCycles | ( | ObjCMessageExpr * | msg | ) |
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
Check a message send to see if it's likely to cause a retain cycle.
Definition at line 9143 of file SemaChecking.cpp.
References diagnoseRetainCycle(), findCapturingExpr(), findRetainCycleOwner(), clang::ObjCMessageExpr::getArg(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCMessageExpr::getNumArgs(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperLoc(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isInstanceMessage(), isSetterLikeSelector(), and clang::ObjCMessageExpr::SuperInstance.
Referenced by BuildInstanceMessage().
Check a property assign to see if it's likely to cause a retain cycle.
Definition at line 9167 of file SemaChecking.cpp.
References diagnoseRetainCycle(), findCapturingExpr(), and findRetainCycleOwner().
Definition at line 9176 of file SemaChecking.cpp.
References considerVariable(), diagnoseRetainCycle(), findCapturingExpr(), clang::Decl::getLocation(), and clang::VarDecl::getSourceRange().
| bool Sema::checkSectionName | ( | SourceLocation | LiteralLoc, |
| StringRef | Str | ||
| ) |
Definition at line 2558 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Error, clang::ASTContext::getTargetInfo(), and clang::TargetInfo::isValidSectionSpecifier().
Referenced by ActOnPragmaMSSeg(), and handleSectionAttr().
| void Sema::CheckShadow | ( | Scope * | S, |
| VarDecl * | D, | ||
| const LookupResult & | R | ||
| ) |
Diagnose variable or built-in function shadowing.
Implements -Wshadow.
This method is called whenever a VarDecl is added to a "useful" scope.
| S | the scope in which the shadowing name is being declared |
| R | the lookup of the name |
Definition at line 6299 of file SemaDecl.cpp.
References Diag(), clang::LookupResult::Found, clang::Decl::getDeclContext(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getResultKind(), clang::VarDecl::hasGlobalStorage(), I, clang::DeclContext::isFileContext(), clang::DeclContext::isRecord(), and clang::Name.
Check -Wshadow without the advantage of a previous lookup.
Definition at line 6373 of file SemaDecl.cpp.
References ForRedeclaration, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and LookupOrdinaryName.
| QualType Sema::CheckShiftOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| bool | IsCompAssign = false |
||
| ) |
Definition at line 8412 of file SemaExpr.cpp.
References clang::VectorType::AltiVecBool, checkArithmeticNull(), checkOpenCLVectorShift(), DiagnoseBadShiftValues(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isScopedEnumerationType(), and clang::Type::isVectorType().
| Sema::AssignConvertType Sema::CheckSingleAssignmentConstraints | ( | QualType | LHSType, |
| ExprResult & | RHS, | ||
| bool | Diagnose = true, |
||
| bool | DiagnoseCFAudited = false, |
||
| bool | ConvertRHS = true |
||
| ) |
Definition at line 7432 of file SemaExpr.cpp.
References clang::CK_Invalid, Context, clang::frontend::CPlusPlus, Diag(), E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::QualType::getNonLValueExprType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ObjCProtocolDecl::hasDefinition(), clang::Expr::IgnoreParenCasts(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::ImplicitConversionSequence::isFailure(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Expr::NPC_ValueDependentIsNull, clang::ASTContext::OverloadTy, TryImplicitConversion(), and clang::VK_RValue.
Referenced by IsStandardConversion(), and clang::InitializationSequence::Perform().
| bool Sema::CheckSpecializationInstantiationRedecl | ( | SourceLocation | NewLoc, |
| TemplateSpecializationKind | NewTSK, | ||
| NamedDecl * | PrevDecl, | ||
| TemplateSpecializationKind | PrevTSK, | ||
| SourceLocation | PrevPointOfInstantiation, | ||
| bool & | HasNoEffect | ||
| ) |
Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect.
| NewLoc | the location of the new explicit specialization or instantiation. |
| NewTSK | the kind of the new explicit specialization or instantiation. |
| PrevDecl | the previous declaration of the entity. |
| PrevTSK | the kind of the old explicit specialization or instantiatin. |
| PrevPointOfInstantiation | if valid, indicates where the previus declaration was instantiated (either implicitly or explicitly). |
| HasNoEffect | will be set to true to indicate that the new specialization or instantiation has no effect and should be ignored. |
Definition at line 6602 of file SemaTemplate.cpp.
References clang::frontend::CPlusPlus11, Diag(), DiagLocForExplicitInstantiation(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), getTemplateSpecializationKind(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), StripImplicitInstantiation(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by InstantiateClassMembers().
| bool clang::Sema::CheckSpecifiedExceptionType | ( | QualType & | T, |
| SourceRange | Range | ||
| ) |
CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
Incomplete types, or pointers to incomplete types other than void are not allowed.
| [in,out] | T | The exception type. This will be decayed to a pointer type when the input is an array or a function type. |
Definition at line 71 of file SemaExceptionSpec.cpp.
References Context, Diag(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isVoidType(), and RequireCompleteType().
Referenced by checkExceptionSpecification().
| void Sema::CheckStaticArrayArgument | ( | SourceLocation | CallLoc, |
| ParmVarDecl * | Param, | ||
| const Expr * | ArgExpr | ||
| ) |
CheckStaticArrayArgument - If the given argument corresponds to a static array parameter, check that it is non-null, and that if it is formed by array-to-pointer decay, the underlying array is sufficiently large.
C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression.
Definition at line 4818 of file SemaExpr.cpp.
References Context, clang::frontend::CPlusPlus, Diag(), DiagnoseCalleeStaticArrayParam(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getAsConstantArrayType(), clang::ParmVarDecl::getOriginalType(), clang::ConstantArrayType::getSize(), clang::ArrayType::getSizeModifier(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_NeverValueDependent, and clang::ArrayType::Static.
| bool Sema::checkStringLiteralArgumentAttr | ( | const AttributeList & | Attr, |
| unsigned | ArgNum, | ||
| StringRef & | Str, | ||
| SourceLocation * | ArgLocation = nullptr |
||
| ) |
Check if the argument ArgNum of Attr is a ASCII string literal.
If not emit an error and return false. If the argument is an identifier it will emit an error with a fixit hint and treat it as if it was a string literal.
Definition at line 310 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentString, clang::FixItHint::CreateInsertion(), Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getArgAsIdent(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::StringLiteral::getString(), clang::IdentifierLoc::Ident, clang::Expr::IgnoreParenCasts(), clang::AttributeList::isArgIdent(), clang::StringLiteral::isAscii(), and clang::IdentifierLoc::Loc.
Referenced by CheckCallingConvAttr(), handleAliasAttr(), handleAnnotateAttr(), handleARMInterruptAttr(), handleAttrWithMessage(), handleCallableWhenAttr(), handleCapabilityAttr(), handleEnableIfAttr(), handleMipsInterruptAttr(), handleNoSanitizeAttr(), handleObjCRuntimeName(), handleSectionAttr(), handleTargetAttr(), handleTLSModelAttr(), handleUuidAttr(), handleVisibilityAttr(), and handleWeakRefAttr().
| Sema::ObjCSubscriptKind Sema::CheckSubscriptingKind | ( | Expr * | FromE | ) |
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done.
Definition at line 1040 of file SemaPseudoObject.cpp.
References clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isBlockPointerType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), and clang::Type::isVoidPointerType().
| QualType Sema::CheckSubtractionOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| QualType * | CompLHSTy = nullptr |
||
| ) |
Definition at line 8170 of file SemaExpr.cpp.
References checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOpPointerOperand(), Context, clang::frontend::CPlusPlus, Diag(), diagnosePointerIncompatibility(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerDiffType(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::CharUnits::isZero(), and clang::ASTContext::typesAreCompatible().
| void Sema::checkTargetAttr | ( | SourceLocation | LiteralLoc, |
| StringRef | Str | ||
| ) |
Definition at line 2596 of file SemaDeclAttr.cpp.
References Diag().
Referenced by handleTargetAttr().
| bool Sema::CheckTemplateArgument | ( | NamedDecl * | Param, |
| TemplateArgumentLoc & | Arg, | ||
| NamedDecl * | Template, | ||
| SourceLocation | TemplateLoc, | ||
| SourceLocation | RAngleLoc, | ||
| unsigned | ArgumentPackIndex, | ||
| SmallVectorImpl< TemplateArgument > & | Converted, | ||
| CheckTemplateArgumentKind | CTAK = CTAK_Specified |
||
| ) |
Check that the given template argument corresponds to the given template parameter.
| Param | The template parameter against which the argument will be checked. |
| Arg | The template argument, which may be updated due to conversions. |
| Template | The template in which the template argument resides. |
| TemplateLoc | The location of the template name for the template whose argument list we're matching. |
| RAngleLoc | The location of the right angle bracket ('>') that closes the template argument list. |
| ArgumentPackIndex | The index into the argument pack where this argument will be placed. Only valid if the parameter is a parameter pack. |
| Converted | The checked, converted argument will be added to the end of this small vector. |
| CTAK | Describes how we arrived at this particular template argument: explicitly written, deduced, etc. |
Definition at line 3447 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), Context, clang::DependentScopeDeclRefExpr::Create(), clang::TemplateArgument::Declaration, Diag(), clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), clang::TemplateArgument::getKind(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TemplateArgument::Integral, clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgumentList::OnStack, clang::TemplateArgument::Pack, clang::Result, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by ConvertDeducedTemplateArgument(), and FinishTemplateArgumentDeduction().
| bool Sema::CheckTemplateArgument | ( | TemplateTypeParmDecl * | Param, |
| TypeSourceInfo * | ArgInfo | ||
| ) |
Check a template argument against its corresponding template type parameter.
This routine implements the semantics of C++ [temp.arg.type]. It returns true if an error occurred, and false otherwise.
Definition at line 4238 of file SemaTemplate.cpp.
References Context, Diag(), Finder, clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::hasUnnamedOrLocalType(), clang::Type::isVariablyModifiedType(), and clang::ASTContext::OverloadTy.
| ExprResult Sema::CheckTemplateArgument | ( | NonTypeTemplateParmDecl * | Param, |
| QualType | ParamType, | ||
| Expr * | Arg, | ||
| TemplateArgument & | Converted, | ||
| CheckTemplateArgumentKind | CTAK = CTAK_Specified |
||
| ) |
Check a template argument against its corresponding non-type template parameter.
This routine implements the semantics of C++ [temp.arg.nontype]. If an error occurred, it returns ExprError(); otherwise, it returns the converted template argument. ParamType is the type of the non-type template parameter after it has been instantiated.
Definition at line 4859 of file SemaTemplate.cpp.
References clang::APValue::AddrLabelDiff, clang::APValue::Array, CheckConvertedConstantExpression(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::CK_IntegralCast, clang::CK_IntegralToBoolean, clang::APValue::ComplexFloat, clang::APValue::ComplexInt, Context, clang::frontend::CPlusPlus1z, Diag(), Diag(), clang::ExprError(), clang::APValue::Float, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::APValue::getAsString(), clang::ASTContext::getCanonicalType(), clang::Expr::getExprLoc(), clang::APValue::getInt(), clang::APValue::getKind(), clang::Decl::getLocation(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), clang::APValue::getMemberPointerDecl(), clang::APValue::getMemberPointerPath(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::APValue::hasLValuePath(), clang::QualType::hasQualifiers(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::APValue::Int, clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::APValue::isLValueOnePastTheEnd(), clang::Type::isMemberPointerType(), isNullPointerValueTemplateArgument(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::Expr::isValueDependent(), clang::APValue::LValue, clang::APValue::MemberPointer, NPV_Error, NPV_NotNullPointer, NPV_NullPointer, clang::ASTContext::OverloadTy, S, clang::APValue::Struct, clang::APValue::Uninitialized, clang::APValue::Union, and clang::APValue::Vector.
| bool Sema::CheckTemplateArgument | ( | TemplateTemplateParmDecl * | Param, |
| TemplateArgumentLoc & | Arg, | ||
| unsigned | ArgumentPackIndex | ||
| ) |
Check a template argument against its corresponding template template parameter.
This routine implements the semantics of C++ [temp.arg.template]. It returns true if an error occurred, and false otherwise.
Definition at line 5318 of file SemaTemplate.cpp.
References Diag(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateTemplateParmDecl::getExpansionTemplateParameters(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateDecl::getTemplateParameters(), clang::TemplateName::isDependent(), clang::TemplateTemplateParmDecl::isExpandedParameterPack(), and clang::Name.
| bool Sema::CheckTemplateArgumentList | ( | TemplateDecl * | Template, |
| SourceLocation | TemplateLoc, | ||
| TemplateArgumentListInfo & | TemplateArgs, | ||
| bool | PartialTemplateArgs, | ||
| SmallVectorImpl< TemplateArgument > & | Converted | ||
| ) |
Check that the given template arguments can be be provided to the given template, converting the arguments along the way.
Check that the given template argument list is well-formed for specializing the given template.
| Template | The template to which the template arguments are being provided. |
| TemplateLoc | The location of the template name in the source. |
| TemplateArgs | The list of template arguments. If the template is a template template parameter, this function may extend the set of template arguments to also include substituted, defaulted template arguments. |
| PartialTemplateArgs | True if the list of template arguments is intentionally partial, e.g., because we're checking just the initial set of template arguments. |
| Converted | Will receive the converted, canonicalized template arguments. |
Definition at line 3743 of file SemaTemplate.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::TemplateParameterList::begin(), Context, clang::TemplateArgument::CreatePackCopy(), Diag(), diagnoseArityMismatch(), diagnoseMissingArgument(), clang::TemplateParameterList::end(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::TemplateTemplateParmDecl::getDefaultArgument(), getExpandedPackSize(), clang::Decl::getLocation(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TemplateParameterList::getSourceRange(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateDecl::getTemplateParameters(), clang::TypeSourceInfo::getType(), hasVisibleDefaultArgument(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateName::isNull(), clang::Name, clang::NumArgs, clang::TemplateArgumentListInfo::size(), and SubstDefaultTemplateArgument().
Referenced by FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), SubstituteExplicitTemplateArguments(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
| bool Sema::CheckTemplateDeclScope | ( | Scope * | S, |
| TemplateParameterList * | TemplateParams | ||
| ) |
Check whether a template can be declared within this scope.
If the template declaration is valid in this scope, returns false. Otherwise, issues a diagnostic and returns true.
Definition at line 5766 of file SemaTemplate.cpp.
References clang::Scope::DeclScope, Diag(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::TemplateParameterList::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclContext::isExternCContext(), clang::DeclContext::isFileContext(), and clang::Scope::TemplateParamScope.
| QualType Sema::CheckTemplateIdType | ( | TemplateName | Template, |
| SourceLocation | TemplateLoc, | ||
| TemplateArgumentListInfo & | TemplateArgs | ||
| ) |
Definition at line 2075 of file SemaTemplate.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::anyDependentTemplateArguments(), checkBuiltinTemplateIdType(), Context, clang::ClassTemplateSpecializationDecl::Create(), Depth, Diag(), clang::ETK_None, clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getCanonicalTemplateName(), clang::ASTContext::getCanonicalType(), clang::Type::getCanonicalTypeInternal(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::DependentTemplateName::getIdentifier(), clang::DeclContext::getLookupParent(), clang::DependentTemplateName::getQualifier(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTypeDeclType(), clang::TemplateName::getUnderlying(), clang::TypedefNameDecl::getUnderlyingType(), I, clang::QualType::isCanonical(), clang::TemplateName::isDependent(), clang::DependentTemplateName::isIdentifier(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Name, clang::None, clang::TemplateArgumentList::OnStack, and clang::Decl::setLexicalDeclContext().
Referenced by ActOnCXXNestedNameSpecifier(), BuildStdInitializerList(), checkBuiltinTemplateIdType(), and lookupPromiseType().
| bool Sema::CheckTemplateParameterList | ( | TemplateParameterList * | NewParams, |
| TemplateParameterList * | OldParams, | ||
| TemplateParamListContext | TPC | ||
| ) |
Checks the validity of a template parameter list, possibly considering the template parameter list from a previous declaration.
If an "old" template parameter list is provided, it must be equivalent (per TemplateParameterListsAreEqual) to the "new" template parameter list.
| NewParams | Template parameter list for a new template declaration. This template parameter list will be updated with any default arguments that are carried through from the previous template parameter list. |
| OldParams | If provided, template parameter list from a previous declaration of the same template. Default template arguments will be merged from the old template parameter list to the new template parameter list. |
| TPC | Describes the context in which we are checking the given template parameter list. |
Definition at line 1294 of file SemaTemplate.cpp.
References clang::TemplateParameterList::begin(), Context, Diag(), DiagnoseDefaultTemplateArgument(), DiagnoseUnexpandedParameterPacks(), clang::TemplateParameterList::end(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), hasVisibleDefaultArgument(), clang::TemplateTemplateParmDecl::isPackExpansion(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), and clang::TemplateTemplateParmDecl::setInheritedDefaultArgument().
Referenced by ActOnAliasDeclaration().
| bool Sema::CheckTemplateTypeArgument | ( | TemplateTypeParmDecl * | Param, |
| TemplateArgumentLoc & | Arg, | ||
| SmallVectorImpl< TemplateArgument > & | Converted | ||
| ) |
Definition at line 3066 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ETK_Typename, clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), clang::TemplateArgument::getAsTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getDependentNameType(), clang::TemplateArgument::getKind(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::QualType::getObjCLifetime(), clang::ASTContext::getQualifiedType(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateArgumentLoc::getSourceRange(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::Type::isObjCLifetimeType(), clang::Name, clang::LookupResult::NotFoundInCurrentInstantiation, clang::Qualifiers::OCL_Strong, clang::TypeLocBuilder::push(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::Qualifiers::setObjCLifetime(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::TemplateArgument::Template, and clang::TemplateArgument::Type.
| bool Sema::checkThisInStaticMemberFunctionAttributes | ( | CXXMethodDecl * | Method | ) |
Check whether 'this' shows up in the attributes of the given static member function.
Definition at line 13615 of file SemaDeclCXX.cpp.
References clang::Decl::attrs(), Finder, and I.
Referenced by checkThisInStaticMemberFunctionType().
| bool Sema::checkThisInStaticMemberFunctionExceptionSpec | ( | CXXMethodDecl * | Method | ) |
Whether this' shows up in the exception specification of a static member function.
Definition at line 13577 of file SemaDeclCXX.cpp.
References clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_None, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::EST_Unparsed, clang::FunctionProtoType::exceptions(), Finder, clang::TypeLoc::getAs(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getNoexceptExpr(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), and clang::DeclaratorDecl::getTypeSourceInfo().
Referenced by actOnDelayedExceptionSpecification(), and checkThisInStaticMemberFunctionType().
| bool Sema::checkThisInStaticMemberFunctionType | ( | CXXMethodDecl * | Method | ) |
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.
Definition at line 13545 of file SemaDeclCXX.cpp.
References checkThisInStaticMemberFunctionAttributes(), checkThisInStaticMemberFunctionExceptionSpec(), Finder, clang::TypeLoc::getAs(), clang::FunctionTypeLoc::getReturnLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::FunctionProtoType::hasTrailingReturn().
Definition at line 3723 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, classifyTypeForARCConversion(), getLangOpts(), and clang::Expr::getType().
Referenced by ActOnObjCBridgedCast(), and CheckTollFreeBridgeStaticCast().
Definition at line 3796 of file SemaExprObjC.cpp.
References ACTC_coreFoundation, ACTC_retainable, CheckTollFreeBridgeCast(), clang::CK_BitCast, clang::CK_CPointerToObjCPointerCast, classifyTypeForARCConversion(), getLangOpts(), and clang::Expr::getType().
Referenced by TryStaticCast().
| Sema::AssignConvertType Sema::CheckTransparentUnionArgumentConstraints | ( | QualType | ArgType, |
| ExprResult & | RHS | ||
| ) |
Definition at line 7380 of file SemaExpr.cpp.
References clang::Type::castAs(), clang::CK_BitCast, clang::CK_Invalid, clang::CK_NullToPointer, ConstructTransparentUnion(), Context, clang::RecordDecl::fields(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsUnionType(), clang::RecordType::getDecl(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::isNullPointerConstant(), clang::Type::isPointerType(), clang::Type::isVoidType(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().
| void Sema::CheckTypedefForVariablyModifiedType | ( | Scope * | S, |
| TypedefNameDecl * | D | ||
| ) |
Definition at line 5218 of file SemaDecl.cpp.
References Context, Diag(), clang::Scope::getFnParent(), clang::Decl::getLocation(), clang::TypeSourceInfo::getType(), clang::TypedefNameDecl::getTypeSourceInfo(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::Decl::setInvalidDecl(), clang::TypedefNameDecl::setTypeSourceInfo(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Referenced by ActOnAliasDeclaration().
| QualType Sema::CheckTypenameType | ( | ElaboratedTypeKeyword | Keyword, |
| SourceLocation | KeywordLoc, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| const IdentifierInfo & | II, | ||
| SourceLocation | IILoc | ||
| ) |
Build the type that describes a C++ typename specifier, e.g., "typename T::type".
Definition at line 8149 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), clang::LookupResult::Ambiguous, clang::LookupResult::begin(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ETK_Typename, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::ASTContext::getDependentNameType(), clang::ASTContext::getElaboratedType(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::ASTContext::getTypeDeclType(), clang::NestedNameSpecifier::isDependent(), isEnableIf(), clang::SourceLocation::isValid(), clang::Name, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, and clang::Result.
Referenced by ActOnTemplatedFriendTag(), and BuildMemInitializer().
| bool Sema::CheckUnaryExprOrTypeTraitOperand | ( | Expr * | E, |
| UnaryExprOrTypeTrait | ExprKind | ||
| ) |
Check the constraints on expression operands to unary type expression and type traits.
Completes any types necessary and validates the constraints on the operand expression. The logic mostly mirrors the type-based overload, but may modify the expression as it completes the type for that expression through template instantiation, etc.
Definition at line 3547 of file SemaExpr.cpp.
References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), Context, Diag(), clang::ASTContext::getBaseElementType(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::HasSideEffects(), clang::Expr::IgnoreParens(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::UETT_AlignOf, clang::UETT_SizeOf, clang::UETT_VecStep, and warnOnSizeofOnArrayDecay().
Referenced by CheckAlignOfExpr().
| bool Sema::CheckUnaryExprOrTypeTraitOperand | ( | QualType | ExprType, |
| SourceLocation | OpLoc, | ||
| SourceRange | ExprRange, | ||
| UnaryExprOrTypeTrait | ExprKind | ||
| ) |
Check the constraints on operands to unary expression and type traits.
This will complete any types necessary, and validate the various constraints on those operands.
The UsualUnaryConversions() function is not called by this routine. C99 6.3.2.1p[2-4] all state: Except when it is the operand of the sizeof operator ...
C++ [expr.sizeof]p4 The lvalue-to-rvalue, array-to-pointer, and function-to-pointer standard conversions are not applied to the operand of sizeof.
This policy is followed for all of the unary trait expressions.
Definition at line 3639 of file SemaExpr.cpp.
References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), Context, Diag(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Type::getPointeeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, and clang::UETT_VecStep.
| ExprResult Sema::checkUnknownAnyArg | ( | SourceLocation | callLoc, |
| Expr * | result, | ||
| QualType & | paramType | ||
| ) |
Type-check an expression that's being passed to an __unknown_anytype parameter.
Definition at line 14475 of file SemaExpr.cpp.
References Context, DefaultArgumentPromotion(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and PerformCopyInitialization().
Referenced by CheckMessageArgumentTypes().
| ExprResult Sema::checkUnknownAnyCast | ( | SourceRange | TypeRange, |
| QualType | CastType, | ||
| Expr * | CastExpr, | ||
| CastKind & | CastKind, | ||
| ExprValueKind & | VK, | ||
| CXXCastPath & | Path | ||
| ) |
Check a cast of an unknown-any type.
We intentionally only trigger this for C-style casts.
Definition at line 14457 of file SemaExpr.cpp.
References clang::CK_NoOp, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getValueKind(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().
| Sema::AccessResult Sema::CheckUnresolvedLookupAccess | ( | UnresolvedLookupExpr * | E, |
| DeclAccessPair | FoundDecl | ||
| ) |
Definition at line 1536 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::DeclAccessPair::getAccess(), clang::OverloadExpr::getNameLoc(), and clang::UnresolvedLookupExpr::getNamingClass().
Referenced by FinishOverloadedCallExpr().
| Sema::AccessResult Sema::CheckUnresolvedMemberAccess | ( | UnresolvedMemberExpr * | E, |
| DeclAccessPair | Found | ||
| ) |
Perform access-control checking on a previously-unresolved member access which has now been resolved to a member.
Definition at line 1552 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::DeclAccessPair::getAccess(), clang::Type::getAs(), clang::UnresolvedMemberExpr::getBaseType(), clang::UnresolvedMemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getNamingClass(), clang::PointerType::getPointeeType(), and clang::UnresolvedMemberExpr::isArrow().
Referenced by BuildCallToMemberFunction().
| bool Sema::checkUnsafeAssigns | ( | SourceLocation | Loc, |
| QualType | LHS, | ||
| Expr * | RHS | ||
| ) |
checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
Definition at line 9233 of file SemaChecking.cpp.
References checkUnsafeAssignObject(), clang::QualType::getObjCLifetime(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.
| void Sema::checkUnsafeExprAssigns | ( | SourceLocation | Loc, |
| Expr * | LHS, | ||
| Expr * | RHS | ||
| ) |
checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression.
Definition at line 9246 of file SemaChecking.cpp.
References clang::cast(), checkUnsafeAssignObject(), clang::CK_ARCConsumeObject, Diag(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::Expr::IgnoreParens(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::QualType::isNull(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyDecl::OBJC_PR_assign, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_None, and clang::Qualifiers::OCL_Weak.
| void Sema::checkUnusedDeclAttributes | ( | Declarator & | D | ) |
checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration, complain about any decl attributes which might be lying around on it.
Definition at line 5557 of file SemaDeclAttr.cpp.
References clang::DeclSpec::getAttributes(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::ParsedAttributes::getList(), clang::Declarator::getNumTypeObjects(), and clang::Declarator::getTypeObject().
Referenced by ActOnTypeName().
| bool Sema::CheckUsingDeclQualifier | ( | SourceLocation | UsingLoc, |
| const CXXScopeSpec & | SS, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| SourceLocation | NameLoc | ||
| ) |
Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope.
If an error is found, diagnoses it and returns true.
Definition at line 8343 of file SemaDeclCXX.cpp.
References computeDeclContext(), clang::frontend::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), clang::frontend::FixIt, clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), getLangOpts(), clang::DeclarationNameInfo::getLocEnd(), getLocForEndOfToken(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::DeclContext::isRecord(), LookupOrdinaryName, LookupQualifiedName(), RequireCompleteDeclContext(), clang::LookupResult::setHideTags(), and clang::LookupResult::suppressDiagnostics().
Referenced by BuildUsingDeclaration().
| bool Sema::CheckUsingDeclRedeclaration | ( | SourceLocation | UsingLoc, |
| bool | HasTypenameKeyword, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | NameLoc, | ||
| const LookupResult & | Prev | ||
| ) |
Checks that the given using declaration is not an invalid redeclaration.
Note that this is checking only for the using decl itself, not for any ill-formedness among the UsingShadowDecls.
Definition at line 8285 of file SemaDeclCXX.cpp.
References clang::LookupResult::begin(), Context, CurContext, Diag(), E, clang::LookupResult::end(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), I, and clang::DeclContext::isRecord().
Referenced by BuildUsingDeclaration().
| bool Sema::CheckUsingShadowDecl | ( | UsingDecl * | Using, |
| NamedDecl * | Orig, | ||
| const LookupResult & | Previous, | ||
| UsingShadowDecl *& | PrevShadow | ||
| ) |
Determines whether to create a using shadow decl for a particular decl, given the set of decls existing prior to this using lookup.
Definition at line 7733 of file SemaDeclCXX.cpp.
References clang::LookupResult::begin(), CheckOverload(), Context, clang::frontend::CPlusPlus11, CurContext, Diag(), E, clang::LookupResult::empty(), clang::LookupResult::end(), clang::Decl::getAsFunction(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::UsingDecl::getQualifier(), clang::UsingDecl::getQualifierLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::NamedDecl::getUnderlyingDecl(), I, clang::RecordDecl::isAnonymousStructOrUnion(), IsEquivalentForUsingDecl(), isEquivalentInternalLinkageDeclaration(), clang::DeclContext::isRecord(), isVisible(), Ovl_Match, Ovl_NonFunction, and Ovl_Overload.
Referenced by BuildUsingDeclaration().
| bool Sema::CheckVariableDeclaration | ( | VarDecl * | NewVD, |
| LookupResult & | Previous | ||
| ) |
Perform semantic checking on a newly-created variable declaration.
This routine performs all of the type-checking required for a variable declaration once it has been built. It is used both to check variables after they have been parsed and their declarators have been translated into a declaration, and to check variables that have been instantiated from a template.
Sets NewVD->isInvalidDecl() if an error was encountered.
Returns true if the variable declaration is a redeclaration.
Definition at line 6697 of file SemaDecl.cpp.
References checkForConflictWithNonVisibleExternC(), clang::LookupResult::empty(), clang::Decl::isInvalidDecl(), and clang::LookupResult::setShadowed().
Referenced by BuildVariableInstantiation().
| void Sema::CheckVariableDeclarationType | ( | VarDecl * | NewVD | ) |
Definition at line 6500 of file SemaDecl.cpp.
References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::QualType::getAddressSpace(), clang::ASTContext::getAsVariableArrayType(), clang::Decl::getLocation(), clang::ASTContext::getObjCObjectPointerType(), clang::VariableArrayType::getSizeExpr(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::VarDecl::hasGlobalStorage(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isConstexpr(), clang::Type::isDependentType(), clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCObjectType(), clang::Type::isSamplerT(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::LangOptions::NonGC, clang::LangAS::opencl_constant, clang::LangAS::opencl_global, clang::LangAS::opencl_local, clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Referenced by checkCoroutineContext().
| void Sema::checkVariadicArgument | ( | const Expr * | E, |
| VariadicCallType | CT | ||
| ) |
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.
Definition at line 887 of file SemaExpr.cpp.
References Diag(), clang::Expr::getType(), clang::Type::isObjCObjectType(), and clang::Type::isRecordType().
| DeclResult Sema::CheckVarTemplateId | ( | VarTemplateDecl * | Template, |
| SourceLocation | TemplateLoc, | ||
| SourceLocation | TemplateNameLoc, | ||
| const TemplateArgumentListInfo & | TemplateArgs | ||
| ) |
Definition at line 2719 of file SemaTemplate.cpp.
References clang::TemplateSpecCandidateSet::addCandidate(), clang::anyDependentTemplateArguments(), Context, DeduceTemplateArguments(), Diag(), clang::VarTemplateDecl::findSpecialization(), clang::TemplateSpecCandidateSet::getLocation(), clang::VarTemplateDecl::getPartialSpecializations(), clang::VarTemplateDecl::getTemplatedDecl(), I, clang::MakeDeductionFailureInfo(), clang::TemplateArgumentList::OnStack, P, clang::Result, clang::TemplateSpecCandidate::set(), clang::VarTemplateSpecializationDecl::setInstantiationOf(), and clang::Decl::setInvalidDecl().
| ExprResult Sema::CheckVarTemplateId | ( | const CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| VarTemplateDecl * | Template, | ||
| SourceLocation | TemplateLoc, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) |
Definition at line 2871 of file SemaTemplate.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameInfo::getLoc(), clang::VarDecl::getTemplateSpecializationKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::VarDecl::setTemplateSpecializationKind(), and clang::TSK_ImplicitInstantiation.
Definition at line 3744 of file SemaExpr.cpp.
References clang::Expr::IgnoreParens(), clang::Expr::isTypeDependent(), and clang::UETT_VecStep.
| bool Sema::CheckVectorCast | ( | SourceRange | R, |
| QualType | VectorTy, | ||
| QualType | Ty, | ||
| CastKind & | Kind | ||
| ) |
Definition at line 5724 of file SemaExpr.cpp.
References clang::CK_BitCast, Context, Diag(), clang::SourceRange::getBegin(), clang::Type::isIntegralType(), and clang::Type::isVectorType().
| QualType Sema::CheckVectorCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsRelational | ||
| ) |
CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types.
Instead of producing an IntTy result, like a scalar comparison, a vector comparison produces a vector of integer types.
Definition at line 9204 of file SemaExpr.cpp.
References clang::VectorType::AltiVecVector, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getLogicalOperationType(), clang::Expr::getType(), clang::VectorType::getVectorKind(), clang::Type::hasFloatingRepresentation(), clang::Expr::IgnoreParenImpCasts(), and clang::QualType::isNull().
| QualType Sema::CheckVectorLogicalOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc | ||
| ) |
Definition at line 9250 of file SemaExpr.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), and clang::QualType::isNull().
| QualType Sema::CheckVectorOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign, | ||
| bool | AllowBothBool, | ||
| bool | AllowBoolConversion | ||
| ) |
type checking for vector binary operators.
Definition at line 7614 of file SemaExpr.cpp.
References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecVector, clang::ASTContext::areCompatibleVectorTypes(), clang::CK_BitCast, Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::VectorType::getVectorKind(), clang::ASTContext::hasSameType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRealType(), and tryVectorConvertAndSplat().
Referenced by CXXCheckConditionalOperands(), and OpenCLCheckVectorConditional().
| Sema::NameClassification Sema::ClassifyName | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| IdentifierInfo *& | Name, | ||
| SourceLocation | NameLoc, | ||
| const Token & | NextToken, | ||
| bool | IsAddressOfOperand, | ||
| std::unique_ptr< CorrectionCandidateCallback > | CCC = nullptr |
||
| ) |
Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
This routine is used by the parser to resolve identifiers and help direct parsing. When the identifier cannot be found, this routine will attempt to correct the typo and classify based on the resulting name.
| S | The scope in which we're performing name lookup. |
| SS | The nested-name-specifier that precedes the name. |
| Name | The identifier. If typo correction finds an alternative name, this pointer parameter will be updated accordingly. |
| NameLoc | The location of the identifier. |
| NextToken | The token following the identifier. Used to help disambiguate the name. |
| IsAddressOfOperand | True if this name is the operand of a unary address of ('&') expression, assuming it is classified as an expression. |
| CCC | The correction callback, if typo correction is desired. |
Definition at line 731 of file SemaDecl.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::Ambiguous, clang::LookupResult::begin(), buildNestedType(), clang::LookupResult::clear(), Context, clang::frontend::CPlusPlus, E, clang::LookupResult::empty(), clang::LookupResult::end(), clang::Error, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::Token::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::IdentifierInfo::getName(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getOverloadedTemplateName(), clang::ASTContext::getQualifiedTemplateName(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), clang::Token::is(), clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::Decl::isFunctionOrFunctionTemplate(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::Token::isOneOf(), isResultTypeOrTemplate(), clang::CXXScopeSpec::isSet(), isTagTypeWithMissingTag(), clang::OpaquePtr< QualType >::make(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, recoverFromTypeInKnownDependentBase(), clang::LookupResult::resolveKind(), clang::Result, S, clang::LookupResult::setLookupName(), clang::LookupResult::suppressDiagnostics(), and Unknown.
| void Sema::CleanupVarDeclMarking | ( | ) |
Definition at line 13467 of file SemaExpr.cpp.
References clang::MarkVarDeclODRUsed(), and MaybeODRUseExprs.
Referenced by MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), and PopExpressionEvaluationContext().
| void Sema::clearDelayedTypo | ( | TypoExpr * | TE | ) |
Clears the state of the given TypoExpr.
Definition at line 4998 of file SemaLookup.cpp.
| void Sema::CodeCompleteAfterIf | ( | Scope * | S | ) |
Definition at line 4155 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), Builder, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftBrace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightBrace, clang::CodeCompletionString::CK_RightParen, clang::CodeCompletionString::CK_VerticalSpace, clang::frontend::CPlusPlus, clang::Scope::getFnParent(), HandleCodeCompleteResults(), LookupVisibleDecls(), and mapCodeCompletionContext().
Definition at line 4215 of file SemaCodeComplete.cpp.
Definition at line 3991 of file SemaCodeComplete.cpp.
References anyNullArguments(), clang::UnresolvedSetImpl::append(), clang::LookupResult::asUnresolvedSet(), CodeCompleteOverloadResults(), clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DeclarationNames, clang::OverloadCandidateSet::empty(), clang::Decl::getAccess(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::hasAnyTypeDependentArguments(), clang::Expr::IgnoreParenCasts(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::DeclAccessPair::make(), mergeCandidatesWithResults(), and clang::LookupResult::suppressDiagnostics().
| void Sema::CodeCompleteCase | ( | Scope * | S | ) |
Definition at line 3821 of file SemaCodeComplete.cpp.
References AddMacroResults(), clang::Type::castAs(), clang::CodeCompletionContext::CCC_Expression, clang::CodeCompletionContext::CCC_Other, clang::CodeCompletionContext::CCC_OtherWithMacros, clang::CCP_EnumInCase, clang::frontend::CPlusPlus, E, clang::EnumDecl::enumerators(), clang::SwitchStmt::getCond(), clang::EnumDecl::getDefinition(), clang::CaseStmt::getLHS(), clang::SwitchCase::getNextSwitchCase(), getRequiredQualification(), clang::SwitchStmt::getSwitchCaseList(), clang::Expr::getType(), HandleCodeCompleteResults(), clang::Expr::IgnoreImplicit(), clang::Expr::IgnoreParenCasts(), clang::Sema::CodeCompleteExpressionData::IntegralConstantExpression, clang::Type::isEnumeralType(), and clang::ast_matchers::type.
| void Sema::CodeCompleteConstructor | ( | Scope * | S, |
| QualType | Type, | ||
| SourceLocation | Loc, | ||
| ArrayRef< Expr * > | Args | ||
| ) |
Definition at line 4088 of file SemaCodeComplete.cpp.
References AttributeLangSupport::C, CodeCompleteOverloadResults(), clang::OverloadCandidateSet::CSK_Normal, clang::Type::getAsCXXRecordDecl(), clang::DeclAccessPair::make(), and mergeCandidatesWithResults().
| void Sema::CodeCompleteConstructorInitializer | ( | Decl * | Constructor, |
| ArrayRef< CXXCtorInitializer * > | Initializers | ||
| ) |
Definition at line 4407 of file SemaCodeComplete.cpp.
References clang::CXXRecordDecl::bases(), Builder, clang::CodeCompletionContext::CCC_PotentiallyQualifiedName, clang::CCP_MemberDeclaration, clang::CCP_NextInitializer, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, CXAvailability_Available, CXCursor_MemberRef, E, clang::RecordDecl::fields(), clang::ASTContext::getCanonicalType(), getCompletionPrintingPolicy(), clang::CXXMethodDecl::getParent(), HandleCodeCompleteResults(), clang::ASTContext::hasSameUnqualifiedType(), I, and clang::CXXRecordDecl::vbases().
| void Sema::CodeCompleteDeclSpec | ( | Scope * | S, |
| DeclSpec & | DS, | ||
| bool | AllowNonIdentifiers, | ||
| bool | AllowNestedNameSpecifiers | ||
| ) |
Definition at line 3408 of file SemaCodeComplete.cpp.
References AddClassMessageCompletions(), clang::Scope::AtCatchScope, clang::frontend::C99, clang::CodeCompletionContext::CCC_Name, clang::CodeCompletionContext::CCC_PotentiallyQualifiedName, clang::Scope::ClassScope, clang::frontend::CPlusPlus, clang::Scope::DeclScope, clang::Scope::FunctionPrototypeScope, clang::OpaquePtr< PtrTy >::get(), clang::Scope::getFlags(), clang::DeclSpec::getParsedSpecifiers(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getTypeSpecComplex(), clang::DeclSpec::getTypeSpecSign(), clang::DeclSpec::getTypeSpecType(), HandleCodeCompleteResults(), clang::QualType::isNull(), clang::Type::isObjCObjectOrInterfaceType(), clang::DeclSpec::isTypeAltiVecVector(), LookupVisibleDecls(), clang::None, clang::DeclSpec::PQ_TypeSpecifier, clang::Result, clang::Scope::TemplateParamScope, clang::DeclSpec::TSC_unspecified, clang::DeclSpec::TSS_unspecified, and clang::DeclSpec::TST_typename.
| void Sema::CodeCompleteExpression | ( | Scope * | S, |
| const CodeCompleteExpressionData & | Data | ||
| ) |
Perform code-completion in an expression context when we know what type we're looking for.
Definition at line 3483 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), clang::CodeCompletionContext::CCC_Expression, clang::Scope::getFnParent(), clang::QualType::getNonReferenceType(), HandleCodeCompleteResults(), I, clang::Sema::CodeCompleteExpressionData::IgnoreDecls, clang::Sema::CodeCompleteExpressionData::IntegralConstantExpression, clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), LookupVisibleDecls(), clang::Sema::CodeCompleteExpressionData::ObjCCollection, clang::Sema::CodeCompleteExpressionData::PreferredType, and WantTypesInContext().
Referenced by CodeCompleteOverloadResults().
Definition at line 4129 of file SemaCodeComplete.cpp.
References clang::ValueDecl::getType().
| void Sema::CodeCompleteInPreprocessorConditionalExclusion | ( | Scope * | S | ) |
Definition at line 7424 of file SemaCodeComplete.cpp.
References clang::Scope::getFnParent(), PCC_Namespace, and PCC_RecoveryInFunction.
| void Sema::CodeCompleteLambdaIntroducer | ( | Scope * | S, |
| LambdaIntroducer & | Intro, | ||
| bool | AfterAmpersand | ||
| ) |
Definition at line 4531 of file SemaCodeComplete.cpp.
References addThisCompletion(), AttributeLangSupport::C, clang::LambdaIntroducer::Captures, clang::CodeCompletionContext::CCC_Other, clang::CCP_LocalDeclaration, clang::Scope::decls(), clang::LambdaIntroducer::Default, clang::NamedDecl::getIdentifier(), clang::Scope::getParent(), HandleCodeCompleteResults(), clang::Decl::hasAttr(), clang::VarDecl::hasLocalStorage(), isNamespaceScope(), clang::LCD_ByCopy, and clang::LCK_This.
| void Sema::CodeCompleteMemberReferenceExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| bool | IsArrow | ||
| ) |
Definition at line 3633 of file SemaCodeComplete.cpp.
References AddObjCProperties(), clang::CodeCompletionContext::CCC_ArrowMemberAccess, clang::CodeCompletionContext::CCC_DotMemberAccess, clang::CodeCompletionContext::CCC_ObjCPropertyAccess, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::Scope::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), HandleCodeCompleteResults(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectOrInterfaceType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), LookupVisibleDecls(), clang::ObjCObjectPointerType::quals(), and clang::Result.
| void Sema::CodeCompleteModuleImport | ( | SourceLocation | ImportLoc, |
| ModuleIdPath | Path | ||
| ) |
Definition at line 3263 of file SemaCodeComplete.cpp.
References clang::Module::AllVisible, Builder, clang::CodeCompletionContext::CCC_Other, clang::CCP_Declaration, CXAvailability_Available, CXAvailability_NotAvailable, CXCursor_ModuleImportDecl, HandleCodeCompleteResults(), I, clang::Name, clang::Result, clang::Module::submodule_begin(), and clang::Module::submodule_end().
| void Sema::CodeCompleteNamespaceAliasDecl | ( | Scope * | S | ) |
Definition at line 4358 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, HandleCodeCompleteResults(), and LookupVisibleDecls().
| void Sema::CodeCompleteNamespaceDecl | ( | Scope * | S | ) |
Definition at line 4310 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, clang::CodeCompletionContext::CCC_Other, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), clang::Scope::getEntity(), clang::Scope::getParent(), clang::ASTContext::getTranslationUnitDecl(), HandleCodeCompleteResults(), and clang::DeclContext::isFileContext().
| void Sema::CodeCompleteNaturalLanguage | ( | ) |
Definition at line 7494 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_NaturalLanguage, and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCAtDirective | ( | Scope * | S | ) |
Definition at line 4673 of file SemaCodeComplete.cpp.
References AddObjCImplementationResults(), AddObjCInterfaceResults(), AddObjCTopLevelResults(), clang::CodeCompletionContext::CCC_Other, HandleCodeCompleteResults(), and clang::DeclContext::isObjCContainer().
| void Sema::CodeCompleteObjCAtExpression | ( | Scope * | S | ) |
Definition at line 4837 of file SemaCodeComplete.cpp.
References AddObjCExpressionResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCAtStatement | ( | Scope * | S | ) |
Definition at line 4824 of file SemaCodeComplete.cpp.
References AddObjCExpressionResults(), AddObjCStatementResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCAtVisibility | ( | Scope * | S | ) |
Definition at line 4812 of file SemaCodeComplete.cpp.
References AddObjCVisibilityResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCClassMessage | ( | Scope * | S, |
| ParsedType | Receiver, | ||
| ArrayRef< IdentifierInfo * > | SelIdents, | ||
| bool | AtArgumentExpression, | ||
| bool | IsSuper = false |
||
| ) |
Definition at line 5640 of file SemaCodeComplete.cpp.
References AddClassMessageCompletions(), clang::CodeCompletionContext::CCC_ObjCClassMessage, getPreferredArgumentTypeForMessageSend(), HandleCodeCompleteResults(), and clang::QualType::isNull().
| void Sema::CodeCompleteObjCForCollection | ( | Scope * | S, |
| DeclGroupPtrTy | IterationVar | ||
| ) |
Definition at line 5835 of file SemaCodeComplete.cpp.
References clang::DeclGroupRef::begin(), clang::DeclGroupRef::end(), End, clang::OpaquePtr< PtrTy >::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), I, clang::Sema::CodeCompleteExpressionData::IgnoreDecls, and clang::Sema::CodeCompleteExpressionData::ObjCCollection.
| void Sema::CodeCompleteObjCImplementationCategory | ( | Scope * | S, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassNameLoc | ||
| ) |
Definition at line 6092 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_ObjCCategoryName, clang::ObjCInterfaceDecl::getSuperClass(), HandleCodeCompleteResults(), clang::Result, and clang::ObjCInterfaceDecl::visible_categories().
| void Sema::CodeCompleteObjCImplementationDecl | ( | Scope * | S | ) |
Definition at line 6038 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCInterfaceName, clang::CodeCompletionContext::CCC_Other, clang::ASTContext::getTranslationUnitDecl(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCInstanceMessage | ( | Scope * | S, |
| Expr * | Receiver, | ||
| ArrayRef< IdentifierInfo * > | SelIdents, | ||
| bool | AtArgumentExpression, | ||
| ObjCInterfaceDecl * | Super = nullptr |
||
| ) |
Definition at line 5675 of file SemaCodeComplete.cpp.
References AddObjCMethods(), AddSuperSendCompletion(), clang::CodeCompletionContext::CCC_ObjCInstanceMessage, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedIdType(), GetAssumedMessageSendExprType(), clang::ObjCMethodList::getMethod(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), getPreferredArgumentTypeForMessageSend(), clang::Expr::getType(), HandleCodeCompleteResults(), I, isAcceptableObjCMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Selector::isNull(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCQualifiedClassType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OpaquePtr< QualType >::make(), MK_Any, and clang::Result.
| void Sema::CodeCompleteObjCInterfaceCategory | ( | Scope * | S, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassNameLoc | ||
| ) |
Definition at line 6057 of file SemaCodeComplete.cpp.
References Category, clang::CodeCompletionContext::CCC_ObjCCategoryName, clang::DeclContext::decls(), clang::ASTContext::getTranslationUnitDecl(), HandleCodeCompleteResults(), and clang::Result.
| void Sema::CodeCompleteObjCInterfaceDecl | ( | Scope * | S | ) |
Definition at line 5993 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCInterfaceName, clang::CodeCompletionContext::CCC_Other, clang::ASTContext::getTranslationUnitDecl(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCMessageReceiver | ( | Scope * | S | ) |
Definition at line 5429 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddSuperSendCompletion(), addThisCompletion(), clang::CodeCompletionContext::CCC_ObjCMessageReceiver, clang::frontend::CPlusPlus11, HandleCodeCompleteResults(), LookupVisibleDecls(), clang::None, and clang::Result.
| void Sema::CodeCompleteObjCMethodDecl | ( | Scope * | S, |
| bool | IsInstanceMethod, | ||
| ParsedType | ReturnType | ||
| ) |
Definition at line 7021 of file SemaCodeComplete.cpp.
References AddObjCKeyValueCompletions(), AddObjCPassingTypeChunk(), Builder, Category, clang::CodeCompletionContext::CCC_Other, clang::CCD_InBaseClass, clang::CCP_CodePattern, clang::CodeCompletionString::CK_Comma, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftBrace, clang::CodeCompletionString::CK_RightBrace, clang::CodeCompletionString::CK_SemiColon, clang::CodeCompletionString::CK_VerticalSpace, Context, FindImplementableMethods(), getCompletionPrintingPolicy(), clang::Scope::getEntity(), clang::ASTContext::getLangOpts(), clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSendResultType(), HandleCodeCompleteResults(), I, clang::QualType::isNull(), clang::DeclContext::isObjCContainer(), clang::ObjCMethodDecl::isVariadic(), clang::Type::isVoidType(), clang::Decl::OBJC_TQ_CSNullability, P, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::ObjCMethodDecl::param_size(), clang::Parameter, clang::Result, clang::QualType::stripObjCKindOfType(), clang::AttributedType::stripOuterNullability(), clang::QualType::substObjCTypeArgs(), and clang::ObjCInterfaceDecl::visible_categories().
| void Sema::CodeCompleteObjCMethodDeclSelector | ( | Scope * | S, |
| bool | IsInstanceMethod, | ||
| bool | AtParameterName, | ||
| ParsedType | ReturnType, | ||
| ArrayRef< IdentifierInfo * > | SelIdents | ||
| ) |
Definition at line 7193 of file SemaCodeComplete.cpp.
References Builder, clang::CodeCompletionContext::CCC_Other, clang::NamedDecl::getIdentifier(), clang::ObjCMethodList::getMethod(), clang::IdentifierInfo::getName(), HandleCodeCompleteResults(), I, isAcceptableObjCMethod(), clang::Selector::isNull(), MK_Any, and clang::Result.
| void Sema::CodeCompleteObjCPassingType | ( | Scope * | S, |
| ObjCDeclSpec & | DS, | ||
| bool | IsParameter | ||
| ) |
Definition at line 5160 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), Builder, clang::CodeCompletionContext::CCC_Type, clang::CCP_CodePattern, clang::CodeCompletionString::CK_Colon, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, CXAvailability_Available, clang::ObjCDeclSpec::DQ_Bycopy, clang::ObjCDeclSpec::DQ_Byref, clang::ObjCDeclSpec::DQ_CSNullability, clang::ObjCDeclSpec::DQ_In, clang::ObjCDeclSpec::DQ_Inout, clang::ObjCDeclSpec::DQ_Oneway, clang::ObjCDeclSpec::DQ_Out, clang::ObjCDeclSpec::getObjCDeclQualifier(), HandleCodeCompleteResults(), and LookupVisibleDecls().
| void Sema::CodeCompleteObjCPropertyDefinition | ( | Scope * | S | ) |
Definition at line 6134 of file SemaCodeComplete.cpp.
References AddObjCProperties(), clang::CodeCompletionContext::CCC_Other, getContainerDef(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCPropertyFlags | ( | Scope * | S, |
| ObjCDeclSpec & | ODS | ||
| ) |
Definition at line 4882 of file SemaCodeComplete.cpp.
References clang::CodeCompletionBuilder::AddTypedTextChunk(), clang::CodeCompletionContext::CCC_Other, clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_atomic, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_getter, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_nullability, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_setter, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::ObjCDeclSpec::getPropertyAttributes(), HandleCodeCompleteResults(), clang::LangOptions::NonGC, and ObjCPropertyFlagConflicts().
| void Sema::CodeCompleteObjCPropertyGetter | ( | Scope * | S | ) |
Definition at line 5104 of file SemaCodeComplete.cpp.
References AddObjCMethods(), Category, clang::CodeCompletionContext::CCC_Other, HandleCodeCompleteResults(), MK_ZeroArgSelector, and clang::None.
| void Sema::CodeCompleteObjCPropertySetter | ( | Scope * | S | ) |
Definition at line 5131 of file SemaCodeComplete.cpp.
References AddObjCMethods(), Category, clang::CodeCompletionContext::CCC_Other, HandleCodeCompleteResults(), MK_OneArgSelector, and clang::None.
| void Sema::CodeCompleteObjCPropertySynthesizeIvar | ( | Scope * | S, |
| IdentifierInfo * | PropertyName | ||
| ) |
Definition at line 6174 of file SemaCodeComplete.cpp.
References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), Builder, clang::CodeCompletionContext::CCC_Other, clang::CCP_MemberDeclaration, clang::CodeCompletionAllocator::CopyString(), CXAvailability_Available, CXCursor_ObjCIvarDecl, clang::ObjCContainerDecl::FindPropertyDeclaration(), getCompletionPrintingPolicy(), GetCompletionTypeString(), clang::IdentifierInfo::getName(), clang::ObjCIvarDecl::getNextIvar(), clang::ASTContext::getObjCIdType(), clang::ObjCInterfaceDecl::getSuperClass(), HandleCodeCompleteResults(), clang::Property, clang::Result, and clang::CodeCompletionResult::RK_Declaration.
| void Sema::CodeCompleteObjCProtocolDecl | ( | Scope * | S | ) |
Definition at line 5955 of file SemaCodeComplete.cpp.
References AddProtocolResults(), clang::CodeCompletionContext::CCC_ObjCProtocolName, clang::ASTContext::getTranslationUnitDecl(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCProtocolReferences | ( | ArrayRef< IdentifierLocPair > | Protocols | ) |
Definition at line 5926 of file SemaCodeComplete.cpp.
References AddProtocolResults(), clang::CodeCompletionContext::CCC_ObjCProtocolName, clang::ASTContext::getTranslationUnitDecl(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCSelector | ( | Scope * | S, |
| ArrayRef< IdentifierInfo * > | SelIdents | ||
| ) |
Definition at line 5851 of file SemaCodeComplete.cpp.
References Builder, clang::CodeCompletionContext::CCC_SelectorName, clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), HandleCodeCompleteResults(), I, isAcceptableObjCSelector(), clang::Selector::isNull(), clang::Selector::isUnarySelector(), and MK_Any.
| void Sema::CodeCompleteObjCSuperclass | ( | Scope * | S, |
| IdentifierInfo * | ClassName, | ||
| SourceLocation | ClassNameLoc | ||
| ) |
Definition at line 6012 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCInterfaceName, clang::ASTContext::getTranslationUnitDecl(), and HandleCodeCompleteResults().
| void Sema::CodeCompleteObjCSuperMessage | ( | Scope * | S, |
| SourceLocation | SuperLoc, | ||
| ArrayRef< IdentifierInfo * > | SelIdents, | ||
| bool | AtArgumentExpression | ||
| ) |
Definition at line 5465 of file SemaCodeComplete.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTContext::getTypeDeclType(), clang::ast_matchers::id(), and clang::OpaquePtr< QualType >::make().
| void Sema::CodeCompleteOperatorName | ( | Scope * | S | ) |
Definition at line 4375 of file SemaCodeComplete.cpp.
References AddTypeSpecifierResults(), clang::CodeCompletionContext::CCC_Type, HandleCodeCompleteResults(), LookupVisibleDecls(), and clang::Result.
| void Sema::CodeCompleteOrdinaryName | ( | Scope * | S, |
| ParserCompletionContext | CompletionContext | ||
| ) |
Definition at line 3315 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), clang::frontend::CPlusPlus, clang::Qualifiers::fromCVRMask(), clang::Scope::getFnParent(), HandleCodeCompleteResults(), LookupVisibleDecls(), mapCodeCompletionContext(), MaybeAddOverrideCalls(), and WantTypesInContext().
Referenced by CodeCompleteOverloadResults(), and clang::Parser::ParseAssignmentExpression().
| void Sema::CodeCompletePostfixExpression | ( | Scope * | S, |
| ExprResult | LHS | ||
| ) |
Definition at line 3531 of file SemaCodeComplete.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::None.
| void Sema::CodeCompletePreprocessorDirective | ( | bool | InConditional | ) |
| void Sema::CodeCompletePreprocessorExpression | ( | ) |
Definition at line 7458 of file SemaCodeComplete.cpp.
References AddMacroResults(), Builder, clang::CodeCompletionContext::CCC_PreprocessorExpression, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, and HandleCodeCompleteResults().
| void Sema::CodeCompletePreprocessorMacroArgument | ( | Scope * | S, |
| IdentifierInfo * | Macro, | ||
| MacroInfo * | MacroInfo, | ||
| unsigned | Argument | ||
| ) |
Definition at line 7483 of file SemaCodeComplete.cpp.
| void Sema::CodeCompletePreprocessorMacroName | ( | bool | IsDefinition | ) |
Definition at line 7430 of file SemaCodeComplete.cpp.
References Builder, clang::CodeCompletionContext::CCC_MacroName, clang::CodeCompletionContext::CCC_MacroNameUse, clang::CCP_CodePattern, CXCursor_MacroDefinition, and HandleCodeCompleteResults().
| void Sema::CodeCompleteQualifiedId | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| bool | EnteringContext | ||
| ) |
Definition at line 4222 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Name, clang::CXXScopeSpec::getScopeRep(), HandleCodeCompleteResults(), clang::NestedNameSpecifier::isDependent(), LookupVisibleDecls(), and MaybeAddOverrideCalls().
| void Sema::CodeCompleteReturn | ( | Scope * | S | ) |
Definition at line 4139 of file SemaCodeComplete.cpp.
References clang::QualType::isNull().
Definition at line 3752 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_ClassOrStructTag, clang::CodeCompletionContext::CCC_EnumTag, clang::CodeCompletionContext::CCC_Other, clang::CodeCompletionContext::CCC_UnionTag, ContextKind, HandleCodeCompleteResults(), LookupVisibleDecls(), clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, and clang::DeclSpec::TST_union.
| void Sema::CodeCompleteTypeQualifiers | ( | DeclSpec & | DS | ) |
Definition at line 3800 of file SemaCodeComplete.cpp.
References clang::frontend::C11, clang::frontend::C99, clang::CodeCompletionContext::CCC_TypeQualifiers, clang::DeclSpec::getTypeQualifiers(), HandleCodeCompleteResults(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, and clang::DeclSpec::TQ_volatile.
| void Sema::CodeCompleteUsing | ( | Scope * | S | ) |
Definition at line 4264 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_PotentiallyQualifiedName, HandleCodeCompleteResults(), clang::Scope::isClassScope(), and LookupVisibleDecls().
| void Sema::CodeCompleteUsingDirective | ( | Scope * | S | ) |
Definition at line 4290 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, HandleCodeCompleteResults(), and LookupVisibleDecls().
| void Sema::CollectIvarsToConstructOrDestruct | ( | ObjCInterfaceDecl * | OI, |
| SmallVectorImpl< ObjCIvarDecl * > & | Ivars | ||
| ) |
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
Definition at line 4509 of file SemaDeclObjC.cpp.
References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), Context, clang::ASTContext::getBaseElementType(), clang::ObjCIvarDecl::getNextIvar(), and clang::Type::isRecordType().
Referenced by SetIvarInitializers().
| bool Sema::CollectMultipleMethodsInGlobalPool | ( | Selector | Sel, |
| SmallVectorImpl< ObjCMethodDecl * > & | Methods, | ||
| bool | instance | ||
| ) |
If no such method or only one method found, function returns false; otherwise, it returns true
Definition at line 3264 of file SemaDeclObjC.cpp.
References clang::ObjCMethodList::getNext(), MethodPool, and ReadMethodPool().
| void Sema::collectUnexpandedParameterPacks | ( | TemplateArgument | Arg, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given template argument.
| Arg | The template argument that will be traversed to find unexpanded parameter packs. |
Definition at line 373 of file SemaTemplateVariadic.cpp.
Referenced by checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), collectUnexpandedParameterPacks(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and SubstBaseSpecifiers().
| void Sema::collectUnexpandedParameterPacks | ( | TemplateArgumentLoc | Arg, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given template argument.
| Arg | The template argument that will be traversed to find unexpanded parameter packs. |
Definition at line 379 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | QualType | T, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given type.
| T | The type that will be traversed to find unexpanded parameter packs. |
Definition at line 385 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | TypeLoc | TL, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given type.
| TL | The type that will be traversed to find unexpanded parameter packs. |
Definition at line 390 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | CXXScopeSpec & | SS, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given nested-name-specifier.
| SS | The nested-name-specifier that will be traversed to find unexpanded parameter packs. |
Definition at line 395 of file SemaTemplateVariadic.cpp.
References clang::CXXScopeSpec::getScopeRep(), and clang::CXXScopeSpec::location_data().
| void Sema::collectUnexpandedParameterPacks | ( | const DeclarationNameInfo & | NameInfo, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded | ||
| ) |
Collect the set of unexpanded parameter packs within the given name.
| NameInfo | The name that will be traversed to find unexpanded parameter packs. |
Definition at line 406 of file SemaTemplateVariadic.cpp.
| Sema::ReferenceCompareResult Sema::CompareReferenceRelationship | ( | SourceLocation | Loc, |
| QualType | OrigT1, | ||
| QualType | OrigT2, | ||
| bool & | DerivedToBase, | ||
| bool & | ObjCConversion, | ||
| bool & | ObjCLifetimeConversion | ||
| ) |
CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are reference-related, reference-compatible, reference-compatible with added qualification, or incompatible, for use in C++ initialization by reference (C++ [dcl.ref.init]p4).
Neither type can be a reference type, and the first type (T1) is the pointee type of the reference type being initialized.
Definition at line 4064 of file SemaOverload.cpp.
References clang::ASTContext::canBindObjCObjectType(), clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::compatiblyIncludesObjCLifetime(), Context, clang::ASTContext::getCanonicalType(), clang::Qualifiers::getObjCLifetime(), clang::ASTContext::getQualifiedType(), clang::ASTContext::getUnqualifiedArrayType(), isCompleteType(), IsDerivedFrom(), isNonTrivialObjCLifetimeConversion(), clang::Type::isObjCObjectOrInterfaceType(), clang::Type::isReferenceType(), isTypeValid(), Ref_Compatible, Ref_Compatible_With_Added_Qualification, Ref_Incompatible, Ref_Related, and clang::Qualifiers::removeObjCLifetime().
Referenced by FindConversionForRefInit(), TryListConversion(), TryLValueToRValueCast(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().
| bool Sema::CompleteConstructorCall | ( | CXXConstructorDecl * | Constructor, |
| MultiExprArg | ArgsPtr, | ||
| SourceLocation | Loc, | ||
| SmallVectorImpl< Expr * > & | ConvertedArgs, | ||
| bool | AllowExplicit = false, |
||
| bool | IsListInitialization = false |
||
| ) |
Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor.
Definition at line 11470 of file SemaDeclCXX.cpp.
References DiagnoseSentinelCalls(), GatherArgumentsForCall(), clang::Type::getAs(), clang::FunctionProtoType::getNumParams(), clang::ValueDecl::getType(), clang::FunctionProtoType::isVariadic(), clang::NumArgs, VariadicConstructor, and VariadicDoesNotApply.
Referenced by BuildCXXCastArgument(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().
| void Sema::completeExprArrayBound | ( | Expr * | E | ) |
Definition at line 6420 of file SemaType.cpp.
References getASTMutationListener(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::Expr::IgnoreParens(), InstantiateVariableDefinition(), clang::SourceLocation::isInvalid(), clang::isTemplateInstantiation(), clang::VarTemplateSpecializationDecl::setPointOfInstantiation(), and clang::Expr::setType().
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), and RequireCompleteExprType().
| VarTemplateSpecializationDecl * Sema::CompleteVarTemplateSpecializationDecl | ( | VarTemplateSpecializationDecl * | VarSpec, |
| VarDecl * | PatternDecl, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Instantiates a variable template specialization by completing it with appropriate type information and initializer.
Definition at line 3587 of file SemaTemplateInstantiateDecl.cpp.
References clang::NamedDecl::getDeclName(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), InstantiateVariableInitializer(), clang::ValueDecl::setType(), and SubstType().
Referenced by InstantiateVariableDefinition().
| DeclContext * Sema::computeDeclContext | ( | QualType | T | ) |
Compute the DeclContext that is associated with the given type.
| T | the type for which we are attempting to find a DeclContext. |
Definition at line 55 of file SemaCXXScopeSpec.cpp.
References CurContext, clang::Type::getAs(), getCurrentInstantiationOf(), and clang::Type::isDependentType().
Referenced by ActOnCXXEnterDeclaratorScope(), ActOnCXXExitDeclaratorScope(), ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), ActOnPseudoDestructorExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), CheckUsingDeclQualifier(), emitEmptyLookupTypoDiagnostic(), GetFullTypeForDeclarator(), isCurrentClassName(), isCurrentClassNameTypo(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), LookupParsedName(), TryNamespaceTypoCorrection(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| DeclContext * Sema::computeDeclContext | ( | const CXXScopeSpec & | SS, |
| bool | EnteringContext = false |
||
| ) |
Compute the DeclContext that is associated with the given scope specifier.
| SS | the C++ scope specifier as it appears in the source |
| EnteringContext | when true, we will be entering the context of this scope specifier, so we can retrieve the declaration context of a class template or class template partial specialization even if it is not the current instantiation. |
SS, or NULL if the declaration context cannot be computed (e.g., because it is dependent and not the current instantiation). Definition at line 76 of file SemaCXXScopeSpec.cpp.
References Context, clang::Type::getAs(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::ASTContext::getCanonicalType(), getCurrentInstantiationOf(), clang::TagType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::NamespaceAliasDecl::getNamespace(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTranslationUnitDecl(), clang::NestedNameSpecifier::Global, clang::ASTContext::hasSameType(), clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::TemplateSpecializationType(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedCopyAssignmentExceptionSpec | ( | CXXMethodDecl * | MD | ) |
Determine what sort of exception specification a defautled copy assignment operator of a class will have, and whether the parameter will be const.
Definition at line 10000 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Type::castAs(), clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), LookupCopyingAssignment(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedCopyCtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |
Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const.
Definition at line 10834 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Type::castAs(), clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), LookupCopyingConstructor(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedDefaultCtorExceptionSpec | ( | SourceLocation | Loc, |
| CXXMethodDecl * | MD | ||
| ) |
Determine what sort of exception specification a defaulted copy constructor of a class will have.
Definition at line 8738 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::ImplicitExceptionSpecification::CalledExpr(), Context, clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::CXXMethodDecl::getParent(), clang::Decl::isInvalidDecl(), LookupDefaultConstructor(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedDtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |
Determine what sort of exception specification a defaulted destructor of a class will have.
Definition at line 9326 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::CXXMethodDecl::getParent(), clang::Decl::isInvalidDecl(), LookupDestructor(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedMoveAssignmentExceptionSpec | ( | CXXMethodDecl * | MD | ) |
Determine what sort of exception specification a defaulted move assignment operator of a class will have.
Definition at line 10398 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), LookupMovingAssignment(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedMoveCtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |
Determine what sort of exception specification a defaulted move constructor of a class will have.
Definition at line 11004 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::QualType::getCVRQualifiers(), clang::CXXMethodDecl::getParent(), clang::Decl::isInvalidDecl(), LookupMovingConstructor(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| Sema::ImplicitExceptionSpecification Sema::ComputeInheritingCtorExceptionSpec | ( | CXXConstructorDecl * | CD | ) |
Determine what sort of exception specification an inheriting constructor of a class will have.
Definition at line 8799 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::ImplicitExceptionSpecification::CalledExpr(), Context, clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::DeclaratorDecl::getLocStart(), clang::CXXMethodDecl::getParent(), clang::Decl::isInvalidDecl(), LookupDefaultConstructor(), and clang::CXXRecordDecl::vbases().
Referenced by computeImplicitExceptionSpec().
| void Sema::computeNRVO | ( | Stmt * | Body, |
| sema::FunctionScopeInfo * | Scope | ||
| ) |
Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.
Each of the variables that is subject to the named return value optimization will be marked as NRVO variables in the AST, and any return statement that has a marked NRVO variable as its NRVO candidate can use the named return value optimization.
This function applies a very simplistic algorithm for NRVO: if every return statement in the scope of a variable has the same NRVO candidate, that candidate is an NRVO variable.
Definition at line 10984 of file SemaDecl.cpp.
References E, I, and clang::sema::FunctionScopeInfo::Returns.
| bool Sema::containsUnexpandedParameterPacks | ( | Declarator & | D | ) |
Determine whether the given declarator contains any unexpanded parameter packs.
This routine is used by the parser to disambiguate function declarators with an ellipsis prior to the ')', e.g.,
To determine whether we have an (unnamed) function parameter pack or a variadic function.
Definition at line 699 of file SemaTemplateVariadic.cpp.
References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::NestedNameSpecifier::containsUnexpandedParameterPack(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::Declarator::getDeclSpec(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecType(), clang::Declarator::getNumTypeObjects(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::CXXScopeSpec::getScopeRep(), clang::DeclaratorChunk::FunctionTypeInfo::getTrailingReturnType(), clang::ValueDecl::getType(), clang::Declarator::getTypeObject(), clang::DeclSpec::getTypeSpecType(), clang::DeclaratorChunk::FunctionTypeInfo::hasTrailingReturnType(), I, clang::QualType::isNull(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Mem, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::FunctionTypeInfo::NoexceptExpr, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, clang::DeclaratorChunk::FunctionTypeInfo::NumExceptions, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::DeclaratorChunk::MemberPointerTypeInfo::Scope(), clang::TST_atomic, clang::TST_auto, clang::TST_auto_type, clang::TST_bool, clang::TST_char, clang::TST_char16, clang::TST_char32, clang::TST_class, clang::TST_decimal128, clang::TST_decimal32, clang::TST_decimal64, clang::TST_decltype, clang::TST_decltype_auto, clang::TST_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_half, clang::TST_int, clang::TST_int128, clang::TST_interface, clang::TST_struct, clang::TST_typename, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_underlyingType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, clang::TST_wchar, and clang::DeclaratorChunk::TypeAndRange::Ty.
| bool Sema::ConversionToObjCStringLiteralCheck | ( | QualType | DstType, |
| Expr *& | SrcExpr, | ||
| bool | Diagnose = true |
||
| ) |
Definition at line 11976 of file SemaExpr.cpp.
References BuildObjCStringLiteral(), clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::ObjCObjectPointerType::getInterfaceDecl(), getLangOpts(), clang::StringLiteral::getLocStart(), clang::Expr::IgnoreParenImpCasts(), clang::StringLiteral::isAscii(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::IdentifierInfo::isStr().
Referenced by CheckObjCARCConversion(), and clang::InitializationSequence::InitializeFrom().
| bool Sema::ConvertArgumentsForCall | ( | CallExpr * | Call, |
| Expr * | Fn, | ||
| FunctionDecl * | FDecl, | ||
| const FunctionProtoType * | Proto, | ||
| ArrayRef< Expr * > | Args, | ||
| SourceLocation | RParenLoc, | ||
| bool | IsExecConfig = false |
||
| ) |
ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto.
Call is the call expression itself, and Fn is the function expression. For a C++ member function, this routine does not attempt to convert the object argument. Returns true if the call is ill-formed.
Definition at line 4584 of file SemaExpr.cpp.
References clang::ASTContext::BuiltinInfo, Context, Diag(), clang::FunctionDecl::getBuiltinID(), clang::TypoCorrection::getCorrectionRange(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getLocStart(), clang::CallExpr::getLocStart(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Expr::getType(), clang::Builtin::Context::hasCustomTypechecking(), clang::Type::isBlockPointerType(), clang::FunctionProtoType::isVariadic(), clang::CallExpr::setArg(), clang::CallExpr::setNumArgs(), and TryTypoCorrectionForCall().
Referenced by BuildCallToMemberFunction().
| Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup | ( | Decl * | Ptr, |
| Decl * | OwnedType = nullptr |
||
| ) |
Definition at line 53 of file SemaDecl.cpp.
References Context, and clang::DeclGroupRef::Create().
| void clang::Sema::ConvertIntegerToTypeWarnOnOverflow | ( | llvm::APSInt & | OldVal, |
| unsigned | NewWidth, | ||
| bool | NewSign, | ||
| SourceLocation | Loc, | ||
| unsigned | DiagID | ||
| ) |
ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign.
If an overflow occurs, detect it and emit the specified diagnostic.
| ExprResult Sema::CorrectDelayedTyposInExpr | ( | Expr * | E, |
| VarDecl * | InitDecl = nullptr, |
||
| llvm::function_ref< ExprResult(Expr *)> | Filter = [](Expr *E) -> ExprResult { return E; } |
||
| ) |
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected.
| E | The Expr to check for TypoExprs. |
| InitDecl | A VarDecl to avoid because the Expr being corrected is its initializer. |
| Filter | A function applied to a newly rebuilt Expr to determine if it is an acceptable/usable result from a single combination of typo corrections. As long as the filter returns ExprError, different combinations of corrections will be tried until all are exhausted. |
Definition at line 6660 of file SemaExprCXX.cpp.
References E, ExprEvalContexts, clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
Referenced by ActOnConstantExpression(), ActOnFinishFullExpr(), BuildMemInitializer(), checkArgsForPlaceholders(), CheckPlaceholderExpr(), CorrectDelayedTyposInExpr(), and FinishForRangeVarDecl().
|
inline |
Definition at line 2877 of file Sema.h.
References CorrectDelayedTyposInExpr().
|
inline |
|
inline |
Definition at line 2890 of file Sema.h.
References CorrectDelayedTyposInExpr().
| TypoCorrection Sema::CorrectTypo | ( | const DeclarationNameInfo & | TypoName, |
| Sema::LookupNameKind | LookupKind, | ||
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| std::unique_ptr< CorrectionCandidateCallback > | CCC, | ||
| CorrectTypoKind | Mode, | ||
| DeclContext * | MemberContext = nullptr, |
||
| bool | EnteringContext = false, |
||
| const ObjCObjectPointerType * | OPT = nullptr, |
||
| bool | RecordFailure = true |
||
| ) |
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
| TypoName | the DeclarationNameInfo structure that contains the name that was present in the source code along with its location. |
| LookupKind | the name-lookup criteria used to search for the name. |
| S | the scope in which name lookup occurs. |
| SS | the nested-name-specifier that precedes the name we're looking for, if present. |
| CCC | A CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted. |
| MemberContext | if non-NULL, the context in which to look for a member access expression. |
| EnteringContext | whether we're entering the context described by the nested-name-specifier SS. |
| OPT | when non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of OPT. |
TypoCorrection containing the corrected name if the typo along with information such as the NamedDecl where the corrected name was declared, and any additional NestedNameSpecifier needed to access it (C++ only). The TypoCorrection is empty if there is no correction. Definition at line 4562 of file SemaLookup.cpp.
References checkCorrectionVisibility(), Consumer, clang::ExternalSemaSource::CorrectTypo(), CTK_ErrorRecovery, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationName::getAsString(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getEditDistance(), clang::DeclarationNameInfo::getLoc(), clang::IdentifierInfo::getName(), clang::DeclarationNameInfo::getName(), clang::TypoCorrection::isKeyword(), clang::Result, and clang::TypoCorrection::setCorrectionRange().
Referenced by actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOpenMPIdExpression(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnSuperClassOfClassInterface(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), DiagnoseInvalidRedeclaration(), FindProtocolDeclaration(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), TryNamespaceTypoCorrection(), and TryTypoCorrectionForCall().
| TypoExpr * Sema::CorrectTypoDelayed | ( | const DeclarationNameInfo & | TypoName, |
| Sema::LookupNameKind | LookupKind, | ||
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| std::unique_ptr< CorrectionCandidateCallback > | CCC, | ||
| TypoDiagnosticGenerator | TDG, | ||
| TypoRecoveryCallback | TRC, | ||
| CorrectTypoKind | Mode, | ||
| DeclContext * | MemberContext = nullptr, |
||
| bool | EnteringContext = false, |
||
| const ObjCObjectPointerType * | OPT = nullptr |
||
| ) |
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
| TypoName | the DeclarationNameInfo structure that contains the name that was present in the source code along with its location. |
| LookupKind | the name-lookup criteria used to search for the name. |
| S | the scope in which name lookup occurs. |
| SS | the nested-name-specifier that precedes the name we're looking for, if present. |
| CCC | A CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted. |
| TDG | A TypoDiagnosticGenerator functor that will be used to print diagnostics when the actual typo correction is attempted. |
| TRC | A TypoRecoveryCallback functor that will be used to build an Expr from a typo correction candidate. |
| MemberContext | if non-NULL, the context in which to look for a member access expression. |
| EnteringContext | whether we're entering the context described by the nested-name-specifier SS. |
| OPT | when non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of OPT. |
TypoExpr that will later be replaced in the AST with an Expr representing the result of performing typo correction, or nullptr if typo correction is not possible. If nullptr is returned, no diagnostics will be emitted and it is the responsibility of the caller to emit any that are needed. Definition at line 4698 of file SemaLookup.cpp.
References Consumer, CTK_ErrorRecovery, ExprEvalContexts, clang::DeclarationName::getAsIdentifierInfo(), clang::IdentifierInfo::getName(), and clang::DeclarationNameInfo::getName().
Referenced by LookupMemberExprInRecord().
| ExprResult Sema::CreateBuiltinArraySubscriptExpr | ( | Expr * | Base, |
| SourceLocation | LLoc, | ||
| Expr * | Idx, | ||
| SourceLocation | RLoc | ||
| ) |
Definition at line 4262 of file SemaExpr.cpp.
References clang::CK_ArrayToPointerDecay, Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::QualType::hasQualifiers(), clang::Type::isArrayType(), clang::QualType::isCForbiddenLValueType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), clang::OK_Ordinary, clang::OK_VectorComponent, clang::Result, clang::VK_LValue, and clang::VK_RValue.
Referenced by BuildImplicitMemberInitializer(), CreateOverloadedArraySubscriptExpr(), and performLambdaVarCaptureInitialization().
| ExprResult Sema::CreateBuiltinBinOp | ( | SourceLocation | OpLoc, |
| BinaryOperatorKind | Opc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) |
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
This routine only supports built-in operations; ActOnBinOp handles overloaded operators.
Definition at line 10435 of file SemaExpr.cpp.
References clang::BO_Add, clang::BO_AddAssign, clang::BO_And, clang::BO_AndAssign, clang::BO_Assign, clang::BO_Comma, clang::BO_Div, clang::BO_DivAssign, clang::BO_EQ, clang::BO_GE, clang::BO_GT, clang::BO_LAnd, clang::BO_LE, clang::BO_LOr, clang::BO_LT, clang::BO_Mul, clang::BO_MulAssign, clang::BO_NE, clang::BO_Or, clang::BO_OrAssign, clang::BO_PtrMemD, clang::BO_PtrMemI, clang::BO_Rem, clang::BO_RemAssign, clang::BO_Shl, clang::BO_ShlAssign, clang::BO_Shr, clang::BO_ShrAssign, clang::BO_Sub, clang::BO_SubAssign, clang::BO_Xor, clang::BO_XorAssign, CheckCommaOperands(), checkObjCPointerIntrospection(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), DiagnoseDirectIsaAccess(), DiagnoseSelfAssignment(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), getDeclFromExpr(), clang::Expr::getExprLoc(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isAtomicType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OK_ObjCProperty, clang::OK_Ordinary, RecordModifiableNonNullParam(), clang::VK_LValue, and clang::VK_RValue.
Referenced by ActOnOpenMPReductionClause(), buildSingleCopyAssignRecursively(), and CreateOverloadedBinOp().
| ExprResult Sema::CreateBuiltinUnaryOp | ( | SourceLocation | OpLoc, |
| UnaryOperatorKind | Opc, | ||
| Expr * | InputExpr | ||
| ) |
Definition at line 10954 of file SemaExpr.cpp.
References clang::VectorType::AltiVecBool, clang::ASTContext::BoolTy, CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckRealImagOperand(), clang::CK_FloatingCast, Context, clang::frontend::CPlusPlus, Diag(), clang::ExprError(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), getElementType(), clang::ASTContext::getLangOpts(), clang::ASTContext::getLogicalOperationType(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Type::hasIntegerRepresentation(), Input, clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::Type::isAtomicType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::Type::isDependentType(), clang::Type::isExtVectorType(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isScalarType(), isScopedEnumerationType(), clang::Type::isVectorType(), clang::OK_Ordinary, RecordModifiableNonNullParam(), clang::UO_AddrOf, clang::UO_Coawait, clang::UO_Deref, clang::UO_Extension, clang::UO_Imag, clang::UO_LNot, clang::UO_Minus, clang::UO_Not, clang::UO_Plus, clang::UO_PostDec, clang::UO_PostInc, clang::UO_PreDec, clang::UO_PreInc, clang::UO_Real, and clang::VK_RValue.
Referenced by BuildEmptyCXXFoldExpr(), CreateOverloadedUnaryOp(), DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), and DefineImplicitMoveAssignment().
| RecordDecl * Sema::CreateCapturedStmtRecordDecl | ( | CapturedDecl *& | CD, |
| SourceLocation | Loc, | ||
| unsigned | NumParams | ||
| ) |
Definition at line 3761 of file SemaStmt.cpp.
References clang::DeclContext::addDecl(), Context, clang::frontend::CPlusPlus, clang::CXXRecordDecl::Create(), clang::RecordDecl::Create(), clang::CapturedDecl::Create(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), clang::DeclContext::isRecord(), clang::RecordDecl::setCapturedRecord(), clang::Decl::setImplicit(), clang::TagDecl::startDefinition(), and clang::TTK_Struct.
| ExprResult Sema::CreateGenericSelectionExpr | ( | SourceLocation | KeyLoc, |
| SourceLocation | DefaultLoc, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | ControllingExpr, | ||
| ArrayRef< TypeSourceInfo * > | Types, | ||
| ArrayRef< Expr * > | Exprs | ||
| ) |
Definition at line 1357 of file SemaExpr.cpp.
References clang::Expr::containsUnexpandedParameterPack(), Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::HasSideEffects(), I, clang::Expr::IgnoreParens(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ASTContext::typesAreCompatible(), and Unevaluated.
| void Sema::createImplicitModuleImportForErrorRecovery | ( | SourceLocation | Loc, |
| Module * | Mod | ||
| ) |
Create an implicit import of the given module at the given source location, for error recovery, if possible.
This routine is typically used when an entity found by name lookup is actually hidden within a module that we know about but the user has forgotten to import.
Definition at line 14737 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::Module::AllVisible, Consumer, clang::ImportDecl::CreateImplicit(), getASTContext(), getLangOpts(), getModuleLoader(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTConsumer::HandleImplicitImportDecl(), isSFINAEContext(), clang::ModuleLoader::makeModuleVisible(), and clang::VisibleModuleSet::setVisible().
Referenced by diagnoseMissingImport().
| CXXRecordDecl * Sema::createLambdaClosureType | ( | SourceRange | IntroducerRange, |
| TypeSourceInfo * | Info, | ||
| bool | KnownDependent, | ||
| LambdaCaptureDefault | CaptureDefault | ||
| ) |
Create a new lambda closure type.
Definition at line 243 of file SemaLambda.cpp.
References clang::DeclContext::addDecl(), Context, clang::CXXRecordDecl::CreateLambda(), clang::SourceRange::getBegin(), getGenericLambdaTemplateParameterList(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isRecord().
| VarDecl * Sema::createLambdaInitCaptureVarDecl | ( | SourceLocation | Loc, |
| QualType | InitCaptureType, | ||
| IdentifierInfo * | Id, | ||
| unsigned | InitStyle, | ||
| Expr * | Init | ||
| ) |
Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.
CodeGen handles emission of lambda captures, ignoring these dummy variables appropriately.
Definition at line 766 of file SemaLambda.cpp.
References Context, clang::VarDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Decl::markUsed(), clang::SC_Auto, clang::VarDecl::setInit(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), and clang::Decl::setReferenced().
| ExprResult Sema::CreateOverloadedArraySubscriptExpr | ( | SourceLocation | LLoc, |
| SourceLocation | RLoc, | ||
| Expr * | Base, | ||
| Expr * | Idx | ||
| ) |
Definition at line 11789 of file SemaOverload.cpp.
References AA_Passing, AddBuiltinOperatorCandidates(), AddMemberOperatorCandidates(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::UnresolvedLookupExpr::Create(), CreateBuiltinArraySubscriptExpr(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), clang::OverloadCandidateSet::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::OverloadCandidateSet::size(), and clang::VK_RValue.
| ExprResult Sema::CreateOverloadedBinOp | ( | SourceLocation | OpLoc, |
| BinaryOperatorKind | Opc, | ||
| const UnresolvedSetImpl & | Fns, | ||
| Expr * | LHS, | ||
| Expr * | RHS | ||
| ) |
Create a binary operation that may resolve to an overloaded operator.
| OpLoc | The location of the operator itself (e.g., '+'). |
| Opc | The BinaryOperatorKind that describes this operator. |
| Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedBinOp(). |
| LHS | Left-hand argument. |
| RHS | Right-hand argument. |
Definition at line 11517 of file SemaOverload.cpp.
References AA_Passing, AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddFunctionCandidates(), AddMemberOperatorCandidates(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::BO_Assign, clang::BO_Comma, clang::BO_OrAssign, clang::BO_PtrMemD, CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::UnresolvedLookupExpr::Create(), CreateBuiltinBinOp(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), DiagnoseSelfMove(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::FPOptions::fp_contract, FPFeatures, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getRecordType(), clang::FunctionDecl::getReturnType(), getSpecialMember(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), isImplicitlyDeleted(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), IsOverloaded(), isRecordType(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), NoteDeletedFunction(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OK_ObjCProperty, clang::OK_Ordinary, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::Result, clang::OverloadCandidateSet::size(), VariadicDoesNotApply, clang::VK_LValue, and clang::VK_RValue.
Referenced by BuildOverloadedBinOp().
| ExprResult Sema::CreateOverloadedUnaryOp | ( | SourceLocation | OpLoc, |
| UnaryOperatorKind | Opc, | ||
| const UnresolvedSetImpl & | Fns, | ||
| Expr * | Input | ||
| ) |
Create a unary operation that may resolve to an overloaded operator.
| OpLoc | The location of the operator itself (e.g., '*'). |
| Opc | The UnaryOperatorKind that describes this operator. |
| Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedUnaryOp(). |
| Input | The input argument. |
Definition at line 11332 of file SemaOverload.cpp.
References AA_Passing, AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddFunctionCandidates(), AddMemberOperatorCandidates(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::IntegerLiteral::Create(), clang::UnresolvedLookupExpr::Create(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::UnaryOperator::getOpcodeStr(), clang::UnaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), Input, clang::ASTContext::IntTy, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), IsOverloaded(), clang::Expr::isTypeDependent(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::NumArgs, clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OK_Ordinary, clang::OO_None, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::OverloadCandidateSet::size(), clang::UO_PostDec, clang::UO_PostInc, and clang::VK_RValue.
Referenced by buildOperatorCoawaitCall().
| ParsedType Sema::CreateParsedType | ( | QualType | T, |
| TypeSourceInfo * | TInfo | ||
| ) |
Package the given type and TSI into a ParsedType.
Create a LocInfoType to hold the given QualType and TypeSourceInfo.
Definition at line 4944 of file SemaType.cpp.
References BumpAlloc, clang::Type::getTypeClass(), clang::OpaquePtr< QualType >::make(), and clang::TypeAlignment.
Referenced by ActOnObjCInstanceType(), actOnObjCTypeArgsAndProtocolQualifiers(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnPackExpansion(), ActOnSuperClassOfClassInterface(), ActOnTypeName(), buildNestedType(), getObjCMessageKind(), RebuildDeclaratorInCurrentInstantiation(), and recoverFromTypeInKnownDependentBase().
| ObjCPropertyDecl * Sema::CreatePropertyDecl | ( | Scope * | S, |
| ObjCContainerDecl * | CDecl, | ||
| SourceLocation | AtLoc, | ||
| SourceLocation | LParenLoc, | ||
| FieldDeclarator & | FD, | ||
| Selector | GetterSel, | ||
| Selector | SetterSel, | ||
| const bool | isReadWrite, | ||
| const unsigned | Attributes, | ||
| const unsigned | AttributesAsWritten, | ||
| QualType | T, | ||
| TypeSourceInfo * | TSI, | ||
| tok::ObjCKeywordKind | MethodImplKind, | ||
| DeclContext * | lexicalDC = nullptr |
||
| ) |
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface.
Definition at line 555 of file SemaObjCProperty.cpp.
References clang::DeclContext::addDecl(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), Context, clang::ObjCPropertyDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FieldDeclarator::D, Diag(), clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_getter, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_null_resettable, clang::ObjCDeclSpec::DQ_PR_nullability, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_setter, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::ObjCPropertyDecl::findPropertyDecl(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::TypeLoc::getLocEnd(), getLocForEndOfToken(), clang::TypeLoc::getLocStart(), clang::ASTContext::getObjCObjectPointerType(), getOwnershipRule(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::Idents, clang::Type::isObjCObjectType(), clang::Type::isObjCRetainableType(), LookupProtocol(), makePropertyAttributesAsWritten(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_assign, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_getter, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_null_resettable, clang::ObjCPropertyDecl::OBJC_PR_nullability, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_setter, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::ObjCPropertyDecl::OBJC_PR_unsafe_unretained, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::ObjCPropertyDecl::Optional, ProcessDeclAttributes(), and clang::ObjCPropertyDecl::Required.
Referenced by ActOnProperty(), and HandlePropertyInClassExtension().
| ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | TypeSourceInfo * | TInfo, |
| SourceLocation | OpLoc, | ||
| UnaryExprOrTypeTrait | ExprKind, | ||
| SourceRange | R | ||
| ) |
Build a sizeof or alignof expression given a type operand.
Definition at line 3878 of file SemaExpr.cpp.
References captureVariablyModifiedType(), Context, clang::ExprError(), clang::Type::getAs(), clang::SourceRange::getEnd(), clang::ASTContext::getSizeType(), clang::TypeSourceInfo::getType(), clang::if(), clang::Type::isDependentType(), and clang::Type::isVariablyModifiedType().
| ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | Expr * | E, |
| SourceLocation | OpLoc, | ||
| UnaryExprOrTypeTrait | ExprKind | ||
| ) |
Build a sizeof or alignof expression given an expression operand.
Definition at line 3913 of file SemaExpr.cpp.
References CheckAlignOfExpr(), Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Type::isVariableArrayType(), clang::Expr::refersToBitField(), clang::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, clang::UETT_SizeOf, and clang::UETT_VecStep.
| QualType Sema::CXXCheckConditionalOperands | ( | ExprResult & | Cond, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| ExprValueKind & | VK, | ||
| ExprObjectKind & | OK, | ||
| SourceLocation | QuestionLoc | ||
| ) |
Check the operands of ?: under C++ semantics.
See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y extension. In this case, LHS == Cond. (But they're not aliases.)
Definition at line 4828 of file SemaExprCXX.cpp.
References CheckCXXBooleanCondition(), CheckVectorOperands(), clang::CK_NoOp, Context, ConvertForConditional(), DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseConditionalForNull(), FindCompositeObjCPointerType(), FindCompositePointerType(), FindConditionalOverload(), clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getCanonicalType(), clang::QualType::getCVRQualifiers(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Type::isRecordType(), isSFINAEContext(), clang::Qualifiers::isStrictSupersetOf(), clang::Expr::isTypeDependent(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::OK_BitField, clang::OK_Ordinary, PerformCopyInitialization(), PrepareScalarCast(), RequireNonAbstractType(), TryClassUnification(), UsualArithmeticConversions(), clang::VK_RValue, and clang::ASTContext::VoidTy.
DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias.
Definition at line 5614 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, CurContext, DeclClonePragmaWeak(), clang::WeakInfo::getAlias(), clang::NamedDecl::getIdentifier(), clang::WeakInfo::getLocation(), clang::IdentifierInfo::getName(), clang::ASTContext::getTranslationUnitDecl(), clang::WeakInfo::getUsed(), PushOnScopeChains(), clang::Decl::setDeclContext(), clang::Decl::setLexicalDeclContext(), clang::WeakInfo::setUsed(), and WeakTopLevelDecl.
Referenced by ActOnPragmaWeakAlias(), and ProcessPragmaWeak().
| void Sema::DeclareGlobalAllocationFunction | ( | DeclarationName | Name, |
| QualType | Return, | ||
| QualType | Param1, | ||
| QualType | Param2 = QualType(), |
||
| bool | AddRestrictAttr = false |
||
| ) |
DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist.
Definition at line 2142 of file SemaExprCXX.cpp.
References clang::Decl::addAttr(), clang::DeclContext::addDecl(), clang::DeclContextLookupResult::begin(), Context, clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::DeclContextLookupResult::end(), clang::EST_BasicNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::ASTContext::getCanonicalType(), clang::DeclarationName::getCXXOverloadedOperator(), clang::ASTContext::getFunctionType(), getLangOpts(), getStdBadAlloc(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTypeDeclType(), I, IdResolver, clang::QualType::isNull(), clang::DeclContext::lookup(), clang::SC_None, clang::Decl::setImplicit(), StdBadAlloc, clang::IdentifierResolver::tryAddTopLevelDecl(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by DeclareGlobalNewDelete().
| void Sema::DeclareGlobalNewDelete | ( | ) |
DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
These are:
Note that the placement and nothrow forms of new are not implicitly declared. Their use requires including <new>.
Definition at line 2067 of file SemaExprCXX.cpp.
References Context, clang::frontend::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::ASTContext::DeclarationNames, DeclareGlobalAllocationFunction(), clang::IdentifierTable::get(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Preprocessor::getIdentifierTable(), getLangOpts(), getOrCreateStdNamespace(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), getStdBadAlloc(), GlobalNewDeleteDeclared, PP, clang::Decl::setImplicit(), StdBadAlloc, clang::TTK_Class, and clang::ASTContext::VoidTy.
Referenced by FindAllocationFunctions(), and FindUsualDeallocationFunction().
| CXXMethodDecl * Sema::DeclareImplicitCopyAssignment | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit copy assignment operator for the given class.
| ClassDecl | The class declaration into which the implicit copy assignment operator will be added. |
Definition at line 10055 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), AddOverriddenMethods(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXMethodDecl::Create(), CXXCopyAssignment, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::QualType::withConst().
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and LookupSpecialMember().
| CXXConstructorDecl * Sema::DeclareImplicitCopyConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit copy constructor for the given class.
| ClassDecl | The class declaration into which the implicit copy constructor will be added. |
Definition at line 10879 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXConstructorDecl::Create(), CXXCopyConstructor, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::ASTContext::NumImplicitCopyConstructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), clang::ASTContext::VoidTy, and clang::QualType::withConst().
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), LookupConstructors(), and LookupSpecialMember().
| CXXConstructorDecl * Sema::DeclareImplicitDefaultConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit default constructor for the given class.
| ClassDecl | The class declaration into which the implicit default constructor will be added. |
Definition at line 8890 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, Context, clang::CXXConstructorDecl::Create(), CXXDefaultConstructor, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::None, clang::ASTContext::NumImplicitDefaultConstructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), and clang::ASTContext::VoidTy.
Referenced by DeclareImplicitMemberFunctionsWithName(), findTrivialSpecialMember(), LookupConstructors(), and LookupSpecialMember().
| CXXDestructorDecl * Sema::DeclareImplicitDestructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit destructor for the given class.
| ClassDecl | The class declaration into which the implicit destructor will be added. |
Definition at line 9364 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), AddOverriddenMethods(), clang::AS_public, clang::CXXDestructorDecl::Create(), CXXDestructor, clang::ASTContext::DeclarationNames, clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXDestructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialDestructor(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::None, clang::ASTContext::NumImplicitDestructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), and clang::ASTContext::VoidTy.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), findTrivialSpecialMember(), and LookupSpecialMember().
| CXXMethodDecl * Sema::DeclareImplicitMoveAssignment | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit move assignment operator for the given class.
| ClassDecl | The Class declaration into which the implicit move assignment operator will be added. |
Definition at line 10450 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), AddOverriddenMethods(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXMethodDecl::Create(), CXXMoveAssignment, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::CXXRecordDecl::setImplicitMoveAssignmentIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), and SpecialMemberIsTrivial().
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and LookupSpecialMember().
| CXXConstructorDecl * Sema::DeclareImplicitMoveConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit move constructor for the given class.
| ClassDecl | The Class declaration into which the implicit move constructor will be added. |
Definition at line 11062 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXConstructorDecl::Create(), CXXMoveConstructor, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::ASTContext::NumImplicitMoveConstructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::CXXRecordDecl::setImplicitMoveConstructorIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::ASTContext::VoidTy.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), LookupConstructors(), and LookupSpecialMember().
| void Sema::DeclareInheritingConstructors | ( | CXXRecordDecl * | ClassDecl | ) |
Declare all inheriting constructors for the given class.
| ClassDecl | The class declaration into which the inheriting constructors will be added. |
Definition at line 9274 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), I, and clang::DeclContext::isDependentContext().
Referenced by CheckCompletedCXXClass().
| NamedDecl * Sema::DeclClonePragmaWeak | ( | NamedDecl * | ND, |
| IdentifierInfo * | II, | ||
| SourceLocation | Loc | ||
| ) |
DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition decl and source may not have one.
Definition at line 5566 of file SemaDeclAttr.cpp.
References BuildParmVarDeclForTypedef(), clang::VarDecl::Create(), clang::FunctionDecl::Create(), clang::Type::getAs(), clang::SC_None, clang::DeclaratorDecl::setQualifierInfo(), and clang::ParmVarDecl::setScopeInfo().
Referenced by DeclApplyPragmaWeak().
| void Sema::DecomposeUnqualifiedId | ( | const UnqualifiedId & | Id, |
| TemplateArgumentListInfo & | Buffer, | ||
| DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo *& | TemplateArgs | ||
| ) |
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments.
If this produces template arguments, it is permitted to call DecomposeTemplateName.
This actually loses a lot of source location information for non-standard name kinds; we should consider preserving that in some way.
Definition at line 1740 of file SemaExpr.cpp.
References Buffer, Context, clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getKind(), clang::ASTContext::getNameForTemplate(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::UnqualifiedId::IK_TemplateId, clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.
| Sema::DeduceAutoResult Sema::DeduceAutoType | ( | TypeSourceInfo * | AutoType, |
| Expr *& | Initializer, | ||
| QualType & | Result | ||
| ) |
Definition at line 3990 of file SemaTemplateDeduction.cpp.
References clang::TypeSourceInfo::getTypeLoc(), and clang::Result.
Referenced by BuildCXXNew(), and FinishForRangeVarDecl().
| Sema::DeduceAutoResult Sema::DeduceAutoType | ( | TypeLoc | Type, |
| Expr *& | Init, | ||
| QualType & | Result | ||
| ) |
Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)
| Type | the type pattern using the auto type-specifier. |
| Init | the initializer for the variable whose type is to be deduced. |
| Result | if type deduction was successful, this will be set to the deduced type. |
Definition at line 4001 of file SemaTemplateDeduction.cpp.
References AdjustFunctionParmAndArgTypesForDeduction(), BuildDecltypeType(), BuildStdInitializerList(), CheckOriginalCallArgDeduction(), CheckPlaceholderExpr(), Context, clang::TemplateTypeParmDecl::Create(), DAR_Failed, DAR_FailedAlreadyDiagnosed, DAR_Succeeded, DeduceTemplateArgumentByListElement(), DeduceTemplateArgumentsByTypeMatch(), clang::ASTContext::DependentTy, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::FixedSizeTemplateParameterListStorage< N >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Expr::getExprLoc(), clang::InitListExpr::getInit(), getKind(), getLangOpts(), clang::InitListExpr::getNumInits(), clang::TypeLoc::getType(), clang::Expr::getType(), clang::TypeDecl::getTypeForDecl(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::Expr::refersToBitField(), and clang::TemplateArgument::Type.
| void Sema::deduceClosureReturnType | ( | sema::CapturingScopeInfo & | CSI | ) |
Deduce a block or lambda's return type based on the return statements present in the body.
Definition at line 616 of file SemaLambda.cpp.
References adjustBlockReturnsToEnum(), Context, Diag(), E, findCommonEnumForBlockReturns(), clang::ASTContext::getCanonicalFunctionResultType(), clang::ReturnStmt::getLocStart(), clang::ReturnStmt::getRetValue(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, I, clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isUndeducedType(), clang::sema::FunctionScopeInfo::Returns, clang::sema::CapturingScopeInfo::ReturnType, and clang::ASTContext::VoidTy.
| bool Sema::DeduceFunctionTypeFromReturnExpr | ( | FunctionDecl * | FD, |
| SourceLocation | ReturnLoc, | ||
| Expr *& | RetExpr, | ||
| AutoType * | AT | ||
| ) |
Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6.
Definition at line 3006 of file SemaStmt.cpp.
References clang::ASTContext::adjustDeducedFunctionResultType(), Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalFunctionResultType(), clang::Type::getContainedAutoType(), clang::AutoType::getDeducedType(), clang::Expr::getExprLoc(), clang::TypeLoc::getType(), clang::Expr::getType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::AutoType::isDecltypeAuto(), clang::AutoType::isDeduced(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), and clang::ASTContext::VoidTy.
| bool Sema::DeduceReturnType | ( | FunctionDecl * | FD, |
| SourceLocation | Loc, | ||
| bool | Diagnose = true |
||
| ) |
Definition at line 4146 of file SemaTemplateDeduction.cpp.
References Diag(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), InstantiateFunctionDefinition(), clang::Decl::isInvalidDecl(), and clang::Type::isUndeducedType().
Referenced by AddConversionCandidate(), DeduceTemplateArguments(), GetTypeOfFunction(), ResolveSingleFunctionTemplateSpecialization(), and SpecializeCorrespondingLambdaCallOperatorAndInvoker().
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | ClassTemplatePartialSpecializationDecl * | Partial, |
| const TemplateArgumentList & | TemplateArgs, | ||
| sema::TemplateDeductionInfo & | Info | ||
| ) |
Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match].
Definition at line 2241 of file SemaTemplateDeduction.cpp.
References FinishTemplateArgumentDeduction(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::Result, clang::TemplateParameterList::size(), TDK_InstantiationDepth, TDK_Invalid, TDK_SubstitutionFailure, and Unevaluated.
Referenced by AddMethodTemplateCandidate(), AddTemplateConversionCandidate(), AddTemplateOverloadCandidate(), DeduceTemplateArguments(), FindAllocationFunctions(), InstantiateClassTemplateSpecialization(), LookupDirect(), ResolveOverloadForDeduction(), and ResolveSingleFunctionTemplateSpecialization().
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | VarTemplatePartialSpecializationDecl * | Partial, |
| const TemplateArgumentList & | TemplateArgs, | ||
| sema::TemplateDeductionInfo & | Info | ||
| ) |
Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match].
TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type.
Definition at line 2407 of file SemaTemplateDeduction.cpp.
References DeduceTemplateArguments(), FinishTemplateArgumentDeduction(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplatePartialSpecializationDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::Result, clang::TemplateParameterList::size(), TDK_InstantiationDepth, TDK_Invalid, TDK_SubstitutionFailure, and Unevaluated.
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate, |
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| ArrayRef< Expr * > | Args, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| bool | PartialOverloading = false |
||
| ) |
Perform template argument deduction from a function call (C++ [temp.deduct.call]).
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicit template arguments provided for this call. |
| Args | the function call arguments |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
Definition at line 3335 of file SemaTemplateDeduction.cpp.
References AdjustFunctionParmAndArgTypesForDeduction(), DeduceFromInitializerList(), DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::Type::getAs(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::PackExpansionType::getPattern(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::Expr::getType(), clang::ValueDecl::getType(), hasDeducibleTemplateParameters(), I, clang::Decl::isInvalidDecl(), clang::FunctionProtoType::isTemplateVariadic(), clang::FunctionProtoType::isVariadic(), clang::Result, clang::TemplateParameterList::size(), SubstituteExplicitTemplateArguments(), TDK_Invalid, TDK_TooFewArguments, TDK_TooManyArguments, and TooManyArguments().
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate, |
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| QualType | ArgFunctionType, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| bool | InOverloadResolution = false |
||
| ) |
Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| ArgFunctionType | the function type that will be used as the "argument" type (A) when performing template argument deduction from the function template's function type. This type may be NULL, if there is no argument type to compare against, in C++0x [temp.arg.explicit]p3. |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
Definition at line 3572 of file SemaTemplateDeduction.cpp.
References adjustCCAndNoReturn(), Context, DeduceReturnType(), DeduceTemplateArgumentsByTypeMatch(), clang::ASTContext::DependentTy, FinishTemplateArgumentDeduction(), clang::ASTContext::getCanonicalType(), clang::Type::getContainedAutoType(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), isSameOrCompatibleFunctionType(), clang::Type::isUndeducedType(), clang::Result, clang::TemplateParameterList::size(), SubstAutoType(), SubstituteExplicitTemplateArguments(), clang::TDF_InOverloadResolution, clang::TDF_TopLevelParameterTypeList, TDK_Invalid, TDK_MiscellaneousDeductionFailure, TDK_Success, and Unevaluated.
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | ConversionTemplate, |
| QualType | ToType, | ||
| CXXConversionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info | ||
| ) |
Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.
Definition at line 3774 of file SemaTemplateDeduction.cpp.
References Context, DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::CXXConversionDecl::getConversionType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), clang::isLambdaConversionOperator(), clang::Type::isMemberPointerType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), P, clang::Result, clang::TemplateParameterList::size(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::TDF_IgnoreQualifiers, clang::TDF_ParamWithReferenceType, TDK_Invalid, TDK_Success, and Unevaluated.
| Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate, |
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| bool | InOverloadResolution = false |
||
| ) |
Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
Definition at line 3926 of file SemaTemplateDeduction.cpp.
References DeduceTemplateArguments().
| QualType Sema::deduceVarTypeFromInitializer | ( | VarDecl * | VDecl, |
| DeclarationName | Name, | ||
| QualType | Type, | ||
| TypeSourceInfo * | TSI, | ||
| SourceRange | Range, | ||
| bool | DirectInit, | ||
| Expr * | Init | ||
| ) |
Definition at line 9101 of file SemaDecl.cpp.
References Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getObjCIdType(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::VarDecl::isInitCapture(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Result, and clang::ASTContext::UnknownAnyTy.
| ExprResult Sema::DefaultArgumentPromotion | ( | Expr * | E | ) |
DefaultArgumentPromotion (C99 6.5.2.2p6).
Used for function calls that do not have a prototype. Arguments that have type float or __fp16 are promoted to double. All other argument types are converted by UsualUnaryConversions().
Definition at line 798 of file SemaExpr.cpp.
References clang::CK_FloatingCast, Context, clang::frontend::CPlusPlus, clang::ASTContext::DoubleTy, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::BuiltinType::getKind(), clang::Expr::getType(), clang::InitializedEntity::InitializeTemporary(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().
Referenced by CheckMessageArgumentTypes(), and checkUnknownAnyArg().
| ExprResult Sema::DefaultFunctionArrayConversion | ( | Expr * | E, |
| bool | Diagnose = true |
||
| ) |
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
Definition at line 497 of file SemaExpr.cpp.
References checkAddressOfFunctionIsAvailable(), clang::CK_ArrayToPointerDecay, clang::CK_FunctionToPointerDecay, Context, Diag(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::Expr::getExprLoc(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isLValue(), clang::QualType::isNull(), and clang::Type::isPlaceholderType().
Referenced by IgnoredValueConversions(), isNullPointerValueTemplateArgument(), LookupMemberExpr(), and rebuildUnknownAnyFunction().
| ExprResult Sema::DefaultFunctionArrayLvalueConversion | ( | Expr * | E, |
| bool | Diagnose = true |
||
| ) |
Definition at line 715 of file SemaExpr.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by BuildInstanceMessage(), CheckBooleanCondition(), CheckCommaOperands(), CXXCheckConditionalOperands(), IgnoredValueConversions(), OpenCLArithmeticConversions(), OpenCLCheckVectorConditional(), ResolveAndFixSingleFunctionTemplateSpecialization(), and rewriteBuiltinFunctionDecl().
| ExprResult Sema::DefaultLvalueConversion | ( | Expr * | E | ) |
Definition at line 618 of file SemaExpr.cpp.
References CheckForNullPointerDereference(), clang::CK_AtomicToNonAtomic, clang::CK_LValueToRValue, Context, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), DiagnoseDirectIsaAccess(), E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::Expr::getExprLoc(), clang::QualType::getObjCLifetime(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::Type::isDependentType(), clang::Expr::isGLValue(), clang::Type::isHalfType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isPlaceholderType(), clang::Type::isRecordType(), clang::Type::isVoidType(), clang::Qualifiers::OCL_Weak, clang::ASTContext::OverloadTy, and clang::VK_RValue.
Referenced by ActOnCXXDelete(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLinearClause(), BuildArrayType(), BuildImplicitMemberInitializer(), CheckObjCCollectionLiteralElement(), CheckPointerToMemberOperands(), CheckRealImagOperand(), finishContextualImplicitConversion(), IgnoredValueConversions(), LookupMemberExpr(), PerformContextualImplicitConversion(), PerformImplicitConversion(), and performLambdaVarCaptureInitialization().
| void Sema::DefaultSynthesizeProperties | ( | Scope * | S, |
| ObjCImplDecl * | IMPDecl, | ||
| ObjCInterfaceDecl * | IDecl | ||
| ) |
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation.
Default synthesizes all properties which must be synthesized in class's @implementation.
Definition at line 1633 of file SemaObjCProperty.cpp.
References ActOnPropertyImplDecl(), clang::ObjCInterfaceDecl::collectPropertiesToImplement(), CollectSuperClassPropertyImplementations(), Context, Diag(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::Decl::getDeclContext(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyImplementation(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::Optional, and SuperClassImplementsProperty().
Referenced by DefaultSynthesizeProperties().
Definition at line 1718 of file SemaObjCProperty.cpp.
References DefaultSynthesizeProperties(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCRuntime::isFragile(), LangOpts, and clang::LangOptions::ObjCRuntime.
| ExprResult Sema::DefaultVariadicArgumentPromotion | ( | Expr * | E, |
| VariadicCallType | CT, | ||
| FunctionDecl * | FDecl | ||
| ) |
DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type.
Definition at line 933 of file SemaExpr.cpp.
References clang::prec::Comma, clang::frontend::CPlusPlus, E, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Name, clang::None, and clang::UnqualifiedId::setIdentifier().
Referenced by BuildCallToObjectOfClassType(), and CheckMessageArgumentTypes().
| void Sema::DefineImplicitCopyAssignment | ( | SourceLocation | CurrentLocation, |
| CXXMethodDecl * | MethodDecl | ||
| ) |
Defines an implicitly-declared copy assignment operator.
Definition at line 10180 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), clang::frontend::CPlusPlus11, CreateBuiltinUnaryOp(), CXXCopyAssignment, Diag(), diagnoseDeprecatedCopyOperation(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), getCurrentThisType(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isImplicit(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::FieldDecl::isUnnamedBitfield(), clang::SourceLocation::isValid(), LookupMemberName, clang::Decl::markUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, and clang::VK_LValue.
Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineImplicitCopyConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor | ||
| ) |
DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor.
Definition at line 10955 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), clang::Type::castAs(), clang::frontend::CPlusPlus11, CXXCopyConstructor, Diag(), diagnoseDeprecatedCopyOperation(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), getASTMutationListener(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::CXXConstructorDecl::isCopyConstructor(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isImplicit(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), MarkVTableUsed(), clang::None, ResolveExceptionSpec(), clang::FunctionDecl::setBody(), SetCtorInitializers(), and clang::Decl::setInvalidDecl().
Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineImplicitDefaultConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor | ||
| ) |
DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.
Definition at line 8951 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), Context, CXXDefaultConstructor, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), getASTMutationListener(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), MarkVTableUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), SetCtorInitializers(), and clang::Decl::setInvalidDecl().
Referenced by MarkFunctionReferenced(), PerformConstructorInitialization(), and SetDeclDefaulted().
| void Sema::DefineImplicitDestructor | ( | SourceLocation | CurrentLocation, |
| CXXDestructorDecl * | Destructor | ||
| ) |
DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor.
Definition at line 9420 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckDestructor(), CXXDestructor, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), getASTMutationListener(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), MarkBaseAndMemberDestructorsReferenced(), clang::Decl::markUsed(), MarkVTableUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), and clang::Decl::setInvalidDecl().
Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineImplicitLambdaToBlockPointerConversion | ( | SourceLocation | CurrentLoc, |
| CXXConversionDecl * | Conv | ||
| ) |
Define the "body" of the conversion from a lambda object to a block pointer.
This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.
Definition at line 11256 of file SemaDeclCXX.cpp.
References ActOnCXXThis(), BuildBlockForLambdaConversion(), BuildReturnStmt(), clang::CK_CopyAndAutoreleaseBlockObject, clang::ImplicitCastExpr::Create(), CreateBuiltinUnaryOp(), Diag(), Diags, clang::ActionResult< PtrTy, CompressInvalid >::get(), getASTMutationListener(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::CXXRecordDecl::isGenericLambda(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::markUsed(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, and clang::VK_RValue.
Referenced by MarkFunctionReferenced().
| void Sema::DefineImplicitLambdaToFunctionPointerConversion | ( | SourceLocation | CurrentLoc, |
| CXXConversionDecl * | Conv | ||
| ) |
Define the "body" of the conversion from a lambda object to a function pointer.
This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.
Definition at line 11179 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentList::asArray(), BuildDeclRefExpr(), BuildReturnStmt(), Diags, clang::FunctionTemplateDecl::findSpecialization(), getASTMutationListener(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::CXXRecordDecl::isGenericLambda(), MarkFunctionReferenced(), clang::Decl::markUsed(), clang::FunctionDecl::setBody(), clang::Decl::setReferenced(), and clang::VK_LValue.
Referenced by MarkFunctionReferenced().
| void Sema::DefineImplicitMoveAssignment | ( | SourceLocation | CurrentLocation, |
| CXXMethodDecl * | MethodDecl | ||
| ) |
Defines an implicitly-declared move assignment operator.
Definition at line 10607 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), checkMoveAssignmentForRepeatedMove(), CreateBuiltinUnaryOp(), CXXMoveAssignment, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), getCurrentThisType(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FieldDecl::getParent(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::FieldDecl::isUnnamedBitfield(), clang::SourceLocation::isValid(), LookupMemberName, clang::Decl::markUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, clang::VK_LValue, and clang::VK_XValue.
Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineImplicitMoveConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor | ||
| ) |
DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor.
Definition at line 11134 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), clang::Type::castAs(), CXXMoveConstructor, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), getASTMutationListener(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXConstructorDecl::isMoveConstructor(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), MarkVTableUsed(), clang::None, ResolveExceptionSpec(), clang::FunctionDecl::setBody(), SetCtorInitializers(), and clang::Decl::setInvalidDecl().
Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineInheritingConstructor | ( | SourceLocation | UseLoc, |
| CXXConstructorDecl * | Constructor | ||
| ) |
Define the specified inheriting constructor.
Definition at line 9296 of file SemaDeclCXX.cpp.
References Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), getASTMutationListener(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::FunctionDecl::isDeleted(), clang::Decl::markUsed(), MarkVTableUsed(), clang::FunctionDecl::setBody(), SetCtorInitializers(), and clang::Decl::setInvalidDecl().
Referenced by MarkFunctionReferenced().
| bool Sema::DefineUsedVTables | ( | ) |
Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.
Definition at line 13263 of file SemaDeclCXX.cpp.
References Consumer, Diag(), clang::CXXRecordDecl::getCanonicalDecl(), clang::ASTContext::getCurrentKeyFunction(), clang::Decl::getLocation(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::ASTConsumer::HandleVTable(), clang::FunctionDecl::hasBody(), I, clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlined(), LoadExternalVTableUses(), MarkVirtualMemberExceptionSpecsNeeded(), MarkVirtualMembersReferenced(), clang::Redeclarable< decl_type >::redecls(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, VTablesUsed, and VTableUses.
Referenced by ActOnEndOfTranslationUnit(), InstantiateFunctionDefinition(), and InstantiateVariableDefinition().
|
inline |
Emit a diagnostic.
Definition at line 1118 of file Sema.h.
References Diags, and clang::DiagnosticsEngine::Report().
Referenced by ActOnAliasDeclaration(), ActOnAtEnd(), ActOnBaseSpecifier(), ActOnClassPropertyRefExpr(), ActOnComment(), ActOnCompatibilityAlias(), ActOnConversionDeclarator(), ActOnCUDAExecConfigExpr(), ActOnCXXConditionDeclaration(), ActOnCXXDelete(), ActOnCXXFoldExpr(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFinishCXXMemberSpecification(), ActOnForwardClassDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnNamespaceAliasDef(), ActOnObjCExceptionDecl(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), actOnObjCTypeParamList(), ActOnOpenMPAlignedClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDefaultClause(), ActOnOpenMPDependClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPIdExpression(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPMapClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionEnd(), ActOnOpenMPScheduleClause(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSharedClause(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDirective(), ActOnPackExpansion(), ActOnParamDefaultArgument(), ActOnPragmaMSSeg(), ActOnPragmaMSVtorDisp(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaVisibility(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnPureSpecifier(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartOfSwitchStmt(), ActOnStartProtocolInterface(), ActOnSuperClassOfClassInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnTemplatedFriendTag(), ActOnUsingDeclaration(), ActOnUsingDirective(), AddAlignedAttr(), AddAlignValueAttr(), AddAssumeAlignedAttr(), adjustMemberFunctionCC(), applyCocoaAPICheck(), applyObjCTypeArgs(), AtomicPropertySetterGetterRules(), AttachBaseSpecifiers(), attrNonNullArgCheck(), BuildArrayType(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockPointerType(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXDefaultInitExpr(), BuildCXXMemberCallExpr(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXTypeConstructExpr(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExtVectorType(), BuildFloatingLiteral(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildMemberPointerType(), BuildMemInitializer(), BuildNonArrayForRange(), BuildObjCBridgedCast(), BuildObjCEncodeExpression(), BuildObjCExceptionDecl(), BuildOverloadedArrowExpr(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildQualifiedType(), BuildReferenceType(), BuildStaticAssertDeclaration(), BuildTypeofExprType(), BuildUnaryTransformType(), BuildUsingDeclaration(), captureInBlock(), captureInLambda(), checkAcquireOrderAttrCommon(), checkAddressOfFunctionIsAvailable(), CheckAlignasUnderalignment(), CheckAlignOfExpr(), CheckAllocatedType(), CheckAnonMemberRedeclaration(), CheckARCMethodDecl(), checkARCPropertyImpl(), checkArgCount(), checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), CheckArrayDesignatorExpr(), CheckArrow(), CheckAsmLValue(), checkAtomicPropertyMismatch(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), checkAvailabilityAttr(), CheckBaseSpecifier(), CheckBooleanCondition(), checkBuiltinTemplateIdType(), CheckCallingConvAttr(), CheckCallReturnType(), checkCaseValue(), checkClassLevelDLLAttribute(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConditionVariable(), CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConstexprFunctionDecl(), CheckConstexprFunctionStmt(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), checkCoroutineContext(), CheckCUDATarget(), CheckCXX98CompatAccessibleCopy(), CheckCXXDefaultArguments(), CheckCXXThisCapture(), CheckDeclInExpr(), CheckDerivedToBaseConversion(), CheckDestructorDeclarator(), checkDLLAttributeRedeclaration(), checkDuplicateDefaultInit(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedSpecialMember(), checkExprMemoryConstraintCompat(), CheckExtensionTraitOperandType(), CheckExtraCXXDefaultArguments(), CheckExtVectorComponent(), CheckFallThroughForBody(), CheckFoldOperand(), checkForConsumableClass(), CheckForDanglingReferenceOrPointer(), CheckForDuplicateEnumValues(), CheckForIncompatibleAttributes(), CheckForModifiableLvalue(), CheckForReference(), CheckForwardProtocolDeclarationForCircularDependency(), CheckFriendTypeDecl(), checkFunctionOrMethodParameterIndex(), CheckFunctionReturnType(), checkGlobalOrExternCConflict(), checkGrainsizeNumTasksClauses(), checkIBOutletCommon(), CheckIdentityFieldAssignment(), checkIfClauses(), CheckIfOverriddenFunctionIsMarkedFinal(), CheckImplementationIvars(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckInheritingConstructorUsingDecl(), checkInitMethod(), checkIntToPointerCast(), checkIsValidOpenCLKernelParameter(), CheckJumpOutOfSEHFinally(), checkLaunchBoundsArgument(), CheckLiteralOperatorDeclaration(), CheckMemorySizeofForComparison(), CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), checkModuleImportContext(), checkMoveAssignmentForRepeatedMove(), CheckMoveOnConstruction(), checkMSInheritanceAttrOnDefinition(), CheckNakedParmReference(), CheckNestingOfRegions(), checkNewAttributesAfterDef(), CheckNonTypeTemplatePartialSpecializationArgs(), checkNullabilityConsistency(), checkNullabilityTypeSpecifier(), CheckObjCARCConversion(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), CheckObjCDeclScope(), checkObjCKindOfType(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckObjCTraitOperandConstraints(), CheckOMPThreadPrivateDecl(), checkOpenCLConditionVector(), checkOpenCLVectorShift(), CheckOpenMPIterationSpace(), CheckOpenMPLoop(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), CheckOverloadedOperatorDeclaration(), CheckOverrideControl(), CheckOverridingFunctionAttributes(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckParameterPacksForExpansion(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckPoppedLabel(), checkPropertyDeclWithOwnership(), CheckPureMethod(), checkQualifiedFunction(), CheckRealImagOperand(), checkRecursiveFunction(), CheckRegparmAttr(), CheckReturnStackAddr(), checkScheduleModifiers(), checkSectionName(), checkSimdlenSafelenValues(), CheckSpecifiedExceptionType(), CheckStringInit(), checkTargetAttr(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTryLockFunAttrCommon(), CheckTypeMappable(), checkTypeParamListConsistency(), checkUInt32Argument(), checkUndefinedButUsed(), checkUnsafeAssignLiteral(), checkUnsafeAssignObject(), checkUnusedDeclAttributes(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), checkUsingShadowRedecl(), CheckVecStepTraitOperandType(), checkVectorResult(), ConversionToObjCStringLiteralCheck(), ConvertDeclSpecToType(), convertPointersToCompositeType(), CopyObject(), CreateNewFunctionDecl(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CreatePropertyDecl(), CXXCheckConditionalOperands(), DeduceAutoType(), DeduceReturnType(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), DefineUsedVTables(), DelegatingCycleHelper(), Diag(), clang::InitializationSequence::Diagnose(), clang::Sema::BoundTypeDiagnoser< Ts >::diagnose(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseAccessPath(), DiagnoseAdditionInShift(), diagnoseAddressOfInvalidType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAmbiguousLookup(), diagnoseAndRemoveTypeQualifiers(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), diagnoseArityMismatch(), DiagnoseArityMismatch(), diagnoseArrayStarInParamType(), DiagnoseAssignmentAsCondition(), DiagnoseAssignmentResult(), DiagnoseAutoDeductionFailure(), DiagnoseBadAccess(), diagnoseBadCast(), DiagnoseBadConversion(), DiagnoseBadDeduction(), diagnoseBadDirectAccess(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseBadTarget(), diagnoseBadTypeAttribute(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseBitwisePrecedence(), DiagnoseCalleeStaticArrayParam(), DiagnoseCastOfObjCSEL(), DiagnoseClassExtensionDupMethods(), DiagnoseConditionalPrecedence(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseDefaultTemplateArgument(), diagnoseDeprecatedCopyOperation(), DiagnoseDirectIsaAccess(), diagnoseDistinctPointerComparison(), DiagnoseDuplicateIvars(), DiagnoseEqualityWithExtraParens(), diagnoseEquivalentInternalLinkageDeclarations(), DiagnoseFailedEnableIfAttr(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), diagnoseFunctionPointerToVoidComparison(), DiagnoseHiddenVirtualMethods(), diagnoseIgnoredQualifiers(), DiagnoseIndirectJumpStmt(), diagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), diagnoseListInit(), diagnoseLogicalNotOnLHSofComparison(), DiagnoseMismatchedNewDelete(), DiagnoseMissingDesignatedInitOverrides(), diagnoseMissingImport(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseMultipleUserDefinedConversion(), DiagnoseNamespaceInlineMismatch(), DiagnoseNarrowingInInitList(), diagnoseNullableToNonnullConversion(), diagnoseNullResettableSynthesizedSetters(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), diagnoseObjCLiteralComparison(), DiagnoseOwningPropertyGetterSynthesis(), diagnosePointerIncompatibility(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), DiagnoseQualifiedMemberReference(), DiagnoseReinterpretUpDownCast(), diagnoseRepeatedUseOfWeak(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), DiagnoseShiftCompare(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), DiagnoseSwitchLabelsFallthrough(), DiagnoseTemplateParameterListArityMismatch(), DiagnoseTwoPhaseLookup(), diagnoseTypo(), diagnoseUncapturableValueReference(), DiagnoseUnexpandedParameterPacks(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedReference(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), diagnoseUnknownAnyExpr(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseUnusedComparison(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseUseOfUnimplementedSelectors(), DiagnoseWeakIvars(), DiagRuntimeBehavior(), DiagUninitUse(), DoEmitAvailabilityWarning(), emitAndClearUnusedLocalTypedefWarnings(), EmitCurrentDiagnostic(), EmitDiagnosticForLogicalAndInLogicalOr(), emitEmptyLookupTypoDiagnostic(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EvaluateArrayTypeTrait(), FinalizeVarWithDestructor(), FindAllocationFunctions(), FindAllocationOverload(), FindConditionalOverload(), FindDeallocationFunction(), FindInstantiatedDecl(), FindProtocolDeclaration(), clang::DeclSpec::Finish(), FinishForRangeVarDecl(), FinishOverloadedCallExpr(), flushDiagnostics(), GetDeclSpecTypeForDeclarator(), getDefaultArgExprsForConstructors(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getMostSpecialized(), getNSNumberFactoryMethod(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAnalyzerNoReturnAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCleanupAttr(), handleCommonAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDLLAttr(), handleEnableIfAttr(), HandleExprPropertyRefExpr(), HandleExtVectorTypeAttr(), handleFallThroughAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLoopHintAttr(), handleMipsInterruptAttr(), handleModeAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), HandleMSProperty(), HandleNeonVectorTypeAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCGCTypeAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCSuppresProtocolAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), HandlePropertyInClassExtension(), handleRestrictAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), inferARCLifetimeForPointee(), inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), instantiateDependentEnableIfAttr(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isArraySizeVLA(), IsCXXRecordForMappable(), IsMicrosoftUsingDeclarationAccessBug(), IsNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), isTagTypeWithMissingTag(), isVariableCapturable(), LookupLiteralOperator(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupPromiseType(), LookupStdInitializerList(), MatchTemplateParameterKind(), mergeAlignedAttrs(), mergeAlwaysInlineAttr(), mergeAvailabilityAttr(), MergeCXXFunctionDecl(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeInternalLinkageAttr(), mergeMinSizeAttr(), mergeMSInheritanceAttr(), mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), mergeParamDeclTypes(), mergeSectionAttr(), mergeTypeNullabilityForRedecl(), mergeVisibilityAttr(), NoteBuiltinOperatorCandidate(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::OverloadCandidateSet::NoteCandidates(), NoteFunctionCandidate(), NoteHiddenVirtualMethods(), noteOperatorArrows(), NoteOverloadCandidate(), noteOverloads(), NoteSurrogateCandidate(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), PerformOpenMPImplicitIntegerConversion(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), PopPragmaVisibility(), ProcessAccessDeclAttributeList(), ProcessDeclAttribute(), ProcessDeclAttributeList(), ProcessPropertyDecl(), ProcessStmtAttribute(), propagateDLLAttrToBaseClassTemplate(), RebuildForRangeWithDereference(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), ReferenceDllExportedMethods(), ReportOriginalDSA(), ReportOverrides(), RequireCompleteDeclContext(), RequireLiteralType(), ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveExceptionSpec(), ResolveSingleFunctionTemplateSpecialization(), SearchForReturnInStmt(), SemaBuiltinAnnotation(), SemaBuiltinCallWithStaticChain(), SemaBuiltinCpuSupports(), SemaBuiltinMemChkCall(), SemaBuiltinOverflow(), SemaBuiltinSEHScopeCheck(), SetCtorInitializers(), SetDeclDefaulted(), SetDeclDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), SubstParmVarDecl(), SuggestInitializationFixit(), SuggestParentheses(), threadSafetyCheckIsPointer(), tryCaptureVariable(), tryDiagnoseOverloadedCast(), TryDiagnoseProtectedAccess(), TryReinterpretCast(), TryStaticCast(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), tryToRecoverWithCall(), UnifySection(), validateBoxingMethod(), ValidateObjCLiteralInterfaceDecl(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), warnAboutAmbiguousFunction(), warnBracedScalarInit(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), warnOnLifetimeExtension(), warnOnSizeofOnArrayDecay(), and WarnUndefinedMethod().
| Sema::SemaDiagnosticBuilder Sema::Diag | ( | SourceLocation | Loc, |
| const PartialDiagnostic & | PD | ||
| ) |
Emit a partial diagnostic.
Definition at line 1069 of file Sema.cpp.
References Builder, Diag(), clang::PartialDiagnostic::Emit(), and clang::PartialDiagnostic::getDiagID().
| void Sema::DiagnoseAbsenceOfOverrideControl | ( | NamedDecl * | D | ) |
DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method.
Definition at line 1942 of file SemaDeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), Diag(), clang::NamedDecl::getDeclName(), clang::SourceManager::getImmediateExpansionRange(), clang::Decl::getLocation(), getSourceManager(), clang::SourceManager::getSpellingLoc(), clang::Decl::hasAttr(), clang::Decl::isImplicit(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::CXXMethodDecl::size_overridden_methods().
Referenced by CheckCompletedCXXClass().
| void Sema::DiagnoseAbstractType | ( | const CXXRecordDecl * | RD | ) |
Definition at line 4458 of file SemaDeclCXX.cpp.
References Diag(), Diags, clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getFinalOverriders(), clang::DiagnosticsEngine::isLastDiagnosticIgnored(), and PureVirtualClassDiagSet.
Referenced by CheckCompletedCXXClass(), RequireNonAbstractType(), and SetCtorInitializers().
| void Sema::DiagnoseAlwaysNonNullPointer | ( | Expr * | E, |
| Expr::NullPointerConstantKind | NullKind, | ||
| bool | IsEqual, | ||
| SourceRange | Range | ||
| ) |
Diagnose pointers that are always non-null.
| E | the expression containing the pointer |
| NullKind | NPCK_NotNull if E is a cast to bool, otherwise, E is compared to a null pointer |
| IsEqual | True when the comparison is equal to a null pointer |
| Range | Extra SourceRange to highlight in the diagnostic |
Definition at line 7640 of file SemaChecking.cpp.
References CheckForReference(), clang::FixItHint::CreateInsertion(), Diag(), clang::SourceRange::getBegin(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::ValueDecl::getType(), clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isArrayType(), clang::Type::isFunctionType(), IsInAnyMacroBody(), clang::SourceLocation::isMacroID(), clang::ValueDecl::isWeak(), clang::NonNull, clang::Expr::NPCK_NotNull, clang::Expr::NPCK_ZeroExpression, clang::Expr::NPCK_ZeroLiteral, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), S, clang::Decl::specific_attrs(), and clang::UO_AddrOf.
| void Sema::DiagnoseAmbiguousLookup | ( | LookupResult & | Result | ) |
Produce a diagnostic describing the ambiguity that resulted from name lookup.
| Result | The result of the ambiguous lookup to be diagnosed. |
Definition at line 2218 of file SemaLookup.cpp.
References clang::LookupResult::AmbiguousBaseSubobjects, clang::LookupResult::AmbiguousBaseSubobjectTypes, clang::LookupResult::AmbiguousReference, clang::LookupResult::AmbiguousTagHiding, clang::CXXBasePaths::begin(), clang::DeclContextLookupResult::begin(), clang::CXXBasePath::Decls, Diag(), clang::LookupResult::Filter::done(), clang::CXXBasePaths::end(), clang::LookupResult::Filter::erase(), clang::CXXBasePaths::front(), clang::LookupResult::getAmbiguityKind(), getAmbiguousPathsDisplayString(), clang::LookupResult::getBasePaths(), clang::LookupResult::getContextRange(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::isAmbiguous(), and clang::LookupResult::Filter::next().
Referenced by ActOnSizeofParameterPackExpr().
| void Sema::diagnoseARCUnbridgedCast | ( | Expr * | e | ) |
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
Definition at line 4088 of file SemaExprObjC.cpp.
References ACTC_retainable, clang::cast(), clang::ast_matchers::castExpr, CCK_CStyleCast, CCK_ImplicitConversion, CCK_OtherCast, classifyTypeForARCConversion(), diagnoseObjCARCConversion(), clang::QualType::getNonReferenceType(), clang::Expr::hasPlaceholderType(), and clang::Expr::IgnoreParens().
Referenced by CheckPlaceholderExpr().
| void Sema::DiagnoseAssignmentAsCondition | ( | Expr * | E | ) |
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment.
Definition at line 13905 of file SemaExpr.cpp.
References clang::BO_Assign, clang::BO_OrAssign, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), getLocForEndOfToken(), clang::Selector::getNameForSlot(), isSelfExpr(), clang::Selector::isUnarySelector(), and clang::OMF_init.
Referenced by CheckBooleanCondition().
DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values.
Definition at line 1171 of file SemaStmt.cpp.
References AdjustAPSInt(), CmpEnumVals(), Context, Diag(), clang::EnumDecl::enumerators(), EqEnumVals(), clang::Expr::EvaluateKnownConstInt(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::ASTContext::getIntWidth(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by DiagnoseAssignmentResult().
| bool Sema::DiagnoseAssignmentResult | ( | AssignConvertType | ConvTy, |
| SourceLocation | Loc, | ||
| QualType | DstType, | ||
| QualType | SrcType, | ||
| Expr * | SrcExpr, | ||
| AssignmentAction | Action, | ||
| bool * | Complained = nullptr |
||
| ) |
DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy.
This returns true if the conversion was invalid or false if the conversion was accepted.
Definition at line 12029 of file SemaExpr.cpp.
References AA_Assigning, AA_Casting, AA_Converting, AA_Initializing, AA_Passing, AA_Passing_CFAudited, AA_Returning, AA_Sending, Compatible, CompatiblePointerDiscardsQualifiers, Context, clang::frontend::CPlusPlus, Diag(), DiagnoseAssignmentEnum(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), clang::OverloadExpr::find(), FunctionVoidPointer, clang::Qualifiers::getAddressSpace(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), HandleFunctionTypeMismatch(), clang::ObjCInterfaceDecl::hasDefinition(), clang::ConversionFixItGenerator::Hints, Incompatible, IncompatibleBlockPointer, IncompatibleNestedPointerQualifiers, IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, IncompatiblePointer, IncompatiblePointerDiscardsQualifiers, IncompatiblePointerSign, IncompatibleVectors, IntToBlockPointer, IntToPointer, clang::Type::isArrayType(), isInvalid(), clang::FixItHint::isNull(), clang::ConversionFixItGenerator::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), IsStringLiteralToNonConstPointerConversion(), clang::ConversionFixItGenerator::Kind, maybeDiagnoseAssignmentToFunction(), NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, PDiag(), PointerToInt, clang::ObjCObjectPointerType::quals(), and clang::ConversionFixItGenerator::tryToFixConversion().
Referenced by clang::InitializationSequence::Perform().
Definition at line 4131 of file SemaTemplateDeduction.cpp.
References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Expr::getType(), clang::ValueDecl::getType(), and clang::VarDecl::isInitCapture().
| void Sema::DiagnoseClassExtensionDupMethods | ( | ObjCCategoryDecl * | CAT, |
| ObjCInterfaceDecl * | ID | ||
| ) |
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.
Definition at line 1650 of file SemaDeclObjC.cpp.
References Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isInstanceMethod(), MatchTwoMethodDeclarations(), and clang::ObjCContainerDecl::methods().
Referenced by ActOnAtEnd().
| bool Sema::DiagnoseClassNameShadow | ( | DeclContext * | DC, |
| DeclarationNameInfo | NameInfo | ||
| ) |
DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class, then each of the following shall have a name different from T:
Definition at line 4671 of file SemaDecl.cpp.
References Diag(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclContext::getParent(), clang::RecordDecl::isAnonymousStructOrUnion(), and clang::Name.
Referenced by ActOnAliasDeclaration(), and ActOnEnumConstant().
| bool Sema::DiagnoseConditionalForNull | ( | Expr * | LHSExpr, |
| Expr * | RHSExpr, | ||
| SourceLocation | QuestionLoc | ||
| ) |
Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer.
Returns true if a diagnostic is emitted.
Definition at line 5993 of file SemaExpr.cpp.
References Context, Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPCK_CXX11_nullptr, clang::Expr::NPCK_NotNull, clang::Expr::NPCK_ZeroExpression, and clang::Expr::NPCK_ZeroLiteral.
Referenced by CXXCheckConditionalOperands(), and FindConditionalOverload().
| void Sema::DiagnoseDuplicateIvars | ( | ObjCInterfaceDecl * | ID, |
| ObjCInterfaceDecl * | SID | ||
| ) |
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.
This becomes necesssary because class extension can add ivars to a class in random order which will not be known until class's @implementation is seen.
Definition at line 3496 of file SemaDeclObjC.cpp.
References Diag(), clang::Decl::getLocation(), clang::ObjCInterfaceDecl::ivars(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().
Referenced by ActOnAtEnd().
| bool Sema::DiagnoseEmptyLookup | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| LookupResult & | R, | ||
| std::unique_ptr< CorrectionCandidateCallback > | CCC, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs = nullptr, |
||
| ArrayRef< Expr * > | Args = None, |
||
| TypoExpr ** | Out = nullptr |
||
| ) |
Diagnose an empty lookup.
Definition at line 1799 of file SemaExpr.cpp.
References clang::LookupResult::addDecl(), clang::AS_none, clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::OverloadCandidateSet::CSK_Normal, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, Diag(), emitEmptyLookupTypoDiagnostic(), clang::LookupResult::empty(), clang::Type::getAsCXXRecordDecl(), clang::TypoCorrection::getAsString(), clang::DeclarationName::getAsString(), clang::NestedNameSpecifier::getAsType(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDeclAs(), clang::TypoCorrection::getCorrectionSpecifier(), clang::Decl::getDeclContext(), clang::TypoCorrection::getFoundDecl(), clang::DeclContext::getLexicalParent(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationName::getNameKind(), clang::LookupResult::getNameLoc(), clang::DeclContext::getParent(), clang::CXXMethodDecl::getParent(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::CXXMethodDecl::isInstance(), clang::TypoCorrection::isOverloaded(), clang::DeclContext::isRecord(), clang::DeclAccessPair::make(), clang::Name, clang::OR_Success, S, clang::LookupResult::setLookupName(), clang::LookupResult::setNamingClass(), clang::TemplateArgumentListInfo::size(), clang::LookupResult::suppressDiagnostics(), and clang::TypoCorrection::WillReplaceSpecifier().
Referenced by BuildRecoveryCallExpr().
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body.
Definition at line 9366 of file SemaChecking.cpp.
References Diag(), clang::SourceManager::getPresumedColumnNumber(), and clang::NullStmt::getSemiLoc().
| void Sema::DiagnoseEmptyStmtBody | ( | SourceLocation | StmtLoc, |
| const Stmt * | Body, | ||
| unsigned | DiagID | ||
| ) |
Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body, and it is located on the same line.
This helps prevent bugs due to typos, such as: if (condition); do_stuff();
Definition at line 9345 of file SemaChecking.cpp.
References Diag(), and clang::NullStmt::getSemiLoc().
| void Sema::DiagnoseEqualityWithExtraParens | ( | ParenExpr * | ParenE | ) |
Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.
Definition at line 13963 of file SemaExpr.cpp.
References clang::BO_EQ, Context, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::ParenExpr::getLocStart(), clang::Expr::IgnoreParens(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), clang::Expr::isTypeDependent(), and clang::Expr::MLV_Valid.
Referenced by CheckBooleanCondition().
| void Sema::diagnoseEquivalentInternalLinkageDeclarations | ( | SourceLocation | Loc, |
| const NamedDecl * | D, | ||
| ArrayRef< const NamedDecl * > | Equiv | ||
| ) |
Definition at line 8696 of file SemaOverload.cpp.
References Diag(), clang::Module::getFullModuleName(), clang::Decl::getLocation(), and getOwningModule().
Referenced by clang::OverloadCandidateSet::BestViableFunction().
| void Sema::DiagnoseFunctionSpecifiers | ( | const DeclSpec & | DS | ) |
Diagnose function specifiers on a declaration of an identifier that does not identify a function.
Definition at line 5155 of file SemaDecl.cpp.
References Diag(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::DeclSpec::getNoreturnSpecLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::isExplicitSpecified(), clang::DeclSpec::isInlineSpecified(), clang::DeclSpec::isNoreturnSpecified(), and clang::DeclSpec::isVirtualSpecified().
Referenced by ActOnObjCExceptionDecl(), and HandleMSProperty().
| void Sema::DiagnoseHiddenVirtualMethods | ( | CXXMethodDecl * | MD | ) |
Diagnose methods which overload virtual methods in a base class without overriding any.
Definition at line 6405 of file SemaDeclCXX.cpp.
References Diag(), Diags, FindHiddenVirtualMethods(), clang::Decl::getLocation(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isInvalidDecl(), and NoteHiddenVirtualMethods().
Referenced by CheckCompletedCXXClass().
| void Sema::diagnoseIgnoredQualifiers | ( | unsigned | DiagID, |
| unsigned | Quals, | ||
| SourceLocation | FallbackLoc, | ||
| SourceLocation | ConstQualLoc = SourceLocation(), |
||
| SourceLocation | VolatileQualLoc = SourceLocation(), |
||
| SourceLocation | RestrictQualLoc = SourceLocation(), |
||
| SourceLocation | AtomicQualLoc = SourceLocation() |
||
| ) |
Definition at line 2475 of file SemaType.cpp.
References clang::FixItHint::CreateRemoval(), Diag(), getSourceManager(), I, clang::SourceManager::isBeforeInTranslationUnit(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::Name, clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, and clang::DeclSpec::TQ_volatile.
Referenced by CheckConstructorDeclarator(), CheckDestructorDeclarator(), and diagnoseRedundantReturnTypeQualifiers().
| void Sema::DiagnoseInvalidJumps | ( | Stmt * | Body | ) |
Definition at line 853 of file JumpDiagnostics.cpp.
| void Sema::diagnoseMisplacedModuleImport | ( | Module * | M, |
| SourceLocation | ImportLoc | ||
| ) |
Check if module import may be found in the current context, emit error if not.
Definition at line 14645 of file SemaDecl.cpp.
References checkModuleImportContext(), and CurContext.
| void Sema::DiagnoseMissingDesignatedInitOverrides | ( | const ObjCImplementationDecl * | ImplD, |
| const ObjCInterfaceDecl * | IFD | ||
| ) |
Definition at line 2033 of file SemaObjCProperty.cpp.
References Diag(), E, clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCInterfaceDecl::hasDesignatedInitializers(), I, clang::ObjCContainerDecl::instance_methods(), and clang::OMF_init.
Referenced by ActOnAtEnd().
| void Sema::diagnoseMissingImport | ( | SourceLocation | Loc, |
| NamedDecl * | Decl, | ||
| bool | NeedDefinition, | ||
| bool | Recover = true |
||
| ) |
Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import that would resolve the problem.
Definition at line 4868 of file SemaLookup.cpp.
References Declaration, Definition, getDefinitionToImport(), clang::Decl::getLocation(), clang::ASTContext::getModulesWithMergedDefinition(), getOwningModule(), and isVisible().
Referenced by diagnoseMissingArgument(), and diagnoseTypo().
| void Sema::diagnoseMissingImport | ( | SourceLocation | Loc, |
| NamedDecl * | Decl, | ||
| SourceLocation | DeclLoc, | ||
| ArrayRef< Module * > | Modules, | ||
| MissingImportKind | MIK, | ||
| bool | Recover | ||
| ) |
Definition at line 4894 of file SemaLookup.cpp.
References createImplicitModuleImportForErrorRecovery(), Declaration, DefaultArgument, Definition, and Diag().
| void Sema::DiagnoseMultipleMethodInGlobalPool | ( | SmallVectorImpl< ObjCMethodDecl * > & | Methods, |
| Selector | Sel, | ||
| SourceRange | R, | ||
| bool | receiverIdOrClass | ||
| ) |
Definition at line 3324 of file SemaDeclObjC.cpp.
References Diag(), Diags, clang::SourceRange::getBegin(), getLangOpts(), I, isAcceptableMethodMismatch(), clang::DiagnosticsEngine::isIgnored(), MatchTwoMethodDeclarations(), MMS_loose, and MMS_strict.
Referenced by AreMultipleMethodsInGlobalPool().
Definition at line 3312 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), IsUserDefinedConversion(), clang::OCD_AllCandidates, clang::OR_Ambiguous, clang::OR_No_Viable_Function, RequireCompleteType(), and clang::ImplicitConversionSequence::UserDefined.
Referenced by CheckConvertedConstantExpression(), and PerformContextuallyConvertToBool().
| void Sema::DiagnoseNontrivial | ( | const CXXRecordDecl * | RD, |
| CXXSpecialMember | CSM | ||
| ) |
Diagnose why the specified class does not have a trivial special member of the given kind.
Definition at line 6133 of file SemaDeclCXX.cpp.
References checkTrivialSubobjectCall(), Context, CXXCopyAssignment, CXXCopyConstructor, clang::Decl::getLocation(), clang::ASTContext::getRecordType(), and TSK_CompleteObject.
| void Sema::diagnoseNullableToNonnullConversion | ( | QualType | DstType, |
| QualType | SrcType, | ||
| SourceLocation | Loc | ||
| ) |
Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
Definition at line 352 of file Sema.cpp.
References Context, Diag(), clang::Type::getNullability(), clang::NonNull, and clang::Nullable.
Referenced by ImpCastExprToType(), and PerformImplicitConversion().
| void Sema::diagnoseNullResettableSynthesizedSetters | ( | const ObjCImplDecl * | impDecl | ) |
Diagnose any null-resettable synthesized setters.
Definition at line 1862 of file SemaObjCProperty.cpp.
References Diag(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocStart(), clang::SourceLocation::isInvalid(), clang::ObjCPropertyDecl::OBJC_PR_null_resettable, clang::ObjCImplDecl::property_impls(), and clang::ObjCPropertyImplDecl::Synthesize.
Referenced by ImplMethodsVsClassMethods().
| void Sema::DiagnoseOwningPropertyGetterSynthesis | ( | const ObjCImplementationDecl * | D | ) |
Definition at line 1977 of file SemaObjCProperty.cpp.
References clang::FixItHint::CreateInsertion(), Diag(), clang::LangOptions::GCOnly, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::ObjCPropertyDecl::getGetterName(), clang::Preprocessor::getIdentifierInfo(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Preprocessor::getLastMacroWithSpelling(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), getPreprocessor(), clang::Decl::hasAttr(), clang::SourceLocation::isValid(), clang::OMF_alloc, clang::OMF_copy, clang::OMF_mutableCopy, clang::OMF_new, PP, clang::ObjCImplDecl::property_impls(), and clang::Decl::redecls().
Referenced by ActOnAtEnd().
| bool Sema::DiagnosePropertyAccessorMismatch | ( | ObjCPropertyDecl * | PD, |
| ObjCMethodDecl * | Getter, | ||
| SourceLocation | Loc | ||
| ) |
Definition at line 1475 of file SemaObjCProperty.cpp.
References clang::ASTContext::canAssignObjCInterfaces(), CheckAssignmentConstraints(), Compatible, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), and clang::Type::isArithmeticType().
Referenced by ProcessPropertyDecl().
| void Sema::DiagnosePropertyMismatch | ( | ObjCPropertyDecl * | Property, |
| ObjCPropertyDecl * | SuperProperty, | ||
| const IdentifierInfo * | Name, | ||
| bool | OverridingProtocolProperty | ||
| ) |
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies.
Definition at line 1401 of file SemaObjCProperty.cpp.
References checkAtomicPropertyMismatch(), Context, Diag(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::Decl::getLocation(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), isObjCPointerConversion(), clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_strong, and clang::ASTContext::propertyTypesAreCompatible().
Referenced by ActOnProperty(), and CheckPropertyAgainstProtocol().
| bool Sema::diagnoseQualifiedDeclaration | ( | CXXScopeSpec & | SS, |
| DeclContext * | DC, | ||
| DeclarationName | Name, | ||
| SourceLocation | Loc | ||
| ) |
Diagnose a declaration whose declarator-id has the given nested-name-specifier.
| SS | The nested-name-specifier of the declarator-id. |
| DC | The declaration context to which the nested-name-specifier resolves. |
| Name | The name of the entity being declared. |
| Loc | The location of the name of the entity being declared. |
Definition at line 4699 of file SemaDecl.cpp.
References clang::CXXScopeSpec::clear(), Context, clang::FixItHint::CreateRemoval(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getNameKind(), clang::DeclContext::getParent(), clang::NestedNameSpecifierLoc::getPrefix(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameType(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::location_data(), and clang::Name.
Referenced by ActOnCXXMemberDeclarator().
| void Sema::DiagnoseReturnInConstructorExceptionHandler | ( | CXXTryStmt * | TryBlock | ) |
Definition at line 12952 of file SemaDeclCXX.cpp.
References E, clang::CXXTryStmt::getHandler(), clang::CXXTryStmt::getNumHandlers(), I, and SearchForReturnInStmt().
| void Sema::DiagnoseSelfMove | ( | const Expr * | LHSExpr, |
| const Expr * | RHSExpr, | ||
| SourceLocation | OpLoc | ||
| ) |
Warn if a value is moved to itself.
DiagnoseSelfMove - Emits a warning if a value is moved to itself.
Definition at line 9437 of file SemaChecking.cpp.
References Diag(), clang::CallExpr::getArg(), clang::MemberExpr::getBase(), clang::Decl::getCanonicalDecl(), clang::DeclRefExpr::getDecl(), clang::CallExpr::getDirectCallee(), clang::NamedDecl::getIdentifier(), clang::MemberExpr::getMemberDecl(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Decl::isInStdNamespace(), and clang::IdentifierInfo::isStr().
Referenced by CreateOverloadedBinOp().
| void Sema::DiagnoseSentinelCalls | ( | NamedDecl * | D, |
| SourceLocation | Loc, | ||
| ArrayRef< Expr * > | Args | ||
| ) |
DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied.
Definition at line 396 of file SemaExpr.cpp.
References clang::Type::castAs(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::SourceLocation::isInvalid(), clang::ASTContext::isSentinelNullExpr(), clang::Expr::isValueDependent(), and clang::ast_matchers::type.
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXNew(), CheckMessageArgumentTypes(), and CompleteConstructorCall().
| void Sema::DiagnoseSizeOfParametersAndReturnValue | ( | ParmVarDecl *const * | Begin, |
| ParmVarDecl *const * | End, | ||
| QualType | ReturnTy, | ||
| NamedDecl * | D | ||
| ) |
Diagnose whether the size of parameters or return value of a function or obj-c method definition is pass-by-value and larger than a specified threshold.
Definition at line 10545 of file SemaDecl.cpp.
References Context, Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::Type::isDependentType(), and clang::QualType::isPODType().
| void Sema::DiagnoseTemplateParameterShadow | ( | SourceLocation | Loc, |
| Decl * | PrevDecl | ||
| ) |
DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc.
Returns true to indicate that this is an error, and false otherwise.
Definition at line 448 of file SemaTemplate.cpp.
References Diag(), clang::Decl::getLocation(), and clang::Decl::isTemplateParameter().
Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnNamespaceAliasDef(), HandleMSProperty(), and maybeDiagnoseTemplateParameterShadow().
| void Sema::diagnoseTypo | ( | const TypoCorrection & | Correction, |
| const PartialDiagnostic & | TypoDiag, | ||
| bool | ErrorRecovery = true |
||
| ) |
Definition at line 4843 of file SemaLookup.cpp.
References PDiag().
Referenced by actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOpenMPIdExpression(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnSuperClassOfClassInterface(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), DiagnoseInvalidRedeclaration(), emitEmptyLookupTypoDiagnostic(), FindProtocolDeclaration(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), LookupMemberExprInRecord(), and TryNamespaceTypoCorrection().
| void Sema::diagnoseTypo | ( | const TypoCorrection & | Correction, |
| const PartialDiagnostic & | TypoDiag, | ||
| const PartialDiagnostic & | PrevNote, | ||
| bool | ErrorRecovery = true |
||
| ) |
Diagnose a successfully-corrected typo.
Separated from the correction itself to allow external validation of the result, etc.
| Correction | The result of performing typo correction. |
| TypoDiag | The diagnostic to produce. This will have the corrected string added to it (and usually also a fixit). |
| PrevNote | A note to use when indicating the location of the entity to which we are correcting. Will have the correction string added to it. |
| ErrorRecovery | If true (the default), the caller is going to recover from the typo as if the corrected string had been typed. In this case, PDiag must be an error, and we will attach a fixit to it. |
Definition at line 4950 of file SemaLookup.cpp.
References clang::FixItHint::CreateReplacement(), Diag(), diagnoseMissingImport(), clang::TypoCorrection::getAsString(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionRange(), clang::PartialDiagnostic::getDiagID(), clang::TypoCorrection::getFoundDecl(), getLangOpts(), clang::TypoCorrection::getQuoted(), clang::TypoCorrection::isKeyword(), and clang::TypoCorrection::requiresImport().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc, |
| TypeSourceInfo * | T, | ||
| UnexpandedParameterPackContext | UPPC | ||
| ) |
If the given type contains an unexpanded parameter pack, diagnose the error.
| Loc | The source location where a diagnostc should be emitted. |
| T | The type that is being checked for unexpanded parameter packs. |
Definition at line 264 of file SemaTemplateVariadic.cpp.
References clang::Type::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TypeSourceInfo::getType(), and clang::TypeSourceInfo::getTypeLoc().
Referenced by ActOnAliasDeclaration(), ActOnBaseSpecifier(), ActOnExceptionDeclarator(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFullExpr(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnParamDefaultArgument(), ActOnStaticAssertDeclaration(), ActOnUsingDeclaration(), BuildBaseInitializer(), BuildMemberInitializer(), checkExceptionSpecification(), checkLaunchBoundsArgument(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), handleAlignedAttr(), and HandleMSProperty().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | Expr * | E, |
| UnexpandedParameterPackContext | UPPC = UPPC_Expression |
||
| ) |
If the given expression contains an unexpanded parameter pack, diagnose the error.
| E | The expression that is being checked for unexpanded parameter packs. |
Definition at line 280 of file SemaTemplateVariadic.cpp.
References clang::Expr::containsUnexpandedParameterPack(), and DiagnoseUnexpandedParameterPacks().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | const CXXScopeSpec & | SS, |
| UnexpandedParameterPackContext | UPPC | ||
| ) |
If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.
| SS | The nested-name-specifier that is being checked for unexpanded parameter packs. |
Definition at line 294 of file SemaTemplateVariadic.cpp.
References clang::NestedNameSpecifier::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), and clang::CXXScopeSpec::getScopeRep().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | const DeclarationNameInfo & | NameInfo, |
| UnexpandedParameterPackContext | UPPC | ||
| ) |
If the given name contains an unexpanded parameter pack, diagnose the error.
| NameInfo | The name (with source location information) that is being checked for unexpanded parameter packs. |
Definition at line 311 of file SemaTemplateVariadic.cpp.
References clang::Type::containsUnexpandedParameterPack(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::DeclarationName::getCXXNameType(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.
| bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc, |
| TemplateName | Template, | ||
| UnexpandedParameterPackContext | UPPC | ||
| ) |
If the given template name contains an unexpanded parameter pack, diagnose the error.
| Loc | The location of the template name. |
| Template | The template name that is being checked for unexpanded parameter packs. |
Definition at line 346 of file SemaTemplateVariadic.cpp.
References clang::TemplateName::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::TemplateName::isNull().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | TemplateArgumentLoc | Arg, |
| UnexpandedParameterPackContext | UPPC | ||
| ) |
If the given template argument contains an unexpanded parameter pack, diagnose the error.
| Arg | The template argument that is being checked for unexpanded parameter packs. |
Definition at line 360 of file SemaTemplateVariadic.cpp.
References clang::TemplateArgument::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgumentLoc::getLocation(), and clang::TemplateArgument::isNull().
| bool Sema::DiagnoseUnexpandedParameterPacks | ( | SourceLocation | Loc, |
| UnexpandedParameterPackContext | UPPC, | ||
| ArrayRef< UnexpandedParameterPack > | Unexpanded | ||
| ) |
Diagnose unexpanded parameter packs.
Diagnose all of the unexpanded parameter packs in the given vector.
| Loc | The location at which we should emit the diagnostic. |
| UPPC | The context in which we are diagnosing unexpanded parameter packs. |
| Unexpanded | the set of unexpanded parameter packs. |
Definition at line 217 of file SemaTemplateVariadic.cpp.
References Diag(), E, FunctionScopes, clang::getIdentifier(), I, and clang::Name.
Referenced by checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), and DiagnoseUnexpandedParameterPack().
| void Sema::DiagnoseUnimplementedProperties | ( | Scope * | S, |
| ObjCImplDecl * | IMPDecl, | ||
| ObjCContainerDecl * | CDecl, | ||
| bool | SynthesizeProperties | ||
| ) |
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation.
Definition at line 1759 of file SemaObjCProperty.cpp.
References clang::ObjCInterfaceDecl::all_referenced_protocols(), clang::AR_Unavailable, AttributeLangSupport::C, CollectImmediateProperties(), clang::ObjCInterfaceDecl::collectPropertiesToImplement(), CollectSuperClassPropertyImplementations(), DiagnoseUnimplementedAccessor(), E, clang::Decl::getAvailability(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCPropertyDecl::getGetterName(), clang::ObjCPropertyDecl::getPropertyImplementation(), I, clang::ObjCContainerDecl::instance_methods(), clang::ObjCCategoryDecl::IsClassExtension(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::Optional, P, and clang::ObjCImplDecl::property_impls().
Referenced by ImplMethodsVsClassMethods().
| bool Sema::DiagnoseUnknownTemplateName | ( | const IdentifierInfo & | II, |
| SourceLocation | IILoc, | ||
| Scope * | S, | ||
| const CXXScopeSpec * | SS, | ||
| TemplateTy & | SuggestedTemplate, | ||
| TemplateNameKind & | SuggestedKind | ||
| ) |
Definition at line 223 of file SemaTemplate.cpp.
References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ASTContext::getDependentTemplateName(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::isSet(), and clang::TNK_Dependent_template_name.
| void Sema::DiagnoseUnknownTypeName | ( | IdentifierInfo *& | II, |
| SourceLocation | IILoc, | ||
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| ParsedType & | SuggestedType, | ||
| bool | AllowClassTemplates = false |
||
| ) |
Definition at line 555 of file SemaDecl.cpp.
References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::SourceRange::getBegin(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::driver::types::getTypeName(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::CXXScopeSpec::MakeTrivial(), clang::Name, S, clang::UnqualifiedId::setIdentifier(), and clang::TNK_Type_template.
| void Sema::DiagnoseUnusedBackingIvarInAccessor | ( | Scope * | S, |
| const ObjCImplementationDecl * | ImplD | ||
| ) |
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor.
Definition at line 4604 of file SemaDeclObjC.cpp.
References DIAG, Diag(), Diags, GetIvarBackingPropertyAccessor(), clang::Decl::getLocation(), clang::Scope::hasUnrecoverableErrorOccurred(), clang::ObjCContainerDecl::instance_methods(), clang::DiagnosticsEngine::isIgnored(), and clang::Decl::isReferenced().
Referenced by ActOnAtEnd().
| void Sema::DiagnoseUnusedDecl | ( | const NamedDecl * | D | ) |
DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).
Definition at line 1551 of file SemaDecl.cpp.
References Context, Diag(), GenerateFixForUnusedDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and ShouldDiagnoseUnusedDecl().
Referenced by BuildVariableInstantiation().
| void Sema::DiagnoseUnusedExprResult | ( | const Stmt * | S | ) |
DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.
Definition at line 185 of file SemaStmt.cpp.
References clang::TypeLoc::castAs(), Context, clang::FixItHint::CreateRemoval(), Diag(), DiagnoseUnusedComparison(), E, clang::PointerTypeLoc::getStarLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::FunctionDecl::hasUnusedResultAttr(), clang::SourceManager::isInSystemMacro(), clang::SourceManager::isMacroBodyExpansion(), clang::SourceLocation::isMacroID(), S, SourceMgr, and clang::ASTContext::VoidPtrTy.
Referenced by CheckCommaOperands().
| void Sema::DiagnoseUnusedNestedTypedefs | ( | const RecordDecl * | D | ) |
Definition at line 1537 of file SemaDecl.cpp.
References clang::DeclContext::decls(), clang::TypeDecl::getTypeForDecl(), and clang::Type::isDependentType().
| void Sema::DiagnoseUnusedParameters | ( | ParmVarDecl *const * | Begin, |
| ParmVarDecl *const * | End | ||
| ) |
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
Definition at line 10529 of file SemaDecl.cpp.
References Diag().
| bool Sema::DiagnoseUseOfDecl | ( | NamedDecl * | D, |
| SourceLocation | Loc, | ||
| const ObjCInterfaceDecl * | UnknownObjCClass = nullptr, |
||
| bool | ObjCPropertyAccess = false |
||
| ) |
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
This routine diagnoses various problems with referencing declarations that can occur when using a declaration. For example, it might warn if a deprecated or unavailable declaration is being used, or produce an error (and return true) if a C++0x deleted function is being used.
Definition at line 324 of file SemaExpr.cpp.
References clang::frontend::CPlusPlus, clang::frontend::CPlusPlus14, Diag(), DiagnoseAvailabilityOfDecl(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::Decl::getCanonicalDecl(), clang::Type::getContainedAutoType(), clang::NamedDecl::getDeclName(), and clang::AutoType::getKeyword().
Referenced by ActOnClassPropertyRefExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), ActOnNamespaceAliasDef(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnStartCategoryImplementation(), ActOnSuperClassOfClassInterface(), ActOnUsingDirective(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXCastArgument(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildInstanceMessage(), BuildTypeofExprType(), BuildUnaryTransformType(), ConvertDeclSpecToType(), CreateFunctionRefExpr(), diagnoseUseOfProtocols(), FinalizeVarWithDestructor(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), MarkBaseAndMemberDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), ResolveAndFixSingleFunctionTemplateSpecialization(), and SetDelegatingInitializer().
| void Sema::DiagnoseUseOfUnimplementedSelectors | ( | ) |
Definition at line 4519 of file SemaDeclObjC.cpp.
References clang::ASTContext::AnyObjCImplementation(), Context, Diag(), I, LookupImplementedMethodInGlobalPool(), clang::ExternalSemaSource::ReadReferencedSelectors(), and ReferencedSelectors.
Referenced by ActOnEndOfTranslationUnit().
| bool Sema::DiagRuntimeBehavior | ( | SourceLocation | Loc, |
| const Stmt * | Statement, | ||
| const PartialDiagnostic & | PD | ||
| ) |
Conditionally issue a diagnostic based on the current evaluation context.
Emit a diagnostic that describes an effect on the run-time behavior of the program being compiled.
| Statement | If Statement is non-null, delay reporting the diagnostic until the function body is parsed, and then do a basic reachability analysis to determine if the statement is reachable. If it is unreachable, the diagnostic will not be emitted. |
This routine emits the given diagnostic when the code currently being type-checked is "potentially evaluated", meaning that there is a possibility that the code will actually be executable. Code in sizeof() expressions, code used only during overload resolution, etc., are not potentially evaluated. This routine will suppress such diagnostics or, in the absolutely nutty case of potentially potentially evaluated expressions (C++ typeid), queue the diagnostic to potentially emit it later.
This routine should be used for all diagnostics that describe the run-time behavior of a program, such as passing a non-POD value through an ellipsis. Failure to do so will likely result in spurious diagnostics or failures during overload resolution or within sizeof/alignof/typeof/typeid.
Definition at line 13836 of file SemaExpr.cpp.
References ConstantEvaluated, Diag(), ExprEvalContexts, FunctionScopes, getCurFunctionOrMethodDecl(), PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, Unevaluated, and UnevaluatedAbstract.
Referenced by CheckForNullPointerDereference(), CheckNonNullArgument(), DiagnoseBadDivideOrRemainderValues(), and DiagnoseBadShiftValues().
| void Sema::DiscardCleanupsInEvaluationContext | ( | ) |
Definition at line 12537 of file SemaExpr.cpp.
References ExprCleanupObjects, ExprEvalContexts, ExprNeedsCleanups, and MaybeODRUseExprs.
Referenced by BuildBaseInitializer(), BuildMemberInitializer(), EndOpenMPDSABlock(), getDefaultArgExprsForConstructors(), and MaybeCreateExprWithCleanups().
| void Sema::emitAndClearUnusedLocalTypedefWarnings | ( | ) |
Definition at line 644 of file Sema.cpp.
References Diag(), clang::ExternalSemaSource::ReadUnusedLocalTypedefNameCandidates(), and UnusedLocalTypedefNameCandidates.
Referenced by ActOnEndOfTranslationUnit().
| void Sema::EmitAvailabilityWarning | ( | AvailabilityDiagnostic | AD, |
| NamedDecl * | D, | ||
| StringRef | Message, | ||
| SourceLocation | Loc, | ||
| const ObjCInterfaceDecl * | UnknownObjCClass, | ||
| const ObjCPropertyDecl * | ObjCProperty, | ||
| bool | ObjCPropertyAccess | ||
| ) |
Definition at line 5955 of file SemaDeclAttr.cpp.
References AD_Partial, clang::Sema::DelayedDiagnostics::add(), DoEmitAvailabilityWarning(), getCurLexicalContext(), clang::sema::DelayedDiagnostic::makeAvailability(), and clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics().
Referenced by DiagnoseAvailabilityOfDecl().
| void Sema::EmitCurrentDiagnostic | ( | unsigned | DiagID | ) |
Cause the active diagnostic on the DiagosticsEngine to be emitted.
This is closely coupled to the SemaDiagnosticBuilder class and should not be used elsewhere.
Definition at line 966 of file Sema.cpp.
References AccessCheckingSFINAE, ActiveTemplateInstantiations, clang::DiagnosticsEngine::Clear(), Context, clang::frontend::CPlusPlus11, Diag(), Diags, clang::DiagnosticsEngine::EmitCurrentDiagnostic(), clang::DiagnosticsEngine::getCurrentDiagID(), clang::DiagnosticsEngine::getCurrentDiagLoc(), clang::ASTContext::getDiagAllocator(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), getLangOpts(), clang::Diagnostic::getLocation(), getPrintingPolicy(), clang::DiagnosticIDs::isBuiltinNote(), isSFINAEContext(), LastTemplateInstantiationErrorContext, NumSFINAEErrors, PrintInstantiationStack(), clang::DiagnosticsEngine::setLastDiagnosticIgnored(), clang::ASTContext::setPrintingPolicy(), clang::DiagnosticIDs::SFINAE_AccessControl, clang::DiagnosticIDs::SFINAE_Report, clang::DiagnosticIDs::SFINAE_SubstitutionFailure, and clang::DiagnosticIDs::SFINAE_Suppress.
Referenced by clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().
| void Sema::EmitRelatedResultTypeNote | ( | const Expr * | E | ) |
If the given expression involves a message send to a method with a related result type, emit a note describing what happened.
Definition at line 1469 of file SemaExprObjC.cpp.
References Context, Diag(), E, clang::Decl::getLocation(), clang::ObjCMessageExpr::getMethodDecl(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Expr::getType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), and clang::ObjCMethodDecl::isInstanceMethod().
Referenced by DiagnoseAssignmentResult(), emitBadConversionNotes(), and PerformImplicitConversion().
| void Sema::EmitRelatedResultTypeNoteForReturn | ( | QualType | destType | ) |
Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.
Definition at line 1440 of file SemaExprObjC.cpp.
References Context, CurContext, Diag(), findExplicitInstancetypeDeclarer(), clang::SourceRange::getBegin(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::SourceLocation::isInvalid().
Referenced by DiagnoseAssignmentResult(), and emitBadConversionNotes().
| void Sema::EndOpenMPClause | ( | ) |
End analysis of clauses.
Definition at line 935 of file SemaOpenMP.cpp.
References DSAStack, and clang::OMPC_unknown.
| void Sema::EndOpenMPDSABlock | ( | Stmt * | CurDirective | ) |
Called on end of data sharing attribute block.
Definition at line 939 of file SemaOpenMP.cpp.
References ActOnUninitializedDecl(), buildDeclRefExpr(), buildVarDecl(), AttributeLangSupport::C, DiscardCleanupsInEvaluationContext(), DSAStack, clang::Decl::getAttrs(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), and PopExpressionEvaluationContext().
| void Sema::EnterDeclaratorContext | ( | Scope * | S, |
| DeclContext * | DC | ||
| ) |
EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier.
Definition at line 1104 of file SemaDecl.cpp.
References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::Scope::setEntity().
Referenced by ActOnCXXEnterDeclaratorScope(), and ActOnCXXEnterDeclInitializer().
| void Sema::EraseUnwantedCUDAMatches | ( | const FunctionDecl * | Caller, |
| SmallVectorImpl< FunctionDecl * > & | Matches | ||
| ) |
Finds a function in Matches with highest calling priority from Caller context and erases all functions with lower calling priority.
Definition at line 240 of file SemaCUDA.cpp.
References Matches.
Referenced by FindDeallocationFunction(), and FindUsualDeallocationFunction().
| void Sema::EraseUnwantedCUDAMatches | ( | const FunctionDecl * | Caller, |
| SmallVectorImpl< DeclAccessPair > & | Matches | ||
| ) |
Definition at line 246 of file SemaCUDA.cpp.
References Matches.
| void Sema::EraseUnwantedCUDAMatches | ( | const FunctionDecl * | Caller, |
| SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl * >> & | Matches | ||
| ) |
Definition at line 254 of file SemaCUDA.cpp.
References Matches.
| void Sema::EvaluateImplicitExceptionSpec | ( | SourceLocation | Loc, |
| CXXMethodDecl * | MD | ||
| ) |
Evaluate the implicit exception specification for a defaulted special member function.
Definition at line 5208 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), computeImplicitExceptionSpec(), clang::EST_Unevaluated, clang::CXXMethodDecl::getCanonicalDecl(), clang::Sema::ImplicitExceptionSpecification::getExceptionSpec(), clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), and UpdateExceptionSpec().
Referenced by ResolveExceptionSpec().
| void Sema::ExitDeclaratorContext | ( | Scope * | S | ) |
Definition at line 1133 of file SemaDecl.cpp.
References clang::Scope::getEntity(), and clang::Scope::getParent().
Referenced by ActOnCXXExitDeclaratorScope(), and ActOnCXXExitDeclInitializer().
Definition at line 10159 of file SemaOverload.cpp.
References Context, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Type::getPointeeType(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by IsStandardConversion().
| void Sema::FilterAcceptableTemplateNames | ( | LookupResult & | R, |
| bool | AllowFunctionTemplates = true |
||
| ) |
Definition at line 89 of file SemaTemplate.cpp.
References clang::AS_public, Context, clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), isAcceptableTemplateName(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), and clang::LookupResult::Filter::replace().
| void Sema::FilterLookupForScope | ( | LookupResult & | R, |
| DeclContext * | Ctx, | ||
| Scope * | S, | ||
| bool | ConsiderLinkage, | ||
| bool | AllowInlineNamespace | ||
| ) |
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
Definition at line 1290 of file SemaDecl.cpp.
References Context, clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), isOutOfScopePreviousDeclaration(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().
Referenced by ActOnAliasDeclaration(), and ActOnNamespaceAliasDef().
| void Sema::FinalizeDeclaration | ( | Decl * | ThisDecl | ) |
FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.
Definition at line 10142 of file SemaDecl.cpp.
References clang::Decl::addAttr(), checkAttributesAfterMerging(), Context, Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::ASTContext::getDeclAlign(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::VarDecl::getDescribedVarTemplate(), clang::getDLLAttr(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::getInit(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::TargetInfo::getMaxTLSAlign(), clang::Decl::getParentFunctionOrMethod(), clang::CharUnits::getQuantity(), clang::DeclContext::getRedeclContext(), clang::ASTContext::getTargetInfo(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), hasDependentAlignment(), I, clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isFileVarDecl(), clang::Attr::isInherited(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrEnumerationType(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), clang::Decl::setInvalidDecl(), clang::Decl::specific_attrs(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by FinishForRangeVarDecl().
| Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup | ( | Scope * | S, |
| const DeclSpec & | DS, | ||
| ArrayRef< Decl * > | Group | ||
| ) |
Definition at line 10272 of file SemaDecl.cpp.
References clang::ASTContext::addDeclaratorForUnnamedTagDecl(), clang::DeclSpec::containsPlaceholderType(), Context, clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::isDeclRep(), and clang::DeclSpec::isTypeSpecOwned().
| void Sema::FinalizeVarWithDestructor | ( | VarDecl * | VD, |
| const RecordType * | DeclInitType | ||
| ) |
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
Definition at line 11436 of file SemaDeclCXX.cpp.
References CheckDestructorAccess(), Diag(), DiagnoseUseOfDecl(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticLocal(), clang::FunctionDecl::isTrivial(), LookupDestructor(), MarkFunctionReferenced(), and PDiag().
Referenced by BuildExceptionDeclaration(), and captureInBlock().
| bool Sema::FindAllocationFunctions | ( | SourceLocation | StartLoc, |
| SourceRange | Range, | ||
| bool | UseGlobal, | ||
| QualType | AllocType, | ||
| bool | IsArray, | ||
| MultiExprArg | PlaceArgs, | ||
| FunctionDecl *& | OperatorNew, | ||
| FunctionDecl *& | OperatorDelete | ||
| ) |
FindAllocationFunctions - Finds the overloads of operator new and delete that are appropriate for the allocation.
Definition at line 1723 of file SemaExprCXX.cpp.
References clang::LookupResult::begin(), CheckAllocationAccess(), Context, clang::ASTContext::DeclarationNames, DeclareGlobalNewDelete(), DeduceTemplateArguments(), Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), FindAllocationOverload(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ASTContext::getFunctionType(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getNamingClass(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::TargetInfo::getPointerWidth(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), I, clang::LookupResult::isAmbiguous(), clang::Decl::isImplicit(), isNonPlacementDeallocationFunction(), clang::Type::isRecordType(), clang::FunctionProtoType::isVariadic(), LookupOrdinaryName, LookupQualifiedName(), Matches, clang::FunctionDecl::param_size(), clang::LookupResult::suppressDiagnostics(), clang::FunctionProtoType::ExtProtoInfo::Variadic, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by BuildCXXNew().
| bool Sema::FindAllocationOverload | ( | SourceLocation | StartLoc, |
| SourceRange | Range, | ||
| DeclarationName | Name, | ||
| MultiExprArg | Args, | ||
| DeclContext * | Ctx, | ||
| bool | AllowMissing, | ||
| FunctionDecl *& | Operator, | ||
| bool | Diagnose = true |
||
| ) |
Find an fitting overload for the allocation function in the specified scope.
| StartLoc | The location of the 'new' token. |
| Range | The range of the placement arguments. |
| Name | The name of the function ('operator new' or 'operator new[]'). |
| Args | The placement arguments specified. |
| Ctx | The scope in which we should search; either a class scope or the translation unit. |
| AllowMissing | If true, report an error if we can't find any allocation functions. Otherwise, succeed but don't fill in Operator. |
| Operator | Filled in with the found allocation function. Unchanged if no allocation function was found. |
| Diagnose | If true, issue errors if the allocation function is not usable. |
Definition at line 1959 of file SemaExprCXX.cpp.
References AddOverloadCandidate(), AddTemplateOverloadCandidate(), AR_inaccessible, clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckAllocationAccess(), clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), getDeletedOrUnavailableSuffix(), clang::LookupResult::getNamingClass(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::isAmbiguous(), LookupOrdinaryName, LookupQualifiedName(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::LookupResult::suppressDiagnostics().
Referenced by FindAllocationFunctions().
| void Sema::FindAssociatedClassesAndNamespaces | ( | SourceLocation | InstantiationLoc, |
| ArrayRef< Expr * > | Args, | ||
| AssociatedNamespaceSet & | AssociatedNamespaces, | ||
| AssociatedClassSet & | AssociatedClasses | ||
| ) |
Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
This routine computes the sets of associated classes and associated namespaces searched by argument-dependent lookup (C++ [basic.lookup.argdep]) for a given set of arguments.
Definition at line 2644 of file SemaLookup.cpp.
References addAssociatedClassesAndNamespaces(), Context, clang::OverloadExpr::decls(), clang::Decl::getAsFunction(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::Expr::IgnoreParens(), clang::ASTContext::OverloadTy, clang::Result, and clang::UO_AddrOf.
Referenced by ArgumentDependentLookup(), and DiagnoseTwoPhaseLookup().
| QualType Sema::FindCompositeObjCPointerType | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | QuestionLoc | ||
| ) |
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions.
Definition at line 6539 of file SemaExpr.cpp.
References clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), clang::Type::castAs(), clang::CK_BitCast, clang::CK_CPointerToObjCPointerCast, clang::CK_NoOp, Context, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getObjCClassRedefinitionType(), clang::ASTContext::getObjCIdRedefinitionType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCSelRedefinitionType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::Type::isObjCBuiltinType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::ASTContext::isObjCSelType(), clang::Type::isVoidPointerType(), and clang::ASTContext::ObjCQualifiedIdTypesAreCompatible().
Referenced by CXXCheckConditionalOperands().
| QualType Sema::FindCompositePointerType | ( | SourceLocation | Loc, |
| Expr *& | E1, | ||
| Expr *& | E2, | ||
| bool * | NonStandardCompositeType = nullptr |
||
| ) |
Find a merged pointer type and convert the two expressions to it.
This finds the composite pointer type (or member pointer type) for E1 and E2 according to C++11 5.9p2. It converts both expressions to this type and returns it. It does not emit diagnostics.
| Loc | The location of the operator requiring these two expressions to be converted to the composite pointer type. |
If NonStandardCompositeType is non-NULL, then we are permitted to find a non-standard (but still sane) composite type to which both expressions can be converted. When such a type is chosen, *NonStandardCompositeType will be set true.
Definition at line 5094 of file SemaExprCXX.cpp.
References clang::CK_NullToMemberPointer, clang::CK_NullToPointer, clang::Qualifiers::Const, Context, clang::frontend::CPlusPlus, clang::InitializationKind::CreateCopy(), E, clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::MemberPointerType::getClass(), clang::QualType::getCVRQualifiers(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::Expr::getType(), clang::ASTContext::hasSameType(), I, ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isAnyPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Expr::NPC_ValueDependentIsNull, and clang::InitializationSequence::Perform().
Referenced by convertPointersToCompositeType(), CXXCheckConditionalOperands(), and FindCompositePointerType().
|
inline |
Definition at line 8509 of file Sema.h.
References FindCompositePointerType(), and clang::ActionResult< PtrTy, CompressInvalid >::get().
| bool Sema::FindDeallocationFunction | ( | SourceLocation | StartLoc, |
| CXXRecordDecl * | RD, | ||
| DeclarationName | Name, | ||
| FunctionDecl *& | Operator, | ||
| bool | Diagnose = true |
||
| ) |
Definition at line 2276 of file SemaExprCXX.cpp.
References AR_inaccessible, clang::LookupResult::begin(), CheckAllocationAccess(), CurContext, Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), EraseUnwantedCUDAMatches(), getLangOpts(), clang::LookupResult::getNamingClass(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::isAmbiguous(), clang::FunctionDecl::isDeleted(), LookupOrdinaryName, LookupQualifiedName(), Matches, NoteDeletedFunction(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnCXXDelete(), CheckDestructor(), and ShouldDeleteSpecialMember().
| NamedDecl * Sema::FindFirstQualifierInScope | ( | Scope * | S, |
| NestedNameSpecifier * | NNS | ||
| ) |
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup.
Definition at line 333 of file SemaCXXScopeSpec.cpp.
References clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Identifier, isAcceptableNestedNameSpecifier(), LookupName(), LookupNestedNameSpecifierName, and clang::Result.
| void Sema::FindHiddenVirtualMethods | ( | CXXMethodDecl * | MD, |
| SmallVectorImpl< CXXMethodDecl * > & | OverloadedMethods | ||
| ) |
Check if a method overloads virtual methods in a base class without overriding any.
Definition at line 6364 of file SemaDeclCXX.cpp.
References AddMostOverridenMethods(), clang::DeclContextLookupResult::begin(), E, clang::DeclContextLookupResult::end(), clang::NamedDecl::getDeclName(), clang::CXXMethodDecl::getParent(), I, clang::DeclarationName::isIdentifier(), clang::DeclContext::lookup(), and clang::CXXRecordDecl::lookupInBases().
Referenced by CheckOverrideControl(), and DiagnoseHiddenVirtualMethods().
| DeclContext * Sema::FindInstantiatedContext | ( | SourceLocation | Loc, |
| DeclContext * | DC, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Finds the instantiation of the given declaration context within the current instantiation.
Definition at line 4373 of file SemaTemplateInstantiateDecl.cpp.
References FindInstantiatedDecl().
Referenced by FindInstantiatedDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| NamedDecl * Sema::FindInstantiatedDecl | ( | SourceLocation | Loc, |
| NamedDecl * | D, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Find the instantiation of the given declaration within the current instantiation.
This routine is intended to be used when D is a declaration referenced from within a template, that needs to mapped into the corresponding declaration within an instantiation. For example, given:
In the instantiation of X<int>::getKind(), we need to map the EnumConstantDecl for KnownValue (which refers to X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue). FindInstantiatedDecl performs this mapping from within the instantiation of X<int>.
Definition at line 4407 of file SemaTemplateInstantiateDecl.cpp.
References clang::anyDependentTemplateArguments(), ArgumentPackSubstitutionIndex, clang::DeclContextLookupResult::begin(), Context, CurContext, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), Diags, clang::DeclContextLookupResult::end(), clang::DeclContext::Equals(), FindInstantiatedContext(), clang::LocalInstantiationScope::findInstantiationOf(), findInstantiationOf(), clang::Type::getAs(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::RecordType::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::ASTContext::getTypeDeclType(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::TagType::isBeingDefined(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), isInstantiationOf(), clang::Decl::isInvalidDecl(), clang::DeclContext::lookup(), RequireCompleteType(), clang::Result, SubstDecl(), and clang::TSK_ExplicitSpecialization.
Referenced by BuildVariableInstantiation(), FindInstantiatedContext(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| NamedDecl * Sema::findLocallyScopedExternCDecl | ( | DeclarationName | Name | ) |
Look for a locally scoped extern "C" declaration by the given name.
Definition at line 5147 of file SemaDecl.cpp.
References Context, clang::ASTContext::getExternCContextDecl(), clang::DeclContext::lookup(), and clang::Result.
Referenced by checkForConflictWithNonVisibleExternC(), and checkGlobalOrExternCConflict().
| bool Sema::findMacroSpelling | ( | SourceLocation & | locref, |
| StringRef | name | ||
| ) |
Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name.
If one is found, returns true and sets the location to that expansion loc.
Definition at line 1080 of file Sema.cpp.
References clang::SourceManager::getExpansionLoc(), getPreprocessor(), getSourceManager(), and clang::SourceLocation::isMacroID().
Referenced by diagnoseBadTypeAttribute().
| void Sema::FindProtocolDeclaration | ( | bool | WarnOnDeclarations, |
| bool | ForObjCContainer, | ||
| ArrayRef< IdentifierLocPair > | ProtocolId, | ||
| SmallVectorImpl< Decl * > & | Protocols | ||
| ) |
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared.
It returns list of protocol declarations in its 'Protocols' argument.
Definition at line 1208 of file SemaDeclObjC.cpp.
References CorrectTypo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), LookupObjCProtocolName, LookupProtocol(), NestedProtocolHasNoDefinition(), PDiag(), and TUScope.
| FunctionDecl * Sema::FindUsualDeallocationFunction | ( | SourceLocation | StartLoc, |
| bool | CanProvideSize, | ||
| DeclarationName | Name | ||
| ) |
Definition at line 2231 of file SemaExprCXX.cpp.
References clang::LookupResult::begin(), Context, CurContext, DeclareGlobalNewDelete(), clang::LookupResult::end(), EraseUnwantedCUDAMatches(), getLangOpts(), clang::ASTContext::getTranslationUnitDecl(), isNonPlacementDeallocationFunction(), LookupOrdinaryName, LookupQualifiedName(), Matches, and clang::NumArgs.
Referenced by ActOnCXXDelete(), and CheckDestructor().
| StmtResult Sema::FinishCXXForRangeStmt | ( | Stmt * | S, |
| Stmt * | B | ||
| ) |
FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
This is a separate step from ActOnCXXForRangeStmt because analysis of the body cannot be performed until after the type of the range variable is determined.
Definition at line 2567 of file SemaStmt.cpp.
References DiagnoseForRangeVariableCopies(), clang::CXXForRangeStmt::getRParenLoc(), S, clang::CXXForRangeStmt::setBody(), and clang::StmtError().
| void Sema::finishLambdaExplicitCaptures | ( | sema::LambdaScopeInfo * | LSI | ) |
Note that we have finished the explicit captures for the given lambda.
Definition at line 471 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::finishedExplicitCaptures().
| StmtResult Sema::FinishObjCForCollectionStmt | ( | Stmt * | S, |
| Stmt * | B | ||
| ) |
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
Definition at line 2404 of file SemaStmt.cpp.
References S, clang::ObjCForCollectionStmt::setBody(), and clang::StmtError().
| Sema::TemplateDeductionResult Sema::FinishTemplateArgumentDeduction | ( | FunctionTemplateDecl * | FunctionTemplate, |
| SmallVectorImpl< DeducedTemplateArgument > & | Deduced, | ||
| unsigned | NumExplicitlySpecified, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| SmallVectorImpl< OriginalCallArg > const * | OriginalCallArgs = nullptr, |
||
| bool | PartialOverloading = false |
||
| ) |
Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.
| OriginalCallArgs | If non-NULL, the original call arguments against which the deduced argument types should be compared. |
Definition at line 2755 of file SemaTemplateDeduction.cpp.
References clang::Sema::OriginalCallArg::ArgIdx, Builder, clang::sema::TemplateDeductionInfo::CallArgIndex, CheckOriginalCallArgDeduction(), CheckTemplateArgument(), Context, ConvertDeducedTemplateArgument(), clang::TemplateArgumentList::CreateCopy(), CTAK_Specified, CurrentInstantiationScope, clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution, clang::sema::TemplateDeductionInfo::diag_begin(), clang::sema::TemplateDeductionInfo::diag_end(), clang::sema::TemplateDeductionInfo::FirstArg, clang::TemplateArgumentLoc::getArgument(), clang::FunctionTemplateDecl::getCanonicalDecl(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::TemplateArgument::getEmptyPack(), clang::SourceRange::getEnd(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::sema::TemplateDeductionInfo::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::FunctionDecl::getParamDecl(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), clang::FunctionDecl::getPrimaryTemplate(), clang::TemplateDecl::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::Sema::SFINAETrap::hasErrorOccurred(), I, clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::TemplateArgument::isNull(), clang::Decl::isParameterPack(), clang::Decl::isTemplateParameterPack(), makeTemplateParameter(), clang::TemplateArgumentList::OnStack, clang::Sema::OriginalCallArg::OriginalArgType, clang::sema::TemplateDeductionInfo::Param, clang::sema::TemplateDeductionInfo::reset(), clang::LocalInstantiationScope::ResetPartiallySubstitutedPack(), clang::sema::TemplateDeductionInfo::SecondArg, clang::Decl::setInvalidDecl(), clang::TemplateParameterList::size(), SubstDecl(), SubstDefaultTemplateArgumentIfAvailable(), SubstType(), SuppressedDiagnostics, clang::sema::TemplateDeductionInfo::take(), TDK_DeducedMismatch, TDK_Incomplete, TDK_InstantiationDepth, TDK_SubstitutionFailure, TDK_Success, and Unevaluated.
Referenced by DeduceTemplateArguments(), getMoreSpecializedPartialSpecialization(), and SpecializeCorrespondingLambdaCallOperatorAndInvoker().
| Expr * Sema::FixOverloadedFunctionReference | ( | Expr * | E, |
| DeclAccessPair | Found, | ||
| FunctionDecl * | Fn | ||
| ) |
FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibly with some parentheses and perhaps a '&' around it).
We have resolved the overloaded function to the function declaration Fn, so patch up the expression E to refer (possibly indirectly) to Fn. Returns the new expr.
Definition at line 12791 of file SemaOverload.cpp.
References clang::ASTContext::BoundMemberTy, CheckCXXThisCapture(), Context, clang::DeclRefExpr::Create(), clang::MemberExpr::Create(), clang::ImplicitCastExpr::Create(), clang::DeclAccessPair::getDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getPointerType(), clang::getQualifier(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), MarkDeclRefReferenced(), MarkMemberReferenced(), clang::OK_Ordinary, clang::DeclRefExpr::setHadMultipleCandidates(), clang::MemberExpr::setHadMultipleCandidates(), clang::ast_matchers::type, clang::UO_AddrOf, clang::VK_LValue, and clang::VK_RValue.
Referenced by BuildCallToMemberFunction(), FinishOverloadedCallExpr(), FixOverloadedFunctionReference(), IsStandardConversion(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), ResolveAndFixSingleFunctionTemplateSpecialization(), and TryStaticMemberPointerUpcast().
| ExprResult Sema::FixOverloadedFunctionReference | ( | ExprResult | E, |
| DeclAccessPair | FoundDecl, | ||
| FunctionDecl * | Fn | ||
| ) |
Definition at line 12948 of file SemaOverload.cpp.
References FixOverloadedFunctionReference(), and clang::ActionResult< PtrTy, CompressInvalid >::get().
| void Sema::ForceDeclarationOfImplicitMembers | ( | CXXRecordDecl * | Class | ) |
Force the declaration of any implicitly-declared members of this class.
Definition at line 718 of file SemaLookup.cpp.
References CanDeclareSpecialMemberFunction(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), and clang::CXXRecordDecl::needsImplicitMoveConstructor().
Referenced by checkClassLevelDLLAttribute(), and LookupVisibleDecls().
| ExprResult Sema::forceUnknownAnyToType | ( | Expr * | E, |
| QualType | ToType | ||
| ) |
Force an expression with unknown-type to an expression of the given type.
Definition at line 14471 of file SemaExpr.cpp.
Referenced by ActOnFinishFullExpr(), and BuildInstanceMessage().
| bool Sema::FormatStringHasSArg | ( | const StringLiteral * | FExpr | ) |
Definition at line 4740 of file SemaChecking.cpp.
References clang::ASTContext::getAsConstantArrayType(), clang::ConstantArrayType::getSize(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
Referenced by DiagnoseCStringFormatDirectiveInCFAPI(), and DiagnoseCStringFormatDirectiveInObjCAPI().
| void Sema::FreePackedContext | ( | ) |
FreePackedContext - Deallocate and null out PackContext.
Definition at line 110 of file SemaAttr.cpp.
References PackContext.
Referenced by ~Sema().
| void Sema::FreeVisContext | ( | ) |
FreeVisContext - Deallocate and null out VisContext.
Definition at line 536 of file SemaAttr.cpp.
References VisContext.
Referenced by PopPragmaVisibility(), and ~Sema().
| bool Sema::FunctionParamTypesAreEqual | ( | const FunctionProtoType * | OldType, |
| const FunctionProtoType * | NewType, | ||
| unsigned * | ArgPos = nullptr |
||
| ) |
FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types.
Caller has already checked that they have same number of arguments. If the parameters are different, ArgPos will have the parameter index of the first different parameter.
Definition at line 2664 of file SemaOverload.cpp.
References Context, E, clang::ASTContext::hasSameType(), clang::FunctionProtoType::param_type_begin(), and clang::FunctionProtoType::param_type_end().
| bool Sema::GatherArgumentsForCall | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FDecl, | ||
| const FunctionProtoType * | Proto, | ||
| unsigned | FirstParam, | ||
| ArrayRef< Expr * > | Args, | ||
| SmallVectorImpl< Expr * > & | AllArgs, | ||
| VariadicCallType | CallType = VariadicDoesNotApply, |
||
| bool | AllowExplicit = false, |
||
| bool | IsListInitialization = false |
||
| ) |
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
Definition at line 4699 of file SemaExpr.cpp.
References clang::ASTContext::ARCUnbridgedCastTy, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::InitializedEntity::InitializeParameter(), clang::FunctionDecl::isExternC(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionProtoType::isParamConsumed(), clang::InitializedEntity::setParameterCFAudited(), and clang::ASTContext::UnknownAnyTy.
Referenced by BuildCXXNew(), and CompleteConstructorCall().
| void Sema::GatherGlobalCodeCompletions | ( | CodeCompletionAllocator & | Allocator, |
| CodeCompletionTUInfo & | CCTUInfo, | ||
| SmallVectorImpl< CodeCompletionResult > & | Results | ||
| ) |
Definition at line 7500 of file SemaCodeComplete.cpp.
References AddMacroResults(), Builder, clang::CodeCompletionContext::CCC_Recovery, clang::ASTContext::getTranslationUnitDecl(), and LookupVisibleDecls().
| std::string Sema::getAmbiguousPathsDisplayString | ( | CXXBasePaths & | Paths | ) |
Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.
This function builds a string that can be used in error messages to show the different paths that one can take through the inheritance hierarchy to go from the derived class to different subobjects of a base class. The result looks something like this:
Definition at line 1837 of file SemaDeclCXX.cpp.
References clang::CXXBasePaths::begin(), Context, clang::CXXBasePaths::end(), clang::CXXBasePaths::getOrigin(), and clang::ASTContext::getTypeDeclType().
Referenced by AttachBaseSpecifiers(), CheckDerivedToBaseConversion(), DiagnoseAmbiguousLookup(), and TryStaticMemberPointerUpcast().
|
inline |
Definition at line 1049 of file Sema.h.
References Consumer.
Referenced by getASTMutationListener(), and clang::ParseAST().
|
inline |
Definition at line 1048 of file Sema.h.
References Context.
Referenced by ActOnModuleInclude(), ActOnOpenMPRegionEnd(), clang::TypoCorrectionConsumer::addNamespaces(), assignInheritanceModel(), buildDeclRefExpr(), checkBuiltinTemplateIdType(), checkClassLevelDLLAttribute(), checkForConsumableClass(), CheckOMPThreadPrivateDecl(), CheckOpenMPLoop(), createImplicitModuleImportForErrorRecovery(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), DiagnoseBinOpPrecedence(), DiagnoseNarrowingInInitList(), diagnoseObjCLiteralComparison(), diagnoseRepeatedUseOfWeak(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), EvaluatesAsFalse(), EvaluatesAsTrue(), handleVecTypeHint(), hasBetterEnableIfAttrs(), instantiateDependentEnableIfAttr(), InstantiateVariableDefinition(), InstantiateVariableInitializer(), isMacroDefined(), IsOpenMPCapturedByRef(), IsStandardConversion(), LookupBuiltin(), clang::ParseAST(), propagateDLLAttrToBaseClassTemplate(), ReportOriginalDSA(), TryOCLSamplerInitialization(), and TryOCLZeroEventInitialization().
| ASTMutationListener * Sema::getASTMutationListener | ( | ) | const |
Definition at line 318 of file Sema.cpp.
References getASTConsumer(), and clang::ASTConsumer::GetASTMutationListener().
Referenced by completeExprArrayBound(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), DoMarkVarDeclReferenced(), handleObjCBoxable(), InstantiateFunctionDefinition(), and UpdateExceptionSpec().
| const AttributedType * Sema::getCallingConvAttributedType | ( | QualType | T | ) | const |
Get the outermost AttributedType node that sets a calling convention.
Valid types should not have multiple attributes with different CCs.
Definition at line 2575 of file SemaDecl.cpp.
References clang::Type::getAs(), clang::AttributedType::getModifiedType(), and clang::AttributedType::isCallingConv().
Referenced by handleFunctionTypeAttr().
| QualType Sema::getCapturedDeclRefType | ( | VarDecl * | Var, |
| SourceLocation | Loc | ||
| ) |
Given a variable, determine the type that a reference to that variable will have in the given scope.
Definition at line 13392 of file SemaExpr.cpp.
References TryCapture_Implicit, and tryCaptureVariable().
Referenced by getDecltypeForExpr().
| DeclContext * Sema::getContainingDC | ( | DeclContext * | DC | ) |
Definition at line 1033 of file SemaDecl.cpp.
References clang::DeclContext::getLexicalParent(), and clang::isLambdaCallOperator().
| VarDecl * Sema::getCopyElisionCandidate | ( | QualType | ReturnType, |
| Expr * | E, | ||
| bool | AllowFunctionParameter | ||
| ) |
Determine whether the given expression is a candidate for copy elision in either a return statement or a throw expression.
| ReturnType | If we're determining the copy elision candidate for a return statement, this is the return type of the function. If we're determining the copy elision candidate for a throw expression, this will be a NULL type. |
| E | The expression being returned from the function or block, or being thrown. |
| AllowFunctionParameter | Whether we allow function parameters to be considered NRVO candidates. C++ prohibits this for NRVO itself, but we re-use this logic to determine whether we should try to move as part of a return or throw (which does allow function parameters). |
Definition at line 2673 of file SemaStmt.cpp.
References clang::frontend::CPlusPlus, clang::DeclRefExpr::getDecl(), clang::Expr::IgnoreParens(), and clang::DeclRefExpr::refersToEnclosingVariableOrCapture().
| BlockScopeInfo * Sema::getCurBlock | ( | ) |
Retrieve the current block, if any.
Definition at line 1192 of file Sema.cpp.
References ActiveTemplateInstantiations, CurContext, and FunctionScopes.
Referenced by AddKeywordsToConsumer(), and AddOrdinaryNameResults().
| CapturedRegionScopeInfo * Sema::getCurCapturedRegion | ( | ) |
Retrieve the current captured region, if any.
Definition at line 1517 of file Sema.cpp.
References FunctionScopes.
Referenced by ActOnOpenMPRegionStart().
| sema::CompoundScopeInfo & Sema::getCurCompoundScope | ( | ) | const |
Definition at line 327 of file SemaStmt.cpp.
| AvailabilityResult Sema::getCurContextAvailability | ( | ) | const |
Definition at line 14817 of file SemaDecl.cpp.
References clang::AR_Available, clang::Decl::getAvailability(), and getCurObjCLexicalContext().
Referenced by DiagnoseAvailabilityOfDecl().
|
inline |
Definition at line 1167 of file Sema.h.
References FunctionScopes.
Referenced by ActOnOpenMPAtomicDirective(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPMasterDirective(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSimdDirective(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTeamsDirective(), ActOnStartOfObjCMethodDef(), ActOnSuperMessage(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), BuildInstanceMessage(), checkCoroutineContext(), handleFallThroughAttr(), hasAnyUnrecoverableErrorsInThisFunction(), PopCompoundScope(), PushCompoundScope(), RecordModifiableNonNullParam(), and recordUseOfEvaluatedWeak().
| FunctionDecl * Sema::getCurFunctionDecl | ( | ) |
getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed.
If we're currently in a 'block', this returns the containing context.
Definition at line 947 of file Sema.cpp.
References getFunctionLevelDeclContext().
Referenced by diagnoseUseOfInternalDeclInInlineFunction(), and LookupMemberExpr().
| NamedDecl * Sema::getCurFunctionOrMethodDecl | ( | ) |
getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null.
If we're currently in a 'block', this returns the containing context.
Definition at line 959 of file Sema.cpp.
References getFunctionLevelDeclContext().
Referenced by AddKeywordsToConsumer(), DiagRuntimeBehavior(), and handleInitPriorityAttr().
| LambdaScopeInfo * Sema::getCurGenericLambda | ( | ) |
Retrieve the current generic lambda info, if any.
Definition at line 1223 of file Sema.cpp.
References getCurLambda().
Referenced by clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().
| LambdaScopeInfo * Sema::getCurLambda | ( | ) |
Retrieve the current lambda scope info, if any.
Definition at line 1207 of file Sema.cpp.
References ActiveTemplateInstantiations, CurContext, and FunctionScopes.
Referenced by ActOnFinishFullExpr(), ConvertDeclSpecToType(), DoMarkVarDeclReferenced(), getCurGenericLambda(), getDecltypeForExpr(), RecordParsingTemplateParameterDepth(), and UpdateMarkingForLValueToRValue().
|
inline |
Definition at line 9208 of file Sema.h.
References CurContext, and OriginalLexicalContext.
Referenced by ActOnOpenMPIdExpression(), CheckObjCDeclScope(), CheckOMPThreadPrivateDecl(), EmitAvailabilityWarning(), and getCurObjCLexicalContext().
| ObjCMethodDecl * Sema::getCurMethodDecl | ( | ) |
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.
If we're currently in a 'block', this returns the containing context.
Definition at line 952 of file Sema.cpp.
References getFunctionLevelDeclContext(), and clang::DeclContext::getParent().
Referenced by ActOnStartOfObjCMethodDef(), AddClassMessageCompletions(), AddOrdinaryNameResults(), AddSuperSendCompletion(), BuildClassMessage(), BuildInstanceMessage(), CheckForModifiableLvalue(), findRetainCycleOwner(), getBaseMessageSendResultType(), getObjCMessageKind(), LookupMemberExpr(), and LookupPotentialTypoResult().
|
inline |
Definition at line 9214 of file Sema.h.
References getCurLexicalContext().
Referenced by DiagnoseUnusedOfDecl(), and getCurContextAvailability().
| CXXRecordDecl * Sema::getCurrentInstantiationOf | ( | NestedNameSpecifier * | NNS | ) |
If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).
| NNS | a dependent nested name specifier. |
Definition at line 171 of file SemaCXXScopeSpec.cpp.
References clang::frontend::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), getCurrentInstantiationOf(), getLangOpts(), and clang::NestedNameSpecifier::isDependent().
Referenced by computeDeclContext().
| MangleNumberingContext * Sema::getCurrentMangleNumberContext | ( | const DeclContext * | DC, |
| Decl *& | ManglingContextDecl | ||
| ) |
Compute the mangling number context for a lambda expression or block literal.
| DC | - The DeclContext containing the lambda expression or block literal. | |
| [out] | ManglingContextDecl | - Returns the ManglingContextDecl associated with the context, if relevant. |
Definition at line 278 of file SemaLambda.cpp.
References Context, ContextKind, clang::DeclContext::getLexicalParent(), clang::ASTContext::getManglingNumberContext(), and isInInlineFunction().
| QualType Sema::getCurrentThisType | ( | ) |
Try to retrieve the type of the 'this' pointer.
Definition at line 834 of file SemaExprCXX.cpp.
References Context, clang::ASTContext::getPointerType(), clang::ASTContext::getTypeDeclType(), clang::isGenericLambdaCallOperatorSpecialization(), and clang::QualType::isNull().
Referenced by ActOnCXXThis(), addThisCompletion(), CheckCXXThisCapture(), DefineImplicitCopyAssignment(), DefineImplicitMoveAssignment(), RebuildLambdaScopeInfo(), and recoverFromMSUnqualifiedLookup().
|
inline |
Retrieve the parser's current scope.
This routine must only be used when it is certain that semantic analysis and the parser are in precisely the same context, which is not the case when, e.g., we are performing any kind of template instantiation. Therefore, the only safe places to use this scope are in the parser itself and in routines directly invoked from the parser and never from template substitution or instantiation.
Definition at line 9197 of file Sema.h.
Referenced by ActOnObjCBoolLiteral(), ActOnSuperScopeSpecifier(), emitReplacement(), clang::Parser::getCurScope(), getScopeForContext(), HandleExtVectorTypeAttr(), SemaBuiltinSEHScopeCheck(), and warnAboutAmbiguousFunction().
| std::string Sema::getDeletedOrUnavailableSuffix | ( | const FunctionDecl * | FD | ) |
Retrieve the message suffix that should be added to a diagnostic complaining about the given function being deleted or unavailable.
Definition at line 384 of file SemaExpr.cpp.
References clang::Decl::getAvailability().
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedArrowExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), FindAllocationOverload(), and FinishOverloadedCallExpr().
| ParsedType Sema::getDestructorName | ( | SourceLocation | TildeLoc, |
| IdentifierInfo & | II, | ||
| SourceLocation | NameLoc, | ||
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext | ||
| ) |
Definition at line 82 of file SemaExprCXX.cpp.
References clang::CXXScopeSpec::Adopt(), clang::LookupResult::clear(), Context, clang::FixItHint::CreateReplacement(), Diag(), clang::ETK_None, clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::LookupResult::getAsSingle(), clang::TemplateName::getAsTemplateDecl(), clang::Scope::getEntity(), clang::Decl::getLocation(), clang::NestedNameSpecifier::getPrefix(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameUnqualifiedType(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclContext::isFileContext(), clang::Type::isIncompleteType(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::CXXScopeSpec::location_data(), clang::OpaquePtr< QualType >::make(), Step, and clang::TemplateSpecializationType().
Referenced by clang::Parser::ParseUnqualifiedId().
| ParsedType Sema::getDestructorType | ( | const DeclSpec & | DS, |
| ParsedType | ObjectType | ||
| ) |
Definition at line 326 of file SemaExprCXX.cpp.
References Context, Diag(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::ASTContext::hasSameUnqualifiedType(), clang::OpaquePtr< QualType >::make(), clang::DeclSpec::TST_decltype, and clang::DeclSpec::TST_error.
Referenced by clang::Parser::ParseUnqualifiedId().
|
inline |
Definition at line 1045 of file Sema.h.
References Diags.
Referenced by CheckFallThroughForBody(), DiagnoseBadDeduction(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), and tryExprAsCall().
| QualType Sema::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
| const CXXScopeSpec & | SS, | ||
| QualType | T | ||
| ) |
Retrieve a version of the type 'T' that is elaborated by Keyword and qualified by the nested-name-specifier contained in SS.
Definition at line 6900 of file SemaType.cpp.
References Context, clang::ETK_None, clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::QualType::isNull(), and clang::CXXScopeSpec::isValid().
Referenced by buildNestedType(), and ConvertDeclSpecToType().
|
inline |
Definition at line 1171 of file Sema.h.
References FunctionScopes.
Referenced by BuildInstanceMessage().
| SourceRange Sema::getExprRange | ( | Expr * | E | ) | const |
Definition at line 488 of file SemaExpr.cpp.
|
inline |
Definition at line 1051 of file Sema.h.
Referenced by AddClassMessageCompletions(), and CheckExtVectorComponent().
| std::string Sema::getFixItZeroInitializerForType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) | const |
Get a string to suggest for zero-initialization of a type.
Definition at line 201 of file SemaFixItUtils.cpp.
References clang::Type::getAsCXXRecordDecl(), getScalarZeroExpressionForType(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::hasUserProvidedDefaultConstructor(), clang::CXXRecordDecl::isAggregate(), clang::Type::isScalarType(), and LangOpts.
Referenced by maybeRecoverWithZeroInitialization(), SuggestInitializationFixit(), and warnAboutAmbiguousFunction().
| std::string Sema::getFixItZeroLiteralForType | ( | QualType | T, |
| SourceLocation | Loc | ||
| ) | const |
Definition at line 220 of file SemaFixItUtils.cpp.
References getScalarZeroExpressionForType().
| IdentifierInfo * Sema::getFloat128Identifier | ( | ) | const |
Definition at line 1503 of file Sema.cpp.
References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.
Referenced by LookupBuiltin().
Definition at line 1216 of file SemaChecking.cpp.
Referenced by DiagnoseCStringFormatDirectiveInCFAPI(), and DiagnoseCStringFormatDirectiveInObjCAPI().
|
static |
Definition at line 3208 of file SemaChecking.cpp.
Referenced by checkFormatStringExpr().
|
inline |
Definition at line 1043 of file Sema.h.
References FPFeatures.
| DeclContext * Sema::getFunctionLevelDeclContext | ( | ) |
Definition at line 927 of file Sema.cpp.
References CurContext, and clang::DeclContext::getParent().
Referenced by ClassifyImplicitMemberAccess(), DiagnoseConstAssignment(), diagnoseInstanceReference(), getCurFunctionDecl(), getCurFunctionOrMethodDecl(), getCurMethodDecl(), and tryCaptureObjCSelf().
| ParsedType Sema::getInheritingConstructorName | ( | CXXScopeSpec & | SS, |
| SourceLocation | NameLoc, | ||
| IdentifierInfo & | Name | ||
| ) |
Handle the result of the special case name lookup for inheriting constructor declarations.
'NS::X::X' and 'NS::X<...>::X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.
Definition at line 48 of file SemaExprCXX.cpp.
References Context, clang::ETK_None, clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsType(), clang::ASTContext::getDependentNameType(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
| ObjCIvarDecl * Sema::GetIvarBackingPropertyAccessor | ( | const ObjCMethodDecl * | Method, |
| const ObjCPropertyDecl *& | PDecl | ||
| ) | const |
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL.
It also returns ivar's property on success.
Definition at line 4543 of file SemaDeclObjC.cpp.
References clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCPropertyDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::ObjCInterfaceDecl::lookupMethod().
Referenced by DiagnoseUnusedBackingIvarInAccessor().
|
inline |
Definition at line 1041 of file Sema.h.
References LangOpts.
Referenced by ActOnCXXMemberDeclarator(), ActOnCXXNamedCast(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnDecltypeExpression(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEnumBody(), ActOnEnumConstant(), ActOnFinishFullExpr(), ActOnFriendFunctionDecl(), ActOnMethodDeclaration(), ActOnModuleBegin(), ActOnModuleEnd(), ActOnModuleImport(), ActOnObjCExceptionDecl(), ActOnOpenMPAlignedClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionEnd(), ActOnParamDefaultArgument(), ActOnPragmaFPContract(), ActOnPropertyImplDecl(), ActOnStartCXXMemberReference(), ActOnStartOfObjCMethodDef(), ActOnTypeName(), ActOnUsingDeclaration(), AddBuiltinCandidate(), AddConversionCandidate(), clang::TypoCorrectionConsumer::addCorrection(), addFixitForObjCARCConversion(), AddImplicitlyDeclaredMembersToClass(), AddKeywordsToConsumer(), addMethodToGlobalList(), AddMsStructLayoutForRecord(), AddOrdinaryNameResults(), AddOverloadCandidate(), AddSurrogateCandidate(), AdjustDestructorExceptionSpec(), AtomicPropertySetterGetterRules(), BuildArrayType(), BuildCallToMemberFunction(), BuildClassMessage(), BuildCStyleCastExpr(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildExceptionDeclaration(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildObjCEncodeExpression(), BuildObjCExceptionDecl(), buildOverloadedCallSet(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildReferenceType(), buildSingleCopyAssignRecursively(), BuildTypeofExprType(), captureInBlock(), captureInCapturedRegion(), CheckAllocatedType(), checkARCPropertyImpl(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), CheckAsmLValue(), checkBlockPointerTypesForAssignment(), CheckBooleanCondition(), checkClassLevelDLLAttribute(), CheckCommaOperands(), checkCondition(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConstexprFunctionStmt(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), CheckCUDATarget(), CheckCXX98CompatAccessibleCopy(), CheckEffectiveAccess(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedSpecialMember(), checkForConflictWithNonVisibleExternC(), CheckForModifiableLvalue(), CheckFriendTypeDecl(), CheckFunctionReturnType(), checkGlobalOrExternCConflict(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckLiteralOperatorDeclaration(), CheckMessageArgumentTypes(), CheckObjCCollectionLiteralElement(), CheckObjCMethodOverride(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckOMPThreadPrivateDecl(), CheckOpenMPIterationSpace(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionExceptionSpec(), CheckPlaceholderExpr(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckReturnStackAddr(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), CheckTollFreeBridgeCast(), CheckTollFreeBridgeStaticCast(), checkTrivialClassMembers(), CheckUsingDeclQualifier(), CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), compareConversionFunctions(), CompareImplicitConversionSequences(), CompareStandardConversionSequences(), CompleteNonViableCandidate(), ConversionToObjCStringLiteralCheck(), ConvertDeclSpecToType(), createImplicitModuleImportForErrorRecovery(), CreateNewFunctionDecl(), CreatePropertyDecl(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceAutoType(), deducePropertyOwnershipFromType(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), defaultedSpecialMemberIsConstexpr(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitLambdaToBlockPointerConversion(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseAssignmentResult(), DiagnoseBadShiftValues(), DiagnoseDefaultTemplateArgument(), diagnoseDeprecatedCopyOperation(), diagnoseListInit(), DiagnoseMismatchedNewDelete(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNarrowingInInitList(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseSwitchLabelsFallthrough(), diagnoseTypo(), diagnoseUncapturableValueReference(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseWeakIvars(), DiagUninitUse(), DoEmitAvailabilityWarning(), EmitCurrentDiagnostic(), emitEmptyLookupTypoDiagnostic(), emitReplacement(), EraseUnwantedCUDAMatchesImpl(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), filterNonConflictingPreviousTypedefDecls(), FindAllocationFunctions(), FindCompositePointerType(), FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::DeclSpec::Finish(), FinishForRangeVarDecl(), clang::FunctionCallFilterCCC::FunctionCallFilterCCC(), getCCForDeclaratorChunk(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getNSNumberFactoryMethod(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), GetTypeOfFunction(), getUDSuffixLoc(), handleDelayedForbiddenType(), handleDeprecatedAttr(), handleFloatConversion(), handleFunctionTypeAttr(), handleInitPriorityAttr(), HandleMSProperty(), handleNSReturnsRetainedAttr(), handleObjCOwnershipTypeAttr(), HasAccess(), hasVisibleDefinition(), IdentifyCUDAPreference(), IgnoredValueConversions(), clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), isAbstractType(), isAcceptableTagRedeclContext(), clang::isBetterOverloadCandidate(), isCurrentClassName(), isCurrentClassNameTypo(), IsCXX98CompatWarning(), IsDerivedFrom(), isFunctionDefinitionDiscarded(), isIncompleteDeclExternC(), isLibstdcxxPointerReturnFalseHack(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isResultTypeOrTemplate(), IsStandardConversion(), isStdInitializerList(), isTagTypeWithMissingTag(), LookupBuiltin(), LookupConstructors(), LookupDirect(), LookupMemberExpr(), LookupMemberExprInRecord(), LookupObjCInterfaceDeclForLiteral(), LookupSpecialMember(), LookupVisibleDecls(), LookupVisibleDecls(), mapCodeCompletionContext(), MarkExprReferenced(), MarkFunctionReferenced(), MarkMemberReferenced(), MatchTwoMethodDeclarations(), MaybeBindToTemporary(), MaybeProduceObjCObject(), MergeCXXFunctionDecl(), mergeInternalLinkageAttr(), mergeTypeWithPrevious(), MergeVarDeclExceptionSpecs(), clang::ParseAST(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), ProcessPropertyDecl(), ReferenceDllExportedMethods(), ResolveSingleFunctionTemplateSpecialization(), Sema(), SetIvarInitializers(), clang::DeclSpec::SetStorageClassSpec(), ShouldDeleteSpecialMember(), shouldSkipAnonEnumBody(), SubstituteExplicitTemplateArguments(), tryCaptureVariable(), TryDefaultInitialization(), TryImplicitConversion(), TryListInitialization(), TryNamespaceTypoCorrection(), TryOCLSamplerInitialization(), TryOCLZeroEventInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryReinterpretCast(), TryStaticCast(), TryValueInitialization(), tryVectorConvertAndSplat(), ValidateObjCLiteralInterfaceDecl(), VerifyIntegerConstantExpression(), and WarnConflictingTypedMethods().
| SourceLocation Sema::getLocationOfStringLiteralByte | ( | const StringLiteral * | SL, |
| unsigned | ByteNo | ||
| ) | const |
Definition at line 45 of file SemaChecking.cpp.
References Context, clang::StringLiteral::getLocationOfByte(), and clang::ASTContext::getTargetInfo().
| SourceLocation Sema::getLocForEndOfToken | ( | SourceLocation | Loc, |
| unsigned | Offset = 0 |
||
| ) |
Calls Lexer::getLocForEndOfToken()
Definition at line 46 of file Sema.cpp.
References clang::Lexer::getLocForEndOfToken(), and SourceMgr.
Referenced by ActOnAtEnd(), ActOnCXXDelete(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), addFixitForObjCARCConversion(), AtomicPropertySetterGetterRules(), CheckConversionDeclarator(), CheckEquivalentExceptionSpec(), CheckFriendTypeDecl(), CheckMemorySizeofForComparison(), CheckObjCBridgeRelatedConversions(), checkTypeParamListConsistency(), CheckUsingDeclQualifier(), CreateIfFixit(), CreatePropertyDecl(), clang::InitializationSequence::Diagnose(), DiagnoseAssignmentAsCondition(), DiagnoseDirectIsaAccess(), diagnoseLogicalNotOnLHSofComparison(), DiagnoseMismatchedNewDelete(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), clang::DeclSpec::Finish(), GetFullTypeForDeclarator(), handleFallThroughAttr(), isNullPointerValueTemplateArgument(), maybeRecoverWithZeroInitialization(), ParseObjCEncodeExpression(), SuggestInitializationFixit(), SuggestParentheses(), clang::ConversionFixItGenerator::tryToFixConversion(), tryToRecoverWithCall(), and warnAboutAmbiguousFunction().
| llvm::DenseSet< Module * > & Sema::getLookupModules | ( | ) |
Get the set of additional modules that should be checked during name lookup.
A module and its imports become visible when instanting a template defined within it.
Definition at line 1418 of file SemaLookup.cpp.
References getDefiningModule(), and I.
| QualType Sema::getMessageSendResultType | ( | QualType | ReceiverType, |
| ObjCMethodDecl * | Method, | ||
| bool | isClassMessage, | ||
| bool | isSuperMessage | ||
| ) |
Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send.
Definition at line 1341 of file SemaExprObjC.cpp.
References Context, clang::ASTContext::getAttributedType(), getBaseMessageSendResultType(), clang::QualType::getDesugaredType(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), clang::QualType::getTypePtr(), clang::None, clang::NonNull, clang::Nullable, and clang::Unspecified.
Referenced by CheckMessageArgumentTypes().
| const llvm::MapVector< FieldDecl *, Sema::DeleteLocs > & Sema::getMismatchingDeleteExpressions | ( | ) | const |
Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
Definition at line 1525 of file Sema.cpp.
References DeleteExprs.
| ModuleLoader & Sema::getModuleLoader | ( | ) | const |
Retrieve the module loader associated with the preprocessor.
Definition at line 50 of file Sema.cpp.
Referenced by ActOnModuleImport(), ActOnModuleInclude(), and createImplicitModuleImportForErrorRecovery().
| ClassTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | ClassTemplatePartialSpecializationDecl * | PS1, |
| ClassTemplatePartialSpecializationDecl * | PS2, | ||
| SourceLocation | Loc | ||
| ) |
Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).
| PS1 | the first class template partial specialization |
| PS2 | the second class template partial specialization |
Definition at line 4527 of file SemaTemplateDeduction.cpp.
References DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::TemplateParameterList::size(), and clang::TDF_None.
Referenced by InstantiateClassTemplateSpecialization().
| VarTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | PS1, |
| VarTemplatePartialSpecializationDecl * | PS2, | ||
| SourceLocation | Loc | ||
| ) |
TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type.
Definition at line 4600 of file SemaTemplateDeduction.cpp.
References Context, clang::TemplateArgumentList::data(), DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::ASTContext::getCanonicalTemplateName(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplatePartialSpecializationDecl::getTemplateParameters(), clang::ASTContext::getTemplateSpecializationType(), clang::Name, clang::TemplateParameterList::size(), clang::TemplateArgumentList::size(), and clang::TDF_None.
| FunctionTemplateDecl * Sema::getMoreSpecializedTemplate | ( | FunctionTemplateDecl * | FT1, |
| FunctionTemplateDecl * | FT2, | ||
| SourceLocation | Loc, | ||
| TemplatePartialOrderingContext | TPOC, | ||
| unsigned | NumCallArguments1, | ||
| unsigned | NumCallArguments2 | ||
| ) |
Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
| FT1 | the first function template |
| FT2 | the second function template |
| TPOC | the context in which we are performing partial ordering of function templates. |
| NumCallArguments1 | The number of arguments in the call to FT1, used only when TPOC is TPOC_Call. |
| NumCallArguments2 | The number of arguments in the call to FT2, used only when TPOC is TPOC_Call. |
Definition at line 4377 of file SemaTemplateDeduction.cpp.
References isAtLeastAsSpecializedAs(), and isVariadicFunctionTemplate().
Referenced by getMostSpecialized(), and clang::isBetterOverloadCandidate().
| UnresolvedSetIterator Sema::getMostSpecialized | ( | UnresolvedSetIterator | SpecBegin, |
| UnresolvedSetIterator | SpecEnd, | ||
| TemplateSpecCandidateSet & | FailedCandidates, | ||
| SourceLocation | Loc, | ||
| const PartialDiagnostic & | NoneDiag, | ||
| const PartialDiagnostic & | AmbigDiag, | ||
| const PartialDiagnostic & | CandidateDiag, | ||
| bool | Complain = true, |
||
| QualType | TargetType = QualType() |
||
| ) |
Retrieve the most specialized of the given function template specializations.
| SpecBegin | the start iterator of the function template specializations that we will be comparing. |
| SpecEnd | the end iterator of the function template specializations, paired with SpecBegin. |
| Loc | the location where the ambiguity or no-specializations diagnostic should occur. |
| NoneDiag | partial diagnostic used to diagnose cases where there are no matching candidates. |
| AmbigDiag | partial diagnostic used to diagnose an ambiguity, if one occurs. |
| CandidateDiag | partial diagnostic used for each function template specialization that is a candidate in the ambiguous ordering. One parameter in this diagnostic should be unbound, which will correspond to the string describing the template arguments for the function template specialization. |
Definition at line 4441 of file SemaTemplateDeduction.cpp.
References Diag(), getMoreSpecializedTemplate(), getTemplateArgumentBindingsText(), HandleFunctionTypeMismatch(), I, clang::QualType::isNull(), isSameTemplate(), clang::TemplateSpecCandidateSet::NoteCandidates(), and clang::TPOC_Other.
| DeclarationNameInfo Sema::GetNameForDeclarator | ( | Declarator & | D | ) |
GetNameForDeclarator - Determine the full declaration name for the given Declarator.
Definition at line 4426 of file SemaDecl.cpp.
References clang::Declarator::getName().
Referenced by ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), and CreateNewFunctionDecl().
| DeclarationNameInfo Sema::GetNameFromUnqualifiedId | ( | const UnqualifiedId & | Name | ) |
Retrieves the declaration name from a parsed unqualified-id.
Definition at line 4432 of file SemaDecl.cpp.
References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::UnqualifiedId::ConstructorName, Context, clang::UnqualifiedId::ConversionFunctionId, clang::DeclarationNameLoc::CXXOperatorName, clang::ASTContext::DeclarationNames, clang::UnqualifiedId::DestructorName, clang::UnqualifiedId::EndLocation, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::OpaquePtr< PtrTy >::get(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXConversionFunctionName(), clang::DeclarationNameTable::getCXXDestructorName(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getIdentifier(), clang::DeclarationNameInfo::getInfo(), clang::UnqualifiedId::getKind(), clang::ASTContext::getNameForTemplate(), clang::SourceLocation::getRawEncoding(), clang::ASTContext::getTypeDeclType(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_ConstructorTemplateId, clang::UnqualifiedId::IK_ConversionFunctionId, clang::UnqualifiedId::IK_DestructorName, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::UnqualifiedId::IK_TemplateId, clang::QualType::isNull(), clang::TemplateIdAnnotation::Name, clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), clang::DeclarationNameInfo::setNamedTypeInfo(), clang::UnqualifiedId::StartLocation, clang::UnqualifiedId::OFI::SymbolLocations, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.
Referenced by ActOnAliasDeclaration(), ActOnUsingDeclaration(), and CheckMicrosoftIfExistsSymbol().
getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared.
This routine copes with the difference between C and C++ scoping rules in structs and unions. For example, the following code is well-formed in C but ill-formed in C++:
For the declaration of BAR, this routine will return a different scope. The scope S will be the scope of the unnamed enumeration within S6. In C++, this routine will return the scope associated with S6, because the enumeration's scope is a transparent context but structures can contain non-field names. In C, this routine will return the translation unit scope, since the enumeration's scope is a transparent context and structures cannot contain non-field names.
Definition at line 1683 of file SemaDecl.cpp.
References clang::Scope::DeclScope, clang::Scope::getEntity(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::Scope::isClassScope(), clang::DeclContext::isTransparentContext(), and S.
Referenced by ActOnEnumConstant().
| IdentifierInfo * Sema::getNSErrorIdent | ( | ) |
Retrieve the identifier "NSError".
Definition at line 3030 of file SemaType.cpp.
References clang::Preprocessor::getIdentifierInfo(), and PP.
Referenced by classifyPointerDeclarator().
| IdentifierInfo * Sema::getNullabilityKeyword | ( | NullabilityKind | nullability | ) |
Retrieve the keyword associated.
Definition at line 3009 of file SemaType.cpp.
References clang::Preprocessor::getIdentifierInfo(), clang::NonNull, clang::Nullable, PP, and clang::Unspecified.
Referenced by GetFullTypeForDeclarator(), and clang::Parser::getNullabilityKeyword().
| Optional< unsigned > Sema::getNumArgumentsInExpansion | ( | QualType | T, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Determine the number of arguments in the given pack expansion type.
This routine assumes that the number of arguments in the expansion is consistent across all of the unexpanded parameter packs in its pattern.
Returns an empty Optional if the type can't be expanded.
Definition at line 646 of file SemaTemplateVariadic.cpp.
References CurrentInstantiationScope, Depth, clang::LocalInstantiationScope::findInstantiationOf(), getDepthAndIndex(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), I, clang::None, and clang::Result.
Referenced by addInstantiatedParametersToScope(), and clang::TemplateDeclInstantiator::SubstFunctionType().
| Sema::ObjCContainerKind Sema::getObjCContainerKind | ( | ) | const |
Definition at line 3529 of file SemaDeclObjC.cpp.
References CurContext, clang::DeclContext::getDeclKind(), OCK_Category, OCK_CategoryImplementation, OCK_ClassExtension, OCK_Implementation, OCK_Interface, OCK_None, and OCK_Protocol.
Referenced by ActOnAtEnd().
| Decl * Sema::getObjCDeclContext | ( | ) | const |
Definition at line 14813 of file SemaDecl.cpp.
References CurContext.
Referenced by clang::Parser::getObjCDeclContext().
| ObjCInterfaceDecl * Sema::getObjCInterfaceDecl | ( | IdentifierInfo *& | Id, |
| SourceLocation | IdLoc, | ||
| bool | DoTypoCorrection = false |
||
| ) |
Look for an Objective-C class in the translation unit.
| Id | The name of the Objective-C class we're looking for. If typo-correction fixes this name, the Id will be updated to the fixed name. |
| IdLoc | The location of the name in the translation unit. |
| DoTypoCorrection | If true, this routine will attempt typo correction if there is no class with the given name. |
Definition at line 1634 of file SemaDecl.cpp.
References AttributeLangSupport::C, clang::ObjCInterfaceDecl::getDefinition(), and clang::NamedDecl::getIdentifier().
Referenced by ActOnClassPropertyRefExpr(), ActOnDefs(), ActOnStartCategoryImplementation(), and ActOnStartCategoryInterface().
| Sema::ObjCMessageKind Sema::getObjCMessageKind | ( | Scope * | S, |
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| bool | IsSuper, | ||
| bool | HasTrailingDot, | ||
| ParsedType & | ReceiverType | ||
| ) |
Definition at line 2037 of file SemaExprObjC.cpp.
References clang::LookupResult::Ambiguous, Context, CorrectTypo(), CreateParsedType(), CTK_ErrorRecovery, diagnoseTypo(), DiagnoseUseOfDecl(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, getCurMethodDecl(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getObjCInterfaceType(), clang::LookupResult::getResultKind(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::Scope::isInObjcMethodScope(), LookupName(), LookupOrdinaryName, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, ObjCClassMessage, ObjCInstanceMessage, ObjCSuperMessage, PDiag(), clang::Result, S, and clang::LookupResult::suppressDiagnostics().
|
inline |
Definition at line 1042 of file Sema.h.
References OpenCLFeatures.
Referenced by ConvertDeclSpecToType(), GetFullTypeForDeclarator(), and clang::DeclSpec::SetStorageClassSpec().
|
inline |
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".
Definition at line 7714 of file Sema.h.
References OptimizeOffPragmaLocation.
| LabelDecl * Sema::GetOrCreateMSAsmLabel | ( | StringRef | ExternalLabelName, |
| SourceLocation | Location, | ||
| bool | AlwaysCreate | ||
| ) |
Definition at line 743 of file SemaStmtAsm.cpp.
References Context, clang::LabelDecl::isMSAsmLabel(), clang::Decl::markUsed(), clang::Decl::setLocation(), clang::LabelDecl::setMSAsmLabel(), and clang::LabelDecl::setMSAsmLabelResolved().
| NamespaceDecl * Sema::getOrCreateStdNamespace | ( | ) |
Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
Definition at line 7349 of file SemaDeclCXX.cpp.
References Context, clang::NamespaceDecl::Create(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), getStdNamespace(), clang::ASTContext::getTranslationUnitDecl(), PP, clang::Decl::setImplicit(), and StdNamespace.
Referenced by ActOnUsingDirective(), and DeclareGlobalNewDelete().
Get the module owning an entity.
Definition at line 1322 of file SemaLookup.cpp.
References clang::Decl::getDeclContext(), clang::Decl::getImportedOwningModule(), clang::Decl::getLocalOwningModule(), clang::Decl::getLocation(), clang::Decl::isFromASTFile(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), and clang::Decl::setLocalOwningModule().
Referenced by diagnoseEquivalentInternalLinkageDeclarations(), diagnoseMissingImport(), getDefiningModule(), hasVisibleDefaultArgument(), and isEquivalentInternalLinkageDeclaration().
|
inline |
Definition at line 1047 of file Sema.h.
References PP.
Referenced by CheckUnreachable(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseSwitchLabelsFallthrough(), findMacroSpelling(), and clang::ParseAST().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 1341 of file Sema.h.
References clang::TypeLoc::getSourceRange().
|
inline |
Retrieve a suitable printing policy.
Definition at line 1853 of file Sema.h.
Referenced by BuildStaticAssertDeclaration(), CheckEquivalentExceptionSpec(), diagnoseNoViableConversion(), EmitCurrentDiagnostic(), getCompletionPrintingPolicy(), and PrintInstantiationStack().
|
static |
Retrieve a suitable printing policy.
Definition at line 52 of file Sema.cpp.
References clang::PrintingPolicy::Bool, clang::IdentifierTable::get(), clang::ASTContext::getLangOpts(), clang::Preprocessor::getMacroInfo(), clang::ASTContext::getPrintingPolicy(), and clang::ASTContext::Idents.
| TypeLoc Sema::getReturnTypeLoc | ( | FunctionDecl * | FD | ) | const |
Definition at line 2997 of file SemaStmt.cpp.
References clang::TypeLoc::castAs(), clang::TypeLoc::getAs(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::TypeLoc::IgnoreParens().
| Scope * Sema::getScopeForContext | ( | DeclContext * | Ctx | ) |
Determines the active Scope associated with the given declaration context.
This routine maps a declaration context to the active Scope object that represents that declaration context in the parser. It is typically used from "scope-less" code (e.g., template instantiation, lazy creation of declarations) that injects a name for name-lookup purposes and, therefore, must update the Scope.
Definition at line 1108 of file Sema.cpp.
References clang::Scope::DeclScope, getCurScope(), clang::DeclContext::getPrimaryContext(), S, and clang::Scope::TemplateParamScope.
Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), handleIBOutletCollection(), and TryTypoCorrectionForCall().
|
static |
Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
Otherwise return NULL.
Definition at line 1273 of file SemaDecl.cpp.
References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::DeclContext::getPrimaryContext().
Referenced by ActOnFriendFunctionDecl().
Definition at line 9184 of file SemaExpr.cpp.
References clang::ASTContext::CharTy, Context, clang::Type::getAs(), clang::VectorType::getElementType(), clang::ASTContext::getExtVectorType(), clang::VectorType::getNumElements(), clang::ASTContext::getTypeSize(), clang::ASTContext::IntTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, and clang::ASTContext::ShortTy.
|
inline |
Definition at line 1046 of file Sema.h.
References SourceMgr.
Referenced by ActOnModuleInclude(), addFixitForObjCARCConversion(), BuildCXXNew(), checkInitMethod(), CheckMoveOnConstruction(), CheckUnreachable(), DiagnoseAbsenceOfOverrideControl(), diagnoseIgnoredQualifiers(), DiagnoseMismatchedNewDelete(), DiagnoseNamespaceInlineMismatch(), diagnoseRepeatedUseOfWeak(), diagnoseUseOfInternalDeclInInlineFunction(), DoEmitAvailabilityWarning(), findMacroSpelling(), clang::DeclSpec::Finish(), GetFullTypeForDeclarator(), getUDSuffixLoc(), handleObjCOwnershipTypeAttr(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isLibstdcxxPointerReturnFalseHack(), ParseObjCSelectorExpression(), and clang::PrettyDeclStackTraceEntry::print().
| Sema::CXXSpecialMember Sema::getSpecialMember | ( | const CXXMethodDecl * | MD | ) |
getSpecialMember - get the special member enum for a method.
Definition at line 2525 of file SemaDecl.cpp.
References CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, CXXMoveConstructor, clang::CXXMethodDecl::isCopyAssignmentOperator(), and clang::CXXMethodDecl::isMoveAssignmentOperator().
Referenced by CheckCompletedCXXClass(), CheckExplicitlyDefaultedMemberExceptionSpec(), CheckExplicitlyDefaultedSpecialMember(), computeImplicitExceptionSpec(), CreateOverloadedBinOp(), clang::InitializationSequence::Diagnose(), MergeCXXFunctionDecl(), and SetDeclDefaulted().
| CXXRecordDecl * Sema::getStdBadAlloc | ( | ) | const |
Definition at line 7337 of file SemaDeclCXX.cpp.
References Context, clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::ASTContext::getExternalSource(), and StdBadAlloc.
Referenced by DeclareGlobalAllocationFunction(), and DeclareGlobalNewDelete().
| NamespaceDecl * Sema::getStdNamespace | ( | ) | const |
Definition at line 7342 of file SemaDeclCXX.cpp.
References Context, clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::ASTContext::getExternalSource(), and StdNamespace.
Referenced by ActOnStartNamespaceDef(), DiagnoseTwoPhaseLookup(), emitReplacement(), getOrCreateStdNamespace(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isLibstdcxxEagerExceptionSpecHack(), isStdInitializerList(), lookupPromiseType(), and LookupStdInitializerList().
| IdentifierInfo * Sema::getSuperIdentifier | ( | ) | const |
Definition at line 1497 of file Sema.cpp.
References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.
| std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params, |
| const TemplateArgumentList & | Args | ||
| ) |
Produces a formatted string that describes the binding of template parameters to template arguments.
Definition at line 8399 of file SemaTemplate.cpp.
References clang::TemplateArgumentList::data(), and clang::TemplateArgumentList::size().
Referenced by DiagnoseBadDeduction(), getMostSpecialized(), InstantiateClassTemplateSpecialization(), and PrintInstantiationStack().
| std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params, |
| const TemplateArgument * | Args, | ||
| unsigned | NumArgs | ||
| ) |
Definition at line 8405 of file SemaTemplate.cpp.
References clang::NamedDecl::getIdentifier(), clang::TemplateParameterList::getParam(), I, clang::TemplateArgument::print(), and clang::TemplateParameterList::size().
| TemplateArgumentLoc Sema::getTemplateArgumentPackExpansionPattern | ( | TemplateArgumentLoc | OrigLoc, |
| SourceLocation & | Ellipsis, | ||
| Optional< unsigned > & | NumExpansions | ||
| ) | const |
Returns the pattern of the pack expansion for a template argument.
| OrigLoc | The template argument to expand. |
| Ellipsis | Will be set to the location of the ellipsis. |
| NumExpansions | Will be set to the number of expansions that will be generated from this pack expansion, if known a priori. |
Definition at line 877 of file SemaTemplateVariadic.cpp.
References clang::TypeLoc::castAs(), Context, clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsType(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::PackExpansionExpr::getEllipsisLoc(), clang::TemplateArgument::getKind(), clang::PackExpansionExpr::getNumExpansions(), clang::PackExpansionType::getNumExpansions(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getPackExpansionPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::isPackExpansion(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TypeLocBuilder::pushFullCopy(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
| MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs | ( | NamedDecl * | D, |
| const TemplateArgumentList * | Innermost = nullptr, |
||
| bool | RelativeToPrimary = false, |
||
| const FunctionDecl * | Pattern = nullptr |
||
| ) |
Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
| D | the declaration for which we are computing template instantiation arguments. |
| Innermost | if non-NULL, the innermost template argument list. |
| RelativeToPrimary | true if we should get the template arguments relative to the primary template, even when we're dealing with a specialization. This is only relevant for function template specializations. |
| Pattern | If non-NULL, indicates the pattern from which we will be instantiating the definition of the given declaration, D. This is used to determine the proper set of template instantiation arguments for friend function template specializations. |
Definition at line 52 of file SemaTemplateInstantiate.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), Context, clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::getParent(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), I, clang::DeclContext::isFileContext(), clang::isGenericLambdaCallOperatorSpecialization(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::DeclContext::isTranslationUnit(), clang::None, clang::Result, clang::TemplateSpecializationType(), and clang::TSK_ExplicitSpecialization.
Referenced by BuildCXXDefaultInitExpr(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), InstantiateExceptionSpec(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), and RequireCompleteDeclContext().
| TypeSourceInfo * Sema::GetTypeForDeclarator | ( | Declarator & | D, |
| Scope * | S | ||
| ) |
GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
The result of this call will never be null, but the associated type may be a null type if there's an unrecoverable error.
Definition at line 4338 of file SemaType.cpp.
References GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLangOpts(), inferARCWriteback(), and clang::Declarator::isPrototypeContext().
Referenced by ActOnCXXNew(), ActOnExceptionDeclarator(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnObjCExceptionDecl(), ActOnProperty(), ActOnTypeName(), and HandleMSProperty().
| TypeSourceInfo * Sema::GetTypeForDeclaratorCast | ( | Declarator & | D, |
| QualType | FromTy | ||
| ) |
Definition at line 4455 of file SemaType.cpp.
References Context, GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::ASTContext::getInnerObjCOwnership(), getLangOpts(), clang::Qualifiers::OCL_None, and transferARCOwnership().
Referenced by ActOnCXXNamedCast().
|
static |
Definition at line 2354 of file SemaType.cpp.
References clang::OpaquePtr< PtrTy >::get(), and clang::QualType::isNull().
Referenced by ActOnAliasDeclaration(), ActOnArrayTypeTrait(), ActOnBaseSpecifier(), ActOnClassMessage(), ActOnCXXNestedNameSpecifier(), ActOnCXXTypeConstructExpr(), ActOnMethodDeclaration(), ActOnObjCBridgedCast(), actOnObjCTypeArgsAndProtocolQualifiers(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), ActOnPackExpansion(), ActOnPseudoDestructorExpr(), ActOnSuperClassOfClassInterface(), ActOnTypeTrait(), AddClassMessageCompletions(), BuildMemInitializer(), CheckConversionDeclarator(), CheckDestructorDeclarator(), checkExceptionSpecification(), ConvertDeclSpecToType(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), handleIBOutletCollection(), handleTypeTagForDatatypeAttr(), handleVecTypeHint(), IsInvalidUnlessNestedName(), isNonTypeNestedNameSpecifier(), ParseObjCEncodeExpression(), RebuildDeclaratorInCurrentInstantiation(), and translateTemplateArgument().
| ParsedType Sema::getTypeName | ( | const IdentifierInfo & | II, |
| SourceLocation | NameLoc, | ||
| Scope * | S, | ||
| CXXScopeSpec * | SS = nullptr, |
||
| bool | isClassName = false, |
||
| bool | HasTrailingDot = false, |
||
| ParsedType | ObjectTypePtr = ParsedType(), |
||
| bool | IsCtorOrDtorName = false, |
||
| bool | WantNontrivialTypeSourceInfo = false, |
||
| IdentifierInfo ** | CorrectedII = nullptr |
||
| ) |
If the identifier refers to a type name within this scope, return the declaration of that type.
This routine performs ordinary name lookup of the identifier II within the given scope, with optional C++ scope specifier SS, to determine whether the name refers to a type. If so, returns an opaque pointer (actually a QualType) corresponding to that type. Otherwise, returns NULL.
Definition at line 241 of file SemaDecl.cpp.
References clang::LookupResult::Ambiguous, clang::LookupResult::AmbiguousTagHiding, clang::LookupResult::begin(), Builder, Context, clang::frontend::CPlusPlus, clang::LookupResult::empty(), clang::LookupResult::end(), clang::ETK_None, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::OpaquePtr< PtrTy >::get(), clang::LookupResult::getAmbiguityKind(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionSpecifier(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getObjCInterfaceType(), clang::SourceLocation::getRawEncoding(), clang::LookupResult::getResultKind(), clang::ASTContext::getTypeDeclType(), clang::driver::types::getTypeName(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::OpaquePtr< QualType >::make(), clang::CXXScopeSpec::MakeTrivial(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), recoverFromTypeInKnownDependentBase(), clang::Result, S, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::UnqualifiedId::setIdentifier(), clang::TypeSpecTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnPseudoDestructorExpr(), handleIBOutletCollection(), clang::Parser::ParseUnqualifiedId(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
| TypeSourceInfo * Sema::GetTypeSourceInfoForDeclarator | ( | Declarator & | D, |
| QualType | T, | ||
| TypeSourceInfo * | ReturnTypeInfo | ||
| ) |
Create and instantiate a TypeSourceInfo with type source information.
| T | QualType referring to the type as written in source code. |
| ReturnTypeInfo | For declarators whose return type does not show up in the normal place in the declaration specifiers (such as a C++ conversion function), this pointer will refer to a type source information for that return type. |
Definition at line 4897 of file SemaType.cpp.
References clang::TypeLoc::castAs(), Context, clang::ASTContext::CreateTypeSourceInfo(), fillAtomicQualLoc(), fillAttributedTypeLoc(), clang::TypeLoc::getAs(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::Declarator::getEllipsisLoc(), clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getNextTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getNextTypeLoc(), clang::Declarator::getNumTypeObjects(), clang::TypeLoc::getOpaqueData(), clang::TypeSourceInfo::getTypeLoc(), clang::Declarator::getTypeObject(), and clang::TypeLoc::getUnqualifiedLoc().
Referenced by GetFullTypeForDeclarator().
| const Sema::TypoExprState & Sema::getTypoExprState | ( | TypoExpr * | TE | ) | const |
Definition at line 4991 of file SemaLookup.cpp.
| void Sema::getUndefinedButUsed | ( | SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > & | Undefined | ) |
Obtain a sorted list of functions that are undefined but ODR-used.
Obtains a sorted list of functions that are undefined but ODR-used.
Definition at line 474 of file Sema.cpp.
References Context, clang::VarDecl::DeclarationOnly, E, clang::ASTContext::getSourceManager(), clang::Decl::hasAttr(), I, clang::SourceManager::isBeforeInTranslationUnit(), clang::NamedDecl::isExternallyVisible(), clang::Decl::isInvalidDecl(), SM, and UndefinedButUsed.
Referenced by checkUndefinedButUsed().
| Sema::VariadicCallType Sema::getVariadicCallType | ( | FunctionDecl * | FDecl, |
| const FunctionProtoType * | Proto, | ||
| Expr * | Fn | ||
| ) |
Definition at line 4498 of file SemaExpr.cpp.
References clang::ASTContext::BoundMemberTy, Context, clang::Expr::getType(), clang::Type::isBlockPointerType(), and clang::FunctionProtoType::isVariadic().
| NamedDecl * Sema::HandleDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParameterLists | ||
| ) |
Definition at line 4781 of file SemaDecl.cpp.
References clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::Scope::DeclScope, Diag(), clang::DeclSpec::getConceptSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Scope::getFlags(), clang::LookupResult::getFoundDecl(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getLocStart(), clang::DeclarationNameInfo::getName(), clang::Scope::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), hasDefinition(), clang::DeclSpec::isConceptSpecified(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclSpec::isFriendSpecified(), clang::Type::isFunctionType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::Decl::isLocalExternDecl(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isSingleTagDecl(), clang::Decl::isTemplateParameter(), clang::Name, Previous, RebuildDeclaratorInCurrentInstantiation(), RemoveUsingDecls(), clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::Declarator::setInvalidType(), and clang::Scope::TemplateParamScope.
Referenced by ActOnCXXMemberDeclarator().
| void Sema::HandleDelayedAccessCheck | ( | sema::DelayedDiagnostic & | DD, |
| Decl * | Ctx | ||
| ) |
Definition at line 1473 of file SemaAccess.cpp.
References AR_inaccessible, CheckEffectiveAccess(), clang::sema::DelayedDiagnostic::getAccessData(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::isLocalExternDecl(), clang::sema::DelayedDiagnostic::Loc, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by PopParsingDeclaration().
| void Sema::HandleDependentAccessCheck | ( | const DependentDiagnostic & | DD, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 1496 of file SemaAccess.cpp.
References CheckAccess(), Context, clang::DependentDiagnostic::getAccess(), clang::DependentDiagnostic::getAccessBaseObjectType(), clang::DependentDiagnostic::getAccessLoc(), clang::DependentDiagnostic::getAccessNamingClass(), clang::DependentDiagnostic::getAccessTarget(), clang::DependentDiagnostic::getDiagnostic(), clang::DependentDiagnostic::isAccessToMember(), and clang::DeclAccessPair::make().
Referenced by PerformDependentDiagnostics().
| ExprResult Sema::HandleExprEvaluationContextForTypeof | ( | Expr * | E | ) |
Definition at line 12545 of file SemaExpr.cpp.
References clang::Expr::getType(), clang::Type::isVariablyModifiedType(), and TransformToPotentiallyEvaluated().
| ExprResult Sema::HandleExprPropertyRefExpr | ( | const ObjCObjectPointerType * | OPT, |
| Expr * | BaseExpr, | ||
| SourceLocation | OpLoc, | ||
| DeclarationName | MemberName, | ||
| SourceLocation | MemberLoc, | ||
| SourceLocation | SuperLoc, | ||
| QualType | SuperType, | ||
| bool | Super | ||
| ) |
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
This is a property reference expression.
Definition at line 1757 of file SemaExprObjC.cpp.
References clang::SelectorTable::constructSetterSelector(), Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::DeclarationName::getAsIdentifierInfo(), clang::Type::getAsObjCInterfacePointerType(), clang::ObjCInterfaceType::getDecl(), clang::Preprocessor::getIdentifierTable(), clang::ObjCObjectPointerType::getInterfaceType(), clang::SelectorTable::getNullarySelector(), clang::ObjCObjectPointerType::getPointeeType(), clang::Preprocessor::getSelectorTable(), I, clang::DeclarationName::isIdentifier(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), LookupMethodInQualifiedType(), LookupOrdinaryName, clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::ObjCPropertyDecl::OBJC_PR_setter, clang::OK_ObjCProperty, PDiag(), PP, clang::ASTContext::PseudoObjectTy, clang::ObjCObjectPointerType::quals(), RequireCompleteType(), and clang::VK_LValue.
Referenced by ActOnClassPropertyRefExpr(), and LookupMemberExpr().
| FieldDecl * Sema::HandleField | ( | Scope * | S, |
| RecordDecl * | TagD, | ||
| SourceLocation | DeclStart, | ||
| Declarator & | D, | ||
| Expr * | BitfieldWidth, | ||
| InClassInitStyle | InitStyle, | ||
| AccessSpecifier | AS | ||
| ) |
HandleField - Analyze a field of a C struct or a C++ data member.
Definition at line 12936 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::LookupResult::Ambiguous, Context, clang::frontend::CPlusPlus, Diag(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getAsSingle(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getLocStart(), clang::QualType::getQualifiers(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::Qualifiers::hasAddressSpace(), clang::ASTContext::IntTy, clang::Type::isEventT(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, Previous, clang::DeclSpec::SCS_mutable, clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setModulePrivate(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnCXXMemberDeclarator().
| void Sema::HandleFunctionTypeMismatch | ( | PartialDiagnostic & | PDiag, |
| QualType | FromType, | ||
| QualType | ToType | ||
| ) |
HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
Catches different number of parameter, mismatch in parameter types, and different return types.
Definition at line 2574 of file SemaOverload.cpp.
References Context, ft_default, ft_different_class, ft_parameter_arity, ft_parameter_mismatch, ft_qualifer_mismatch, ft_return_type, clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::getTypeQuals(), clang::ASTContext::hasSameType(), clang::Type::isInstantiationDependentType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::TemplateSpecializationType(), and tryGetFunctionProtoType().
Referenced by clang::InitializationSequence::Diagnose(), DiagnoseAssignmentResult(), getMostSpecialized(), NoteHiddenVirtualMethods(), and NoteOverloadCandidate().
| MSPropertyDecl * Sema::HandleMSProperty | ( | Scope * | S, |
| RecordDecl * | TagD, | ||
| SourceLocation | DeclStart, | ||
| Declarator & | D, | ||
| Expr * | BitfieldWidth, | ||
| InClassInitStyle | InitStyle, | ||
| AccessSpecifier | AS, | ||
| AttributeList * | MSPropertyAttr | ||
| ) |
HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
Definition at line 13760 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::LookupResult::Ambiguous, CheckExtraCXXDefaultArguments(), clang::frontend::CPlusPlus, clang::MSPropertyDecl::Create(), Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForRedeclaration, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getAsSingle(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::Declarator::getLocStart(), clang::AttributeList::getPropertyData(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::DeclSpec::getSpecifierName(), clang::AttributeList::PropertyData::GetterId, clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::ASTContext::IntTy, isDeclInScope(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, Previous, ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setModulePrivate(), clang::AttributeList::PropertyData::SetterId, TUScope, and UPPC_DataMemberType.
Referenced by ActOnCXXMemberDeclarator().
| ObjCPropertyDecl * Sema::HandlePropertyInClassExtension | ( | Scope * | S, |
| SourceLocation | AtLoc, | ||
| SourceLocation | LParenLoc, | ||
| FieldDeclarator & | FD, | ||
| Selector | GetterSel, | ||
| Selector | SetterSel, | ||
| const bool | isReadWrite, | ||
| unsigned & | Attributes, | ||
| const unsigned | AttributesAsWritten, | ||
| QualType | T, | ||
| TypeSourceInfo * | TSI, | ||
| tok::ObjCKeywordKind | MethodImplKind | ||
| ) |
Called by ActOnProperty to handle @property declarations in class extensions.
Definition at line 410 of file SemaObjCProperty.cpp.
References checkAtomicPropertyMismatch(), Context, CreatePropertyDecl(), CurContext, clang::FieldDeclarator::D, Diag(), clang::ObjCDeclSpec::DQ_PR_getter, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ObjCCategoryDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::Declarator::getIdentifier(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::hasSameType(), isObjCPointerConversion(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_None, OwnershipMask, and ProcessPropertyDecl().
Referenced by ActOnProperty().
Definition at line 3616 of file SemaDecl.cpp.
References Context, clang::Decl::getDeclContext(), clang::ASTContext::getLangOpts(), clang::MangleNumberingContext::getManglingNumber(), clang::ASTContext::getManglingNumberContext(), getMSManglingNumber(), clang::NamedDecl::getName(), clang::DeclContext::getParent(), clang::TagDecl::getTypedefNameForAnonDecl(), and clang::ASTContext::setManglingNumber().
Referenced by ActOnAliasDeclaration().
| bool Sema::hasAnyAcceptableTemplateNames | ( | LookupResult & | R, |
| bool | AllowFunctionTemplates = true |
||
| ) |
Definition at line 127 of file SemaTemplate.cpp.
References clang::LookupResult::begin(), Context, clang::LookupResult::end(), I, and isAcceptableTemplateName().
| bool Sema::hasAnyUnrecoverableErrorsInThisFunction | ( | ) | const |
Determine whether any errors occurred within this function/method/ block.
Definition at line 1188 of file Sema.cpp.
References clang::sema::FunctionScopeInfo::ErrorTrap, getCurFunction(), and clang::DiagnosticErrorTrap::hasUnrecoverableErrorOccurred().
Check to see if a given expression could have '.c_str()' called on it.
Check if we could call '.c_str()' on an object.
FIXME: This returns the wrong results in some cases (if cv-qualifiers don't allow the call, or if it would be ambiguous).
Definition at line 3951 of file SemaChecking.cpp.
References clang::Expr::getType().
Definition at line 5967 of file SemaType.cpp.
References clang::QualType::IgnoreParens().
Referenced by adjustMemberFunctionCC().
| bool Sema::hasVisibleDefaultArgument | ( | const NamedDecl * | D, |
| llvm::SmallVectorImpl< Module * > * | Modules = nullptr |
||
| ) |
Determine if the template parameter D has a visible default argument.
Definition at line 1463 of file SemaLookup.cpp.
References hasVisibleDefaultArgument().
Referenced by diagnoseMissingArgument(), and isPreferredLookupResult().
| bool Sema::hasVisibleDefinition | ( | NamedDecl * | D, |
| NamedDecl ** | Suggested, | ||
| bool | OnlyNeedComplete = false |
||
| ) |
Determine if D has a visible definition.
Determine whether there is any declaration of D that was ever a definition (perhaps before module merging) and is currently visible.
If not, suggest a declaration that should be made visible to expose the definition.
| D | The definition of the entity. |
| Suggested | Filled in with the declaration that should be made visible in order to provide a definition of this entity. |
| OnlyNeedComplete | If true, we only need the type to be complete, not defined. This only matters for enums with a fixed underlying type, since in all other cases, a type is complete if and only if it is defined. |
Definition at line 6540 of file SemaType.cpp.
References Context, clang::ASTContext::getExternalSource(), getLangOpts(), and isVisible().
Referenced by hasVisibleDefinition(), and shouldSkipAnonEnumBody().
Definition at line 1397 of file Sema.h.
References hasVisibleDefinition().
Definition at line 1431 of file SemaLookup.cpp.
References Context, and clang::ASTContext::getModulesWithMergedDefinition().
| void Sema::HideUsingShadowDecl | ( | Scope * | S, |
| UsingShadowDecl * | Shadow | ||
| ) |
Hides a using shadow declaration.
This is required by the current using-decl implementation when a resolvable using declaration in a class is followed by a declaration which would hide or override one or more of the using decl's targets; for example:
struct Base { void foo(int); }; struct Derived : Base { using Base::foo; void foo(int); };
The governing language is C++03 [namespace.udecl]p12:
When a using-declaration brings names from a base class into a derived class scope, member functions in the derived class override and/or hide member functions with the same name and parameter types in a base class (rather than conflicting).
There are two ways to implement this: (1) optimistically create shadow decls when they're not hidden by existing declarations, or (2) don't create any shadow decls (or at least don't make them visible) until we've fully parsed/instantiated the class. The problem with (1) is that we might have to retroactively remove a shadow decl, which requires several O(n) operations because the decl structures are (very reasonably) not designed for removal. (2) avoids this but is very fiddly and phase-dependent.
Definition at line 7926 of file SemaDeclCXX.cpp.
References clang::DeclarationName::CXXConversionFunctionName, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclarationName::getNameKind(), clang::UsingShadowDecl::getUsingDecl(), IdResolver, clang::IdentifierResolver::RemoveDecl(), clang::Scope::RemoveDecl(), clang::DeclContext::removeDecl(), and clang::UsingDecl::removeShadowDecl().
| Sema::CUDAFunctionPreference Sema::IdentifyCUDAPreference | ( | const FunctionDecl * | Caller, |
| const FunctionDecl * | Callee | ||
| ) |
Identifies relative preference of a given Caller/Callee combination, based on their host/device attributes.
| Caller | function which needs address of Callee. nullptr in case of global context. |
| Callee | target function |
Definition at line 92 of file SemaCUDA.cpp.
References CFP_Best, CFP_Fallback, CFP_LastResort, CFP_Never, CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, getLangOpts(), and IdentifyCUDATarget().
Referenced by CheckCUDATarget(), EraseUnwantedCUDAMatchesImpl(), and clang::isBetterOverloadCandidate().
| Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget | ( | const FunctionDecl * | D | ) |
IdentifyCUDATarget - Determine the CUDA compilation target for this function.
Definition at line 41 of file SemaCUDA.cpp.
References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, clang::Decl::hasAttr(), and clang::Decl::isImplicit().
Referenced by BuildCallToMemberFunction(), CheckCUDATarget(), DiagnoseBadTarget(), IdentifyCUDAPreference(), and inferCUDATargetForImplicitSpecialMember().
| ExprResult Sema::IgnoredValueConversions | ( | Expr * | E | ) |
IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required.
Perform the conversions required for an expression used in a context that ignores the result.
Definition at line 6202 of file SemaExprCXX.cpp.
References CheckPlaceholderExpr(), clang::CK_ToVoid, Context, DefaultFunctionArrayConversion(), DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::Type::isFunctionType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isRValue(), IsSpecialDiscardedValue(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), RequireCompleteType(), and clang::ASTContext::VoidTy.
Referenced by ActOnFinishFullExpr(), and CheckCommaOperands().
| ExprResult Sema::ImpCastExprToType | ( | Expr * | E, |
| QualType | Ty, | ||
| CastKind | Kind, | ||
| ExprValueKind | VK = VK_RValue, |
||
| const CXXCastPath * | BasePath = nullptr, |
||
| CheckedConversionKind | CCK = CCK_ImplicitConversion |
||
| ) |
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
If there is already an implicit cast, merge into the existing one. If isLvalue, the result of the cast is an lvalue.
If there is already an implicit cast, merge into the existing one. The result is of the given category.
Definition at line 369 of file Sema.cpp.
References clang::CK_ArrayToPointerDecay, clang::CK_FunctionToPointerDecay, clang::CK_LValueToRValue, clang::CK_ToVoid, Context, clang::ImplicitCastExpr::Create(), diagnoseNullableToNonnullConversion(), E, clang::ASTContext::getCanonicalType(), clang::Expr::getType(), clang::Expr::isRValue(), and clang::VK_RValue.
Referenced by BuildImplicitBaseInitializer(), BuildInstanceMessage(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), checkOpenCLVectorShift(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckTemplateArgumentPointerToMember(), convertPointersToCompositeType(), CreateFunctionRefExpr(), CXXCheckConditionalOperands(), FindCompositePointerType(), handleComplexFloatConversion(), handleFloatConversion(), handleIntegerToComplexFloatConversion(), handleIntToFloatConversion(), IgnoredValueConversions(), LookupMemberExpr(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), SemaBuiltinCallWithStaticChain(), ShouldTryAgainWithRedefinitionType(), and tryVectorConvertAndSplat().
| NamedDecl * Sema::ImplicitlyDefineFunction | ( | SourceLocation | Loc, |
| IdentifierInfo & | II, | ||
| Scope * | S | ||
| ) |
ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2).
Definition at line 11332 of file SemaDecl.cpp.
References clang::Declarator::AddTypeInfo(), clang::Declarator::BlockContext, Context, Diag(), clang::DiagnosticsEngine::Error, clang::EST_None, clang::DeclSpec::getAttributes(), clang::DeclaratorChunk::getFunction(), clang::IdentifierInfo::getName(), clang::ASTContext::getPrintingPolicy(), clang::ASTContext::getTranslationUnitDecl(), clang::Declarator::SetIdentifier(), clang::Decl::setImplicit(), clang::DeclSpec::SetTypeSpecType(), and clang::DeclSpec::TST_int.
| void Sema::ImplMethodsVsClassMethods | ( | Scope * | S, |
| ObjCImplDecl * | IMPDecl, | ||
| ObjCContainerDecl * | IDecl, | ||
| bool | IncompleteImpl = false |
||
| ) |
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the class or category @implementation.
Definition at line 2839 of file SemaDeclObjC.cpp.
References AttributeLangSupport::C, CheckCategoryVsClassMethodMatches(), CheckProtocolMethodDefs(), clang::ObjCContainerDecl::class_methods(), diagnoseNullResettableSynthesizedSetters(), DiagnoseUnimplementedProperties(), clang::ObjCPropertyImplDecl::Dynamic, clang::Decl::getLocation(), I, clang::ObjCContainerDecl::instance_methods(), clang::ObjCRuntime::isNonFragile(), LangOpts, MatchAllMethodDeclarations(), clang::LangOptions::ObjCRuntime, P, and clang::ObjCImplDecl::property_impls().
Referenced by ActOnAtEnd().
|
inline |
Definition at line 9199 of file Sema.h.
Referenced by clang::Parser::incrementMSManglingNumber().
| bool Sema::inferCUDATargetForImplicitSpecialMember | ( | CXXRecordDecl * | ClassDecl, |
| CXXSpecialMember | CSM, | ||
| CXXMethodDecl * | MemberDecl, | ||
| bool | ConstRHS, | ||
| bool | Diagnose | ||
| ) |
Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members.
| ClassDecl | the class for which the member is being created. |
| CSM | the kind of special member. |
| MemberDecl | the special member itself. |
| ConstRHS | true if this is a copy operation with a const object on its RHS. |
| Diagnose | true if this call should emit diagnostics. |
Definition at line 296 of file SemaCUDA.cpp.
References clang::Decl::addAttr(), clang::CXXRecordDecl::bases(), CFT_Device, CFT_Host, Context, Diag(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::Decl::getLocation(), IdentifyCUDATarget(), clang::CXXRecordDecl::isAbstract(), LookupSpecialMember(), resolveCalleeCUDATargetConflict(), and clang::CXXRecordDecl::vbases().
Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DiagnoseBadTarget(), and ShouldDeleteSpecialMember().
Definition at line 5352 of file SemaDecl.cpp.
References Context, Diag(), clang::ASTContext::getLifetimeQualifiedType(), clang::Decl::getLocation(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::ValueDecl::setType(), and clang::ast_matchers::type.
Referenced by BuildExceptionDeclaration(), BuildObjCExceptionDecl(), and FinishForRangeVarDecl().
| void Sema::Initialize | ( | ) |
Perform initialization that occurs after the parser has been initialized but before it parses anything.
Definition at line 139 of file Sema.cpp.
References addImplicitTypedef(), clang::IdentifierResolver::begin(), clang::ASTContext::buildImplicitRecord(), Consumer, Context, clang::ASTContext::DoubleTy, clang::IdentifierResolver::end(), clang::ASTContext::FloatTy, clang::IdentifierTable::get(), clang::ASTContext::getAtomicType(), clang::ASTContext::getBuiltinMSVaListDecl(), clang::ASTContext::getBuiltinVaListDecl(), clang::ASTContext::getExternalSource(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getInt128Decl(), clang::ASTContext::getIntPtrType(), getLangOpts(), clang::ASTContext::getObjCClassDecl(), clang::ASTContext::getObjCIdDecl(), clang::ASTContext::getObjCProtocolDecl(), clang::ASTContext::getObjCSelDecl(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getUInt128Decl(), clang::ASTContext::getUIntPtrType(), clang::TargetInfo::hasBuiltinMSVaList(), clang::TargetInfo::hasInt128Type(), clang::ASTContext::Idents, IdResolver, clang::ASTContext::IntTy, clang::ASTContext::LongTy, clang::ASTContext::OCLClkEventTy, clang::ASTContext::OCLEventTy, clang::ASTContext::OCLImage1dArrayTy, clang::ASTContext::OCLImage1dBufferTy, clang::ASTContext::OCLImage1dTy, clang::ASTContext::OCLImage2dArrayDepthTy, clang::ASTContext::OCLImage2dArrayMSAADepthTy, clang::ASTContext::OCLImage2dArrayMSAATy, clang::ASTContext::OCLImage2dArrayTy, clang::ASTContext::OCLImage2dDepthTy, clang::ASTContext::OCLImage2dMSAADepthTy, clang::ASTContext::OCLImage2dMSAATy, clang::ASTContext::OCLImage2dTy, clang::ASTContext::OCLImage3dTy, clang::ASTContext::OCLNDRangeTy, clang::ASTContext::OCLQueueTy, clang::ASTContext::OCLReserveIDTy, clang::ASTContext::OCLSamplerTy, PP, PushOnScopeChains(), clang::TTK_Class, TUScope, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongTy, and VAListTagName.
Referenced by clang::Parser::Initialize().
| void Sema::InstantiateAttrs | ( | const MultiLevelTemplateArgumentList & | TemplateArgs, |
| const Decl * | Pattern, | ||
| Decl * | Inst, | ||
| LateInstantiatedAttrVec * | LateAttrs = nullptr, |
||
| LocalInstantiationScope * | OuterMostScope = nullptr |
||
| ) |
Definition at line 230 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::addAttr(), clang::Decl::attrs(), clang::LocalInstantiationScope::cloneScopes(), Context, CurrentInstantiationScope, clang::Decl::getDeclContext(), clang::Decl::hasAttr(), instantiateDependentAlignedAttr(), instantiateDependentAlignValueAttr(), instantiateDependentAssumeAlignedAttr(), instantiateDependentCUDALaunchBoundsAttr(), instantiateDependentEnableIfAttr(), clang::sema::instantiateTemplateAttribute(), and clang::NamedDecl::isCXXInstanceMember().
Referenced by BuildVariableInstantiation(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InstantiateClass(), InstantiateEnum(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and SubstParmVarDecl().
| bool Sema::InstantiateClass | ( | SourceLocation | PointOfInstantiation, |
| CXXRecordDecl * | Instantiation, | ||
| CXXRecordDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateSpecializationKind | TSK, | ||
| bool | Complain = true |
||
| ) |
Instantiate the definition of a class from a given pattern.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be either a class template specialization or a member class of a class template specialization. |
| Pattern | is the pattern from which the instantiation occurs. This will be either the declaration of a class template or the declaration of a member class of a class template. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
| TSK | the kind of implicit or explicit instantiation to perform. |
| Complain | whether to complain if the class cannot be instantiated due to the lack of a definition. |
Definition at line 1922 of file SemaTemplateInstantiate.cpp.
References ActOnFields(), ActOnFinishCXXNonNestedClass(), ActOnFinishDelayedMemberInitializers(), CheckCompletedCXXClass(), Consumer, Context, CurrentInstantiationScope, clang::DeclContext::decls(), clang::TemplateDeclInstantiator::delayed_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_partial_spec_end(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_end(), clang::LocalInstantiationScope::deleteScopes(), DiagnoseUninstantiableTemplate(), clang::TemplateDeclInstantiator::disableLateAttributeInstantiation(), E, clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDefinition(), clang::TagDecl::getInnerLocStart(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::TagDecl::getRBraceLoc(), clang::TemplateDeclInstantiator::getStartingScope(), clang::TagDecl::getTagKind(), clang::ASTConsumer::HandleTagDeclDefinition(), I, InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::sema::instantiateTemplateAttribute(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::NamedDecl::isCXXInstanceMember(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), MarkVTableUsed(), P, PerformDependentDiagnostics(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::NamedDecl::setHidden(), clang::Decl::setInvalidDecl(), clang::Decl::setLocation(), clang::TypeDecl::setLocStart(), clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::TagDecl::setRBraceLoc(), clang::TagDecl::setTagKind(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::TagDecl::startDefinition(), SubstBaseSpecifiers(), clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit().
Referenced by InstantiateClassMembers(), and InstantiateClassTemplateSpecialization().
| void Sema::InstantiateClassMembers | ( | SourceLocation | PointOfInstantiation, |
| CXXRecordDecl * | Instantiation, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateSpecializationKind | TSK | ||
| ) |
Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.
Definition at line 2418 of file SemaTemplateInstantiate.cpp.
References CheckSpecializationInstantiationRedecl(), Consumer, clang::DeclContext::decls(), clang::CXXRecordDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::VarDecl::getOutOfLineDefinition(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), InstantiateClass(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateStaticDataMemberDefinition(), clang::CXXRecordDecl::isLocalClass(), clang::VarDecl::isStaticDataMember(), clang::DeclContext::lookup(), MarkVTableUsed(), PendingLocalImplicitInstantiations, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::VarDecl::setTemplateSpecializationKind(), clang::DeclContextLookupResult::size(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
Referenced by InstantiateClassTemplateSpecializationMembers().
| bool Sema::InstantiateClassTemplateSpecialization | ( | SourceLocation | PointOfInstantiation, |
| ClassTemplateSpecializationDecl * | ClassTemplateSpec, | ||
| TemplateSpecializationKind | TSK, | ||
| bool | Complain = true |
||
| ) |
Definition at line 2270 of file SemaTemplateInstantiate.cpp.
References clang::TemplateSpecCandidateSet::addCandidate(), Context, DeduceTemplateArguments(), Diag(), clang::CXXRecordDecl::getCanonicalDecl(), clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TemplateSpecCandidateSet::getLocation(), getMoreSpecializedPartialSpecialization(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), getTemplateArgumentBindingsText(), clang::ClassTemplateDecl::getTemplatedDecl(), getTemplateInstantiationArgs(), I, InstantiateClass(), clang::Decl::isInvalidDecl(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::ClassTemplatePartialSpecializationDecl::isMemberSpecialization(), clang::MakeDeductionFailureInfo(), P, clang::Result, clang::TemplateSpecCandidate::set(), clang::ClassTemplateSpecializationDecl::setInstantiationOf(), and clang::Decl::setInvalidDecl().
| void Sema::InstantiateClassTemplateSpecializationMembers | ( | SourceLocation | PointOfInstantiation, |
| ClassTemplateSpecializationDecl * | ClassTemplateSpec, | ||
| TemplateSpecializationKind | TSK | ||
| ) |
Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.
Definition at line 2619 of file SemaTemplateInstantiate.cpp.
References getTemplateInstantiationArgs(), and InstantiateClassMembers().
| bool Sema::InstantiateEnum | ( | SourceLocation | PointOfInstantiation, |
| EnumDecl * | Instantiation, | ||
| EnumDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateSpecializationKind | TSK | ||
| ) |
Instantiate the definition of an enum from a given pattern.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be a member enumeration of a class temploid specialization, or a local enumeration within a function temploid specialization. |
| Pattern | The templated declaration from which the instantiation occurs. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
| TSK | The kind of implicit or explicit instantiation to perform. |
true if an error occurred, false otherwise. Definition at line 2141 of file SemaTemplateInstantiate.cpp.
References DiagnoseUninstantiableTemplate(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::EnumDecl::getMemberSpecializationInfo(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::NamedDecl::setHidden(), and clang::EnumDecl::setTemplateSpecializationKind().
Referenced by InstantiateClassMembers(), and RequireCompleteDeclContext().
| void Sema::InstantiateExceptionSpec | ( | SourceLocation | PointOfInstantiation, |
| FunctionDecl * | Function | ||
| ) |
Definition at line 3194 of file SemaTemplateInstantiateDecl.cpp.
References addInstantiatedParametersToScope(), clang::Type::castAs(), clang::EST_None, clang::EST_Uninstantiated, clang::FunctionProtoType::getExceptionSpecTemplate(), clang::FunctionProtoType::getExceptionSpecType(), getTemplateInstantiationArgs(), clang::ValueDecl::getType(), clang::Sema::InstantiatingTemplate::isInvalid(), SubstExceptionSpec(), and UpdateExceptionSpec().
Referenced by CheckExplicitlyDefaultedSpecialMember(), and ResolveExceptionSpec().
| void Sema::InstantiateFunctionDefinition | ( | SourceLocation | PointOfInstantiation, |
| FunctionDecl * | Function, | ||
| bool | Recursive = false, |
||
| bool | DefinitionRequired = false |
||
| ) |
Instantiate the definition of the given function from its template.
| PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close. |
| Function | the already-instantiated declaration of a function template specialization or member function of a class template specialization. |
| Recursive | if true, recursively instantiates any functions that are required by this instantiation. |
| DefinitionRequired | if true, then we are performing an explicit instantiation where the body of the function is required. Complain if there is no such body. |
Definition at line 3347 of file SemaTemplateInstantiateDecl.cpp.
References ActOnFinishFunctionBody(), ActOnStartOfFunctionDef(), addInstantiatedParametersToScope(), Consumer, DefineUsedVTables(), Diag(), clang::LocalInstantiationScope::Exit(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getASTMutationListener(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::Type::getContainedAutoType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::Decl::getPreviousDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionDecl::getReturnType(), getTemplateInstantiationArgs(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), InstantiateMemInitializers(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::Decl::isFromASTFile(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isLateTemplateParsed(), LateParsedTemplateMap, LateTemplateParser, OpaqueParser, PendingInstantiations, PerformDependentDiagnostics(), PerformPendingInstantiations(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::ExternalSemaSource::ReadLateParsedTemplates(), SetDeclDefaulted(), clang::DeclaratorDecl::setInnerLocStart(), clang::Decl::setInvalidDecl(), SubstQualifier(), SubstStmt(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and clang::TSK_ExplicitSpecialization.
Referenced by DeduceReturnType(), InstantiateClassMembers(), MarkFunctionReferenced(), and PerformPendingInstantiations().
| bool Sema::InstantiateInClassInitializer | ( | SourceLocation | PointOfInstantiation, |
| FieldDecl * | Instantiation, | ||
| FieldDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Instantiate the definition of a field from the given pattern.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be a class of a class temploid specialization, or a local enumeration within a function temploid specialization. |
| Pattern | The templated declaration from which the instantiation occurs. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
true if an error occurred, false otherwise. Definition at line 2202 of file SemaTemplateInstantiate.cpp.
References ActOnFinishCXXInClassMemberInitializer(), ActOnStartCXXInClassMemberInitializer(), Diag(), clang::FieldDecl::getInClassInitializer(), clang::FieldDecl::getInClassInitStyle(), clang::Decl::getLocEnd(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), clang::FieldDecl::hasInClassInitializer(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, clang::Decl::setInvalidDecl(), and SubstInitializer().
Referenced by BuildCXXDefaultInitExpr(), and InstantiateClassMembers().
| void Sema::InstantiateMemInitializers | ( | CXXConstructorDecl * | New, |
| const CXXConstructorDecl * | Tmpl, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 4025 of file SemaTemplateInstantiateDecl.cpp.
References ActOnMemInitializers(), BuildBaseInitializer(), BuildDelegatingInitializer(), BuildMemberInitializer(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), CurContext, FindInstantiatedDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::NamedDecl::getDeclName(), clang::DeclContext::getParent(), clang::CXXMethodDecl::getParent(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), I, clang::CXXConstructorDecl::inits(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Decl::setInvalidDecl(), SubstInitializer(), and SubstType().
Referenced by InstantiateFunctionDefinition().
| void Sema::InstantiateStaticDataMemberDefinition | ( | SourceLocation | PointOfInstantiation, |
| VarDecl * | Var, | ||
| bool | Recursive = false, |
||
| bool | DefinitionRequired = false |
||
| ) |
Instantiate the definition of the given variable from its template.
| PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close. |
| Var | the already-instantiated declaration of a static member variable of a class template specialization. |
| Recursive | if true, recursively instantiates any functions that are required by this instantiation. |
| DefinitionRequired | if true, then we are performing an explicit instantiation where an out-of-line definition of the member variable is required. Complain if there is no such definition. |
Definition at line 3760 of file SemaTemplateInstantiateDecl.cpp.
References InstantiateVariableDefinition().
Referenced by InstantiateClassMembers().
| void Sema::InstantiateVariableDefinition | ( | SourceLocation | PointOfInstantiation, |
| VarDecl * | Var, | ||
| bool | Recursive = false, |
||
| bool | DefinitionRequired = false |
||
| ) |
Definition at line 3769 of file SemaTemplateInstantiateDecl.cpp.
References clang::LookupResult::addDecl(), clang::anyDependentTemplateArguments(), clang::TemplateArgumentList::asArray(), CompleteVarTemplateSpecializationDecl(), Consumer, DefineUsedVTables(), Diag(), clang::LocalInstantiationScope::Exit(), ForRedeclaration, getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLexicalDeclContext(), clang::VarDecl::getPointOfInstantiation(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplateSpecializationDecl::getTemplateArgsInfo(), clang::VarTemplateDecl::getTemplatedDecl(), clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs(), getTemplateInstantiationArgs(), clang::VarDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleCXXStaticMemberVarInstantiation(), clang::VarDecl::hasInit(), InstantiateVariableInitializer(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::VarTemplatePartialSpecializationDecl::isMemberSpecialization(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), LookupOrdinaryName, MergeVarDecl(), PendingInstantiations, PerformPendingInstantiations(), clang::Decl::setInvalidDecl(), clang::VarDecl::setTemplateSpecializationKind(), clang::EnumDecl::setTemplateSpecializationKind(), SubstDecl(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and clang::TSK_ExplicitSpecialization.
Referenced by completeExprArrayBound(), DoMarkVarDeclReferenced(), InstantiateStaticDataMemberDefinition(), and PerformPendingInstantiations().
| void Sema::InstantiateVariableInitializer | ( | VarDecl * | Var, |
| VarDecl * | OldVar, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Instantiate the initializer of a variable.
Definition at line 3701 of file SemaTemplateInstantiateDecl.cpp.
References ActOnUninitializedDecl(), AddInitializerToDecl(), clang::VarDecl::CallInit, ConstantEvaluated, clang::DirectInit, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::VarDecl::getAnyInitializer(), getASTContext(), clang::VarDecl::getInit(), clang::VarDecl::getInitStyle(), clang::Decl::hasAttr(), clang::Expr::isConstantInitializer(), clang::VarDecl::isCXXForRangeDecl(), clang::VarDecl::isDirectInit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isStaticDataMember(), PopExpressionEvaluationContext(), PotentiallyEvaluated, PushExpressionEvaluationContext(), clang::Decl::setInvalidDecl(), and SubstInitializer().
Referenced by BuildVariableInstantiation(), CompleteVarTemplateSpecializationDecl(), and InstantiateVariableDefinition().
| QualType Sema::InvalidOperands | ( | SourceLocation | Loc, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS | ||
| ) |
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).
type checking binary operators (subroutines of CreateBuiltinBinOp).
Definition at line 7559 of file SemaExpr.cpp.
References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Expr::getType().
| bool Sema::isAbstractType | ( | SourceLocation | Loc, |
| QualType | T | ||
| ) |
Definition at line 4426 of file SemaDeclCXX.cpp.
References Context, clang::frontend::CPlusPlus, clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::CXXRecordDecl::getDefinition(), getLangOpts(), clang::CXXRecordDecl::isAbstract(), and clang::TagDecl::isBeingDefined().
Referenced by EvaluateBinaryTypeTrait(), and RequireNonAbstractType().
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.
| SD | Declaration checked for nested-name-specifier. |
| IsExtension | If not null and the declaration is accepted as an extension, the pointed variable is assigned true. |
Definition at line 289 of file SemaCXXScopeSpec.cpp.
References Context, clang::ASTContext::getLangOpts(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), and clang::Type::isDependentType().
Referenced by BuildCXXNestedNameSpecifier(), and FindFirstQualifierInScope().
| bool Sema::isAcceptableTagRedeclaration | ( | const TagDecl * | Previous, |
| TagTypeKind | NewTag, | ||
| bool | isDefinition, | ||
| SourceLocation | NewTagLoc, | ||
| const IdentifierInfo * | Name | ||
| ) |
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration.
Definition at line 11665 of file SemaDecl.cpp.
References clang::FixItHint::CreateReplacement(), Diag(), clang::TagDecl::getDefinition(), clang::Decl::getLocation(), getRedeclDiagFromTagKind(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindName(), I, isClassCompatTagKind(), isTemplate(), Previous, and clang::Redeclarable< decl_type >::redecls().
| bool Sema::IsBlockPointerConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| QualType & | ConvertedType | ||
| ) |
Definition at line 2460 of file SemaOverload.cpp.
References Context, clang::frontend::CPlusPlus, clang::ASTContext::FunctionTypesMatchOnNSConsumedAttrs(), clang::Type::getAs(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::ASTContext::hasSameType(), clang::Type::isRecordType(), clang::FunctionProtoType::isVariadic(), and clang::NumArgs.
Referenced by IsStandardConversion().
|
inline |
Definition at line 1416 of file Sema.h.
Referenced by ActOnCXXDelete(), AddConversionCandidate(), AddMemberOperatorCandidates(), BuildArrayType(), CompareReferenceRelationship(), DeduceTemplateArgumentsByTypeMatch(), EvaluateBinaryTypeTrait(), IsDerivedFrom(), isNullPointerValueTemplateArgument(), IsUserDefinedConversion(), PerformContextualImplicitConversion(), PerformImplicitConversion(), RequireLiteralType(), TryConstructorInitialization(), TryInitializerListConstruction(), TryListConversion(), TryListInitialization(), TryReferenceInit(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), and TryUserDefinedConversion().
Determine if a conversion is a complex promotion.
A complex promotion is defined as a complex -> complex conversion where the conversion between the underlying real types is a floating-point or integral promotion.
Definition at line 1976 of file SemaOverload.cpp.
References clang::Type::getAs(), and clang::ComplexType::getElementType().
Referenced by IsStandardConversion().
| bool Sema::isCopyElisionCandidate | ( | QualType | ReturnType, |
| const VarDecl * | VD, | ||
| bool | AllowFunctionParameters | ||
| ) |
Definition at line 2693 of file SemaStmt.cpp.
References Context, clang::ASTContext::getDeclAlign(), clang::Decl::getKind(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::Decl::hasAttr(), clang::VarDecl::hasLocalStorage(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), clang::VarDecl::isExceptionVariable(), clang::QualType::isNull(), clang::Type::isRecordType(), and clang::QualType::isVolatileQualified().
| bool Sema::isCurrentClassName | ( | const IdentifierInfo & | II, |
| Scope * | S, | ||
| const CXXScopeSpec * | SS = nullptr |
||
| ) |
isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined.
In the case of nested classes, this will only return true if II is the name of the innermost class.
Definition at line 1272 of file SemaDeclCXX.cpp.
References computeDeclContext(), clang::frontend::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOpts(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
Referenced by clang::Parser::ParseUnqualifiedId().
| bool Sema::isCurrentClassNameTypo | ( | IdentifierInfo *& | II, |
| const CXXScopeSpec * | SS | ||
| ) |
Determine whether the identifier II is a typo for the name of the class type currently being defined.
If so, update it to the identifier that should have been used.
Definition at line 1291 of file SemaDeclCXX.cpp.
References computeDeclContext(), clang::frontend::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOpts(), clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
| bool Sema::isDeclInScope | ( | NamedDecl * | D, |
| DeclContext * | Ctx, | ||
| Scope * | S = nullptr, |
||
| bool | AllowInlineNamespace = false |
||
| ) |
isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.
| AllowInlineNamespace | If true, allow the declaration to be in the enclosing namespace set of the context, rather than contained directly within it. |
Definition at line 1268 of file SemaDecl.cpp.
Referenced by ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnOpenMPIdExpression(), BuildUsingDeclaration(), CheckAnonMemberRedeclaration(), HandleMSProperty(), and MergeCXXFunctionDecl().
| bool Sema::isDependentScopeSpecifier | ( | const CXXScopeSpec & | SS | ) |
Definition at line 159 of file SemaCXXScopeSpec.cpp.
References clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
Referenced by BuildCXXNestedNameSpecifier(), BuildMemInitializer(), GetFullTypeForDeclarator(), and isNonTypeNestedNameSpecifier().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| QualType | Derived, | ||
| QualType | Base | ||
| ) |
Determine whether the type Derived is a C++ class that is derived from the type Base.
Definition at line 1668 of file SemaDeclCXX.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAsCXXRecordDecl(), getLangOpts(), clang::TagDecl::isBeingDefined(), isCompleteType(), clang::CXXRecordDecl::isDerivedFrom(), and clang::Decl::isInvalidDecl().
Referenced by ActOnConversionDeclarator(), AddConversionCandidate(), AddOverloadCandidate(), CheckDerivedToBaseConversion(), CheckExceptionSpecSubset(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionReturnType(), CheckPointerToMemberOperands(), CompareDerivedToBaseConversions(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), DiagnoseBadConversion(), FindBaseInitializer(), clang::InitializationSequence::InitializeFrom(), IsUserDefinedConversion(), clang::InitializationSequence::Perform(), TryClassUnification(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryLValueToRValueCast(), TryObjectArgumentInitialization(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), and TryUserDefinedConversion().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| QualType | Derived, | ||
| QualType | Base, | ||
| CXXBasePaths & | Paths | ||
| ) |
Determine whether the type Derived is a C++ class that is derived from the type Base.
Definition at line 1695 of file SemaDeclCXX.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAsCXXRecordDecl(), getLangOpts(), clang::TagDecl::isBeingDefined(), isCompleteType(), and clang::CXXRecordDecl::isDerivedFrom().
Determine if A and B are equivalent internal linkage declarations from different modules, and thus an ambiguity error can be downgraded to an extension warning.
Determine whether two declarations are "equivalent" for the purposes of name lookup and overload resolution.
This applies when the same internal/no linkage entity is defined by two modules (probably by textually including the same header). In such a case, we don't consider the declarations to declare the same entity, but we also don't want lookups with both declarations visible to be ambiguous in some cases (this happens when using a modularized libstdc++).
Definition at line 8651 of file SemaOverload.cpp.
References Context, getOwningModule(), and clang::ASTContext::hasSameType().
Referenced by clang::OverloadCandidateSet::BestViableFunction(), and CheckUsingShadowDecl().
IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6).
If so, returns true and sets PromotedType to the promoted type.
An rvalue of type float can be converted to an rvalue of type double. (C++ 4.6p1).
Definition at line 1943 of file SemaOverload.cpp.
References clang::Type::getAs().
Referenced by IsStandardConversion().
| bool Sema::isFunctionConsideredUnavailable | ( | FunctionDecl * | FD | ) |
Checks availability of the function depending on the current function context.Inside an unavailable function,unavailability is ignored.
Checks availability of the function depending on the current function context.
FD is unavailable and current context is inside an available function, false otherwise.Inside an unavailable function, unavailability is ignored.
Definition at line 1149 of file SemaOverload.cpp.
References clang::Decl::isUnavailable().
Referenced by clang::OverloadCandidateSet::BestViableFunction(), and NoteFunctionCandidate().
| bool Sema::isImplicitlyDeleted | ( | FunctionDecl * | FD | ) |
Determine whether the given function is an implicitly-deleted special member function.
Definition at line 11175 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().
Referenced by CreateOverloadedBinOp(), and clang::InitializationSequence::Diagnose().
| bool Sema::isIncompatibleTypedef | ( | TypeDecl * | Old, |
| TypedefNameDecl * | New | ||
| ) |
Definition at line 1842 of file SemaDecl.cpp.
References Context, Diag(), clang::Decl::getLocation(), clang::ASTContext::getTypeDeclType(), clang::TypedefNameDecl::getUnderlyingType(), clang::ASTContext::hasSameType(), clang::Type::isDependentType(), clang::SourceLocation::isValid(), clang::Type::isVariablyModifiedType(), and clang::Decl::setInvalidDecl().
Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().
| bool Sema::isInitListConstructor | ( | const CXXConstructorDecl * | Ctor | ) |
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
Definition at line 7473 of file SemaDeclCXX.cpp.
References clang::Type::getAs(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ParmVarDecl::hasDefaultArg(), and isStdInitializerList().
Referenced by IsInitializerListConstructorConversion(), and ResolveConstructorOverload().
| bool Sema::IsInsideALocalClassWithinATemplateFunction | ( | ) |
Definition at line 8458 of file SemaTemplate.cpp.
References clang::DeclContext::getParent(), clang::FunctionDecl::getTemplatedKind(), clang::DeclContext::isNamespace(), clang::DeclContext::isTranslationUnit(), and clang::FunctionDecl::TK_NonTemplate.
IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5).
If so, returns true and sets PromotedType to the promoted type.
Definition at line 1794 of file SemaOverload.cpp.
References Context, clang::Type::getAs(), clang::BuiltinType::getKind(), clang::Expr::getSourceBitField(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::IntTy, clang::Type::isAnyCharacterType(), clang::Type::isBooleanType(), clang::Type::isCharType(), clang::Type::isEnumeralType(), clang::Type::isIntegerType(), clang::Type::isIntegralType(), clang::Type::isPromotableIntegerType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, and clang::ASTContext::UnsignedLongTy.
Referenced by IsStandardConversion().
| bool Sema::IsInvalidUnlessNestedName | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| IdentifierInfo & | Identifier, | ||
| SourceLocation | IdentifierLoc, | ||
| SourceLocation | ColonLoc, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext | ||
| ) |
IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the specified identifier is only valid as a nested name specifier, for example a namespace name.
It is conservatively correct to always return false from this method.
The arguments are the same as those passed to ActOnCXXNestedNameSpecifier.
Definition at line 844 of file SemaCXXScopeSpec.cpp.
References BuildCXXNestedNameSpecifier(), GetTypeFromParser(), and clang::CXXScopeSpec::isInvalid().
| bool Sema::isKnownName | ( | StringRef | name | ) |
Definition at line 3333 of file SemaExprObjC.cpp.
References Context, clang::IdentifierTable::get(), clang::ASTContext::Idents, LookupName(), LookupOrdinaryName, and TUScope.
Referenced by BuildObjCBridgedCast(), and diagnoseObjCARCConversion().
Is this a legal conversion between two types, one of which is known to be a vector type?
Definition at line 5716 of file SemaExpr.cpp.
References Context, clang::ASTContext::getLangOpts(), and clang::Type::isVectorType().
Referenced by IsVectorConversion().
| bool clang::Sema::isLibstdcxxEagerExceptionSpecHack | ( | const Declarator & | D | ) |
Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification to work around a libstdc++ bug.
HACK: libstdc++ has a bug where it shadows std::swap with a member swap function then tries to call std::swap unqualified from the exception specification of that function.
This function detects whether we're in such a case and turns off delay-parsing of exception specifications.
Definition at line 42 of file SemaExceptionSpec.cpp.
References Context, CurContext, clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifier(), clang::Declarator::getLocStart(), clang::ASTContext::getSourceManager(), getStdNamespace(), clang::SourceManager::isInSystemHeader(), and clang::IdentifierInfo::isStr().
| bool Sema::IsMemberPointerConversion | ( | Expr * | From, |
| QualType | FromType, | ||
| QualType | ToType, | ||
| bool | InOverloadResolution, | ||
| QualType & | ConvertedType | ||
| ) |
IsMemberPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a member pointer conversion (C++ 4.11).
If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.
Definition at line 2773 of file SemaOverload.cpp.
References Context, clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::ASTContext::getMemberPointerType(), clang::MemberPointerType::getPointeeType(), clang::QualType::getTypePtr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.
Referenced by IsStandardConversion().
| bool Sema::isMicrosoftMissingTypename | ( | const CXXScopeSpec * | SS, |
| Scope * | S | ||
| ) |
isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning.
This is needed for MSVC compatibility; Example:
Definition at line 539 of file SemaDecl.cpp.
References clang::CXXRecordDecl::bases(), Context, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::hasSameUnqualifiedType(), clang::Scope::isFunctionPrototypeScope(), and clang::NestedNameSpecifier::Super.
Definition at line 1385 of file Sema.h.
Referenced by checkModuleImportContext().
| bool Sema::isNonTypeNestedNameSpecifier | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo & | II, | ||
| ParsedType | ObjectType | ||
| ) |
Definition at line 358 of file SemaCXXScopeSpec.cpp.
References computeDeclContext(), clang::LookupResult::getAsSingle(), clang::CXXScopeSpec::getRange(), GetTypeFromParser(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), LookupName(), LookupNestedNameSpecifierName, LookupQualifiedName(), RequireCompleteDeclContext(), clang::LookupResult::setContextRange(), and clang::LookupResult::suppressDiagnostics().
Determine whether the conversion from FromType to ToType is a valid conversion that strips "noreturn" off the nested function type.
Definition at line 1366 of file SemaOverload.cpp.
References clang::ASTContext::adjustFunctionType(), Context, clang::CanQual< T >::getAs(), clang::ASTContext::getCanonicalType(), clang::FunctionType::getExtInfo(), and clang::ASTContext::hasSameUnqualifiedType().
Referenced by CheckOriginalCallArgDeduction(), checkPointerTypesForAssignment(), isSameOrCompatibleFunctionType(), and IsStandardConversion().
| bool Sema::isObjCPointerConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| QualType & | ConvertedType, | ||
| bool & | IncompatibleObjC | ||
| ) |
isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
Subroutine of IsPointerConversion, with the same arguments and return values.
Definition at line 2222 of file SemaOverload.cpp.
References AdoptQualifiers(), BuildSimilarlyQualifiedPointerType(), clang::ASTContext::canAssignObjCInterfaces(), Context, clang::frontend::CPlusPlus, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ObjCObjectPointerType::getInterfaceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::getTypeQuals(), clang::ASTContext::hasSameUnqualifiedType(), clang::QualType::isAtLeastAsQualifiedAs(), clang::Type::isObjCBuiltinType(), clang::Type::isPointerType(), clang::FunctionProtoType::isVariadic(), and clang::NumArgs.
Referenced by DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), HandlePropertyInClassExtension(), and isAllowableExplicitConversion().
| bool Sema::isObjCWritebackConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| QualType & | ConvertedType | ||
| ) |
Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.
| FromType | The type we're converting form. |
| ToType | The type we're converting to. |
| ConvertedType | The type that will be produced after applying this conversion. |
Construct the type we're converting to, which is a pointer to __autoreleasing pointee.
Definition at line 2402 of file SemaOverload.cpp.
References clang::Qualifiers::compatiblyIncludes(), Context, clang::Qualifiers::empty(), clang::Type::getAs(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Qualifiers::setObjCLifetime(), clang::ASTContext::typesAreCompatible(), and clang::Qualifiers::withoutObjCLifetime().
Referenced by IsStandardConversion(), and tryObjCWritebackConversion().
| bool Sema::IsOpenMPCapturedByRef | ( | VarDecl * | VD, |
| const sema::CapturedRegionScopeInfo * | RSI | ||
| ) |
Return true if the provided declaration VD should be captured by reference in the provided scope RSI.
This will take into account the semantics of the directive and associated clauses.
Definition at line 775 of file SemaOpenMP.cpp.
References clang::Type::castAs(), DSAStack, getASTContext(), clang::ReferenceType::getPointeeType(), clang::ValueDecl::getType(), clang::isOpenMPTargetDirective(), clang::Type::isScalarType(), LangOpts, and clang::sema::CapturedRegionScopeInfo::TheScope.
Referenced by captureInCapturedRegion().
Check if the specified variable is used in one of the private clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP constructs.
Definition at line 863 of file SemaOpenMP.cpp.
References DSAStack, clang::VarDecl::getCanonicalDecl(), clang::VarDecl::hasLocalStorage(), clang::isOpenMPPrivate(), clang::isOpenMPTargetDirective(), LangOpts, clang::OMPC_unknown, and clang::OMPD_unknown.
Referenced by captureInCapturedRegion(), and tryCaptureVariable().
Check if the specified variable is used in 'private' clause.
| Level | Relative level of nested OpenMP construct for that the check is performed. |
Definition at line 908 of file SemaOpenMP.cpp.
References DSAStack, and LangOpts.
Referenced by tryCaptureVariable().
Check if the specified variable is captured by 'target' directive.
| Level | Relative level of nested OpenMP construct for that the check is performed. |
Definition at line 914 of file SemaOpenMP.cpp.
References DSAStack, clang::VarDecl::hasLocalStorage(), clang::isOpenMPTargetDirective(), and LangOpts.
Referenced by tryCaptureVariable().
| bool Sema::IsOverload | ( | FunctionDecl * | New, |
| FunctionDecl * | Old, | ||
| bool | IsForUsingDecl | ||
| ) |
Definition at line 987 of file SemaOverload.cpp.
References clang::Qualifiers::Const, Context, clang::frontend::CPlusPlus14, Diag(), functionHasPassObjectSizeParams(), clang::ASTContext::getCanonicalType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::FunctionProtoType::getNumParams(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionType::getReturnType(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::CXXMethodDecl::getTypeQualifiers(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::CXXMethodDecl::isStatic(), clang::FunctionProtoType::isVariadic(), clang::Qualifiers::Profile(), clang::RQ_None, clang::Decl::specific_attr_begin(), and clang::Decl::specific_attr_end().
| bool Sema::IsPointerConversion | ( | Expr * | From, |
| QualType | FromType, | ||
| QualType | ToType, | ||
| bool | InOverloadResolution, | ||
| QualType & | ConvertedType, | ||
| bool & | IncompatibleObjC | ||
| ) |
IsPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a pointer conversion (C++ 4.10).
If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.
This routine also supports conversions to and from block pointers and conversions with Objective-C's 'id', 'id<protocols...>', and pointers to interfaces. FIXME: Once we've determined the appropriate overloading rules for Objective-C, we may want to split the Objective-C checks into a different routine; however, GCC seems to consider all of these conversions to be pointer conversions, so for now they live here. IncompatibleObjC will be set if the conversion is an allowed Objective-C conversion that should result in a warning.
Definition at line 2070 of file SemaOverload.cpp.
References clang::ASTContext::areCompatibleVectorTypes(), BuildSimilarlyQualifiedPointerType(), Context, clang::frontend::CPlusPlus, clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), isNullPointerConstantForConversion(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVectorType(), clang::Type::isVoidType(), and clang::ASTContext::typesAreCompatible().
Referenced by IsStandardConversion().
| bool Sema::IsQualificationConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| bool | CStyle, | ||
| bool & | ObjCLifetimeConversion | ||
| ) |
IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToType is a qualification conversion (C++ 4.4).
| ObjCLifetimeConversion | Output parameter that will be set to indicate when the qualification conversion involves a change in the Objective-C object lifetime. |
Definition at line 2895 of file SemaOverload.cpp.
References clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::compatiblyIncludesObjCLifetime(), Context, clang::ASTContext::getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasConst(), clang::Qualifiers::hasObjCGCAttr(), clang::ASTContext::hasSameUnqualifiedType(), isNonTrivialObjCLifetimeConversion(), clang::Qualifiers::removeObjCGCAttr(), clang::Qualifiers::removeObjCLifetime(), and clang::ASTContext::UnwrapSimilarPointerTypes().
Referenced by CastsAwayConstness(), CheckOriginalCallArgDeduction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), isAllowableExplicitConversion(), isNullPointerValueTemplateArgument(), and IsStandardConversion().
| bool Sema::isSameOrCompatibleFunctionType | ( | CanQualType | Param, |
| CanQualType | Arg | ||
| ) |
Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions).
If any of parameter and argument is not a function, just perform type comparison.
| Param | the template parameter type. |
| Arg | the argument type. |
Definition at line 899 of file SemaTemplateDeduction.cpp.
References Context, clang::CanQual< T >::getAs(), clang::ASTContext::getCanonicalType(), and IsNoReturnConversion().
Referenced by DeduceTemplateArguments(), and DeduceTemplateArgumentsByTypeMatch().
Private Helper predicate to check for 'self'.
Definition at line 1699 of file SemaExprObjC.cpp.
References CurContext, and clang::DeclContext::getNonClosureAncestor().
Referenced by BuildInstanceMessage(), DiagnoseAssignmentAsCondition(), and LookupMethodInReceiverType().
| bool Sema::isSelfExpr | ( | Expr * | RExpr, |
| const ObjCMethodDecl * | Method | ||
| ) |
Definition at line 1706 of file SemaExprObjC.cpp.
References clang::ObjCMethodDecl::getSelfDecl(), and clang::Expr::IgnoreParenLValueCasts().
| Optional< TemplateDeductionInfo * > Sema::isSFINAEContext | ( | ) | const |
Determines whether we are currently in a context where template argument substitution failures are not considered errors.
Optional if we're not in a SFINAE context. Otherwise, contains a pointer that, if non-NULL, contains the nearest template-deduction context object, which can be used to capture diagnostics that will be suppressed. Definition at line 566 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution, clang::Sema::ActiveTemplateInstantiation::DefaultFunctionArgumentInstantiation, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentChecking, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation, clang::Sema::ActiveTemplateInstantiation::ExceptionSpecInstantiation, clang::Sema::ActiveTemplateInstantiation::ExplicitTemplateArgumentSubstitution, InNonInstantiationSFINAEContext, clang::None, clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution, and clang::Sema::ActiveTemplateInstantiation::TemplateInstantiation.
Referenced by ActOnCXXDelete(), ActOnPseudoDestructorExpr(), BuildArrayType(), buildOverloadedCallSet(), CheckArrow(), convertPointersToCompositeType(), CopyObject(), createImplicitModuleImportForErrorRecovery(), CXXCheckConditionalOperands(), diagnoseNoViableConversion(), EmitCurrentDiagnostic(), recordConversion(), and clang::Sema::SFINAETrap::SFINAETrap().
| bool Sema::isSimpleTypeSpecifier | ( | tok::TokenKind | Kind | ) | const |
Determine whether the token kind starts a simple-type-specifier.
Definition at line 94 of file SemaDecl.cpp.
| bool Sema::IsSimplyAccessible | ( | NamedDecl * | Decl, |
| DeclContext * | Ctx | ||
| ) |
Checks access to Decl from the given class.
The check will take access specifiers into account, but no member access expressions and such.
| Decl | the declaration to check if it can be accessed |
| Ctx | the class/context from which to start the search |
Definition at line 1858 of file SemaAccess.cpp.
References AR_inaccessible, clang::AS_public, Context, clang::declaresSameEntity(), clang::Decl::getAccess(), clang::Type::getCanonicalTypeInternal(), IsAccessible(), clang::NamedDecl::isCXXClassMember(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::DeclAccessPair::make(), clang::sema::AccessedEntity::Member, clang::ObjCIvarDecl::Package, clang::ObjCIvarDecl::Private, and clang::ObjCIvarDecl::Public.
| bool Sema::isSpecialMemberAccessibleForDeletion | ( | CXXMethodDecl * | decl, |
| AccessSpecifier | access, | ||
| QualType | objectType | ||
| ) |
Is the given special member function accessible for the purposes of deciding whether to define a special member function as deleted?
Definition at line 1571 of file SemaAccess.cpp.
References AR_accessible, AR_dependent, AR_inaccessible, clang::AS_public, CheckAccess(), Context, clang::CXXMethodDecl::getParent(), and clang::DeclAccessPair::make().
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL, assigns the element type to Element.
Definition at line 7364 of file SemaDeclCXX.cpp.
References clang::frontend::CPlusPlus, clang::TemplateArgumentList::data(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::TemplateArgument::getAsType(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Preprocessor::getIdentifierTable(), getLangOpts(), clang::TemplateParameterList::getMinRequiredArguments(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), getStdNamespace(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::DeclContext::InEnclosingNamespaceSetOf(), PP, StdInitializerList, StdNamespace, and clang::TemplateSpecializationType().
Referenced by BuildCXXNew(), DeduceFromInitializerList(), diagnoseListInit(), isInitListConstructor(), TryInitializerListConstruction(), TryListConversion(), and TryListInitialization().
Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively).
Definition at line 2875 of file SemaExprCXX.cpp.
References clang::StringLiteral::Ascii, clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::IgnoreParens(), clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.
Referenced by DiagnoseAssignmentResult(), and IsStandardConversion().
| DeclSpec::TST Sema::isTagName | ( | IdentifierInfo & | II, |
| Scope * | S | ||
| ) |
isTagName() - This method is called for error recovery purposes only to determine if the specified name is a valid tag name ("struct foo").
If so, this returns the TST for the tag corresponding to it (TST_enum, TST_union, TST_struct, TST_interface, TST_class). This is used to diagnose cases in C where the user forgot to specify the tag.
Definition at line 506 of file SemaDecl.cpp.
References clang::LookupResult::Found, clang::LookupResult::getAsSingle(), clang::LookupResult::getResultKind(), clang::LookupResult::suppressDiagnostics(), clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, clang::DeclSpec::TST_union, clang::DeclSpec::TST_unspecified, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.
| TemplateNameKind Sema::isTemplateName | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| bool | hasTemplateKeyword, | ||
| UnqualifiedId & | Name, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext, | ||
| TemplateTy & | Template, | ||
| bool & | MemberOfUnknownSpecialization | ||
| ) |
Definition at line 136 of file SemaTemplate.cpp.
References Context, clang::frontend::CPlusPlus, clang::ASTContext::DeclarationNames, clang::OpaquePtr< PtrTy >::get(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::UnqualifiedId::getKind(), clang::UnqualifiedId::getLocStart(), clang::ASTContext::getOverloadedTemplateName(), clang::ASTContext::getQualifiedTemplateName(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::TNK_Function_template, clang::TNK_Non_template, clang::TNK_Type_template, and clang::TNK_Var_template.
Referenced by clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.
Definition at line 974 of file SemaExprCXX.cpp.
References CXXThisTypeOverride, clang::Type::getAsCXXRecordDecl(), clang::TagDecl::isBeingDefined(), and clang::QualType::isNull().
Referenced by ActOnStartCXXMemberReference(), and LookupMemberExprInRecord().
|
inline |
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
Definition at line 6811 of file Sema.h.
References ExprEvalContexts.
Referenced by checkCoroutineContext(), CheckCXXThisCapture(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DoMarkVarDeclReferenced(), inferARCLifetimeForPointee(), MarkVTableUsed(), recordUseOfEvaluatedWeak(), and TransformToPotentiallyEvaluated().
| bool Sema::isUnexpandedParameterPackPermitted | ( | ) |
Determine whether an unexpanded parameter pack might be permitted in this location.
Determine whether it's possible for an unexpanded parameter pack to be valid in this location.
Useful for error recovery.
This only happens when we're in a declaration that is nested within an expression that could be expanded, such as a lambda-expression within a function call.
This is conservatively correct, but may claim that some unexpanded packs are permitted when they are not.
Definition at line 207 of file SemaTemplateVariadic.cpp.
References FunctionScopes.
Determine if type T is a valid subject for a nonnull and similar attributes.
By default, we look through references (the behavior used by nonnull), but if the second parameter is true, then we treat a reference type as valid.
Definition at line 1189 of file SemaDeclAttr.cpp.
References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::QualType::getNonReferenceType(), I, clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), and clang::Type::isReferenceType().
Referenced by AddAssumeAlignedAttr(), attrNonNullArgCheck(), CheckNonNullArguments(), and handleNonNullAttr().
| Sema::VarArgKind Sema::isValidVarArgType | ( | const QualType & | Ty | ) |
Determine the degree of POD-ness for an expression.
Incomplete types are considered POD, since this check can be performed when we're in an unevaluated context.
Definition at line 840 of file SemaExpr.cpp.
References Context, clang::Type::getAsCXXRecordDecl(), clang::QualType::isCXX98PODType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), and clang::Type::isVoidType().
IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
If AllowMask is true, then we also allow the complement of a valid value, to be used as a mask.
Definition at line 14334 of file SemaDecl.cpp.
References clang::EnumDecl::enumerators(), FlagBitsCache, clang::Decl::hasAttr(), and clang::TagDecl::isCompleteDefinition().
Referenced by ActOnEnumBody(), and ShouldDiagnoseSwitchCaseNotInEnum().
Determine whether a declaration is visible to name lookup.
Definition at line 1388 of file Sema.h.
References clang::NamedDecl::isHidden().
Referenced by ActOnNamespaceAliasDef(), ArgumentDependentLookup(), CheckUsingShadowDecl(), diagnoseMissingImport(), filterNonConflictingPreviousTypedefDecls(), hasVisibleDefaultArgument(), hasVisibleDefinition(), and isPreferredLookupResult().
| bool Sema::IvarBacksCurrentMethodAccessor | ( | ObjCInterfaceDecl * | IFace, |
| ObjCMethodDecl * | Method, | ||
| ObjCIvarDecl * | IV | ||
| ) |
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'.
Definition at line 1582 of file SemaObjCProperty.cpp.
References clang::ObjCMethodDecl::getSelector(), clang::ObjCIvarDecl::getSynthesize(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCInterfaceDecl::known_extensions(), clang::ObjCInterfaceDecl::lookupMethod(), clang::ObjCContainerDecl::properties(), and clang::Property.
Referenced by LookupMemberExpr().
| NamedDecl * Sema::LazilyCreateBuiltin | ( | IdentifierInfo * | II, |
| unsigned | ID, | ||
| Scope * | S, | ||
| bool | ForRedeclaration, | ||
| SourceLocation | Loc | ||
| ) |
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
lazily create a decl for it. ForRedeclaration is true if we're creating this built-in in anticipation of redeclaring the built-in.
Definition at line 1727 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), clang::ASTContext::BuiltinInfo, Context, clang::frontend::CPlusPlus, clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::LinkageSpecDecl::Create(), Diag(), clang::ASTContext::GetBuiltinType(), clang::Builtin::Context::getHeaderName(), getHeaderName(), clang::Builtin::Context::getName(), clang::ASTContext::getTranslationUnitDecl(), clang::Type::isFunctionProtoType(), clang::Builtin::Context::isPredefinedLibFunction(), clang::LinkageSpecDecl::lang_c, LookupPredefedObjCSuperType(), clang::SC_Extern, clang::SC_None, clang::Decl::setImplicit(), and clang::ParmVarDecl::setScopeInfo().
Referenced by LookupBuiltin().
| void Sema::LoadExternalVTableUses | ( | ) |
Load any externally-stored vtable uses.
Definition at line 13191 of file SemaDeclCXX.cpp.
References I, clang::ExternalSemaSource::ReadUsedVTables(), VTablesUsed, and VTableUses.
Referenced by DefineUsedVTables(), and MarkVTableUsed().
| void Sema::LoadExternalWeakUndeclaredIdentifiers | ( | ) |
Load weak undeclared identifiers from the external source.
Definition at line 554 of file Sema.cpp.
References clang::ExternalSemaSource::ReadWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.
Referenced by ActOnEndOfTranslationUnit(), and ProcessPragmaWeak().
| DeclContext::lookup_result Sema::LookupConstructors | ( | CXXRecordDecl * | Class | ) |
Look up the constructors for the given class.
Definition at line 2964 of file SemaLookup.cpp.
References CanDeclareSpecialMemberFunction(), Context, clang::ASTContext::DeclarationNames, DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitMoveConstructor(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), getLangOpts(), clang::ASTContext::getTypeDeclType(), clang::DeclContext::lookup(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), and clang::CXXRecordDecl::needsImplicitMoveConstructor().
Referenced by BuildUsingDeclaration(), EvaluateUnaryTypeTrait(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| CXXMethodDecl * Sema::LookupCopyingAssignment | ( | CXXRecordDecl * | Class, |
| unsigned | Quals, | ||
| bool | RValueThis, | ||
| unsigned | ThisQuals | ||
| ) |
Look up the copying assignment operator for the given class.
Definition at line 2981 of file SemaLookup.cpp.
References clang::Qualifiers::Const, CXXCopyAssignment, clang::Sema::SpecialMemberOverloadResult::getMethod(), LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
Referenced by ComputeDefaultedCopyAssignmentExceptionSpec().
| CXXConstructorDecl * Sema::LookupCopyingConstructor | ( | CXXRecordDecl * | Class, |
| unsigned | Quals | ||
| ) |
Look up the copying constructor for the given class.
Definition at line 2942 of file SemaLookup.cpp.
References clang::Qualifiers::Const, CXXCopyConstructor, clang::Sema::SpecialMemberOverloadResult::getMethod(), LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
Referenced by ComputeDefaultedCopyCtorExceptionSpec().
| CXXConstructorDecl * Sema::LookupDefaultConstructor | ( | CXXRecordDecl * | Class | ) |
Look up the default constructor for the given class.
Definition at line 2933 of file SemaLookup.cpp.
References CXXDefaultConstructor, clang::Sema::SpecialMemberOverloadResult::getMethod(), LookupSpecialMember(), and clang::Result.
Referenced by ComputeDefaultedDefaultCtorExceptionSpec(), ComputeInheritingCtorExceptionSpec(), and TryValueInitialization().
| CXXDestructorDecl * Sema::LookupDestructor | ( | CXXRecordDecl * | Class | ) |
Look for the destructor of the given class.
During semantic analysis, this routine should be used in lieu of CXXRecordDecl::getDestructor().
Definition at line 3019 of file SemaLookup.cpp.
References CXXDestructor, clang::Sema::SpecialMemberOverloadResult::getMethod(), and LookupSpecialMember().
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), BuildCXXNew(), ComputeDefaultedDtorExceptionSpec(), EvaluateUnaryTypeTrait(), FinalizeVarWithDestructor(), MarkBaseAndMemberDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), SetDelegatingInitializer(), and SetIvarInitializers().
|
inline |
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition at line 3205 of file Sema.h.
Referenced by BuildClassMessage(), BuildInstanceMessage(), and ParseObjCSelectorExpression().
| ObjCMethodDecl * Sema::LookupImplementedMethodInGlobalPool | ( | Selector | Sel | ) |
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
Definition at line 3378 of file SemaDeclObjC.cpp.
References clang::ObjCMethodDecl::isDefined(), clang::ObjCMethodDecl::isPropertyAccessor(), and MethodPool.
Referenced by DiagnoseUseOfUnimplementedSelectors().
| bool Sema::LookupInlineAsmField | ( | StringRef | Base, |
| StringRef | Member, | ||
| unsigned & | Offset, | ||
| SourceLocation | AsmLoc | ||
| ) |
Definition at line 615 of file SemaStmtAsm.cpp.
References Context, clang::IdentifierTable::get(), clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::RecordType::getDecl(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::LookupResult::getFoundDecl(), clang::CharUnits::getQuantity(), clang::ASTContext::Idents, clang::LookupResult::isSingleResult(), clang::Result, and clang::ASTContext::toCharUnitsFromBits().
| ExprResult Sema::LookupInlineAsmIdentifier | ( | CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| UnqualifiedId & | Id, | ||
| llvm::InlineAsmIdentifierInfo & | Info, | ||
| bool | IsUnevaluatedContext | ||
| ) |
Definition at line 561 of file SemaStmtAsm.cpp.
References CheckNakedParmReference(), Context, clang::ExprError(), fillInlineAsmTypeInfo(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Expr::isRValue(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::Result.
Referenced by clang::Parser::ParseMSAsmIdentifier().
| ExprResult Sema::LookupInlineAsmVarDeclField | ( | Expr * | RefExpr, |
| StringRef | Member, | ||
| llvm::InlineAsmIdentifierInfo & | Info, | ||
| SourceLocation | AsmLoc | ||
| ) |
Definition at line 675 of file SemaStmtAsm.cpp.
References Context, clang::CXXDependentScopeMemberExpr::Create(), fillInlineAsmTypeInfo(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::Expr::getType(), clang::ASTContext::Idents, clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Result, clang::DeclarationNameInfo::setLoc(), and clang::DeclarationNameInfo::setName().
Referenced by clang::Parser::ParseMSAsmIdentifier().
| ExprResult Sema::LookupInObjCMethod | ( | LookupResult & | Lookup, |
| Scope * | S, | ||
| IdentifierInfo * | II, | ||
| bool | AllowBuiltinCreation = false |
||
| ) |
LookupInObjCMethod - The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Perform some additional lookup.
Ideally, most of this would be done by lookup, but there's actually quite a lot of extra work involved.
Returns a null sentinel to indicate trivial success.
Definition at line 2368 of file SemaExpr.cpp.
References clang::LookupResult::addDecl(), clang::ASTContext::BuiltinInfo, Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::declaresSameEntity(), Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::ObjCIvarDecl::getAccessControl(), clang::IdentifierInfo::getBuiltinID(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::LookupResult::getNameLoc(), clang::QualType::getObjCLifetime(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ObjCIvarDecl::getUsageType(), clang::ASTContext::Idents, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::ObjCMethodDecl::isClassMethod(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::LookupResult::isForRedeclaration(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Builtin::Context::isPredefinedLibFunction(), clang::LookupResult::isSingleResult(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::Qualifiers::OCL_Weak, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::ObjCIvarDecl::Private, clang::Result, clang::UnqualifiedId::setIdentifier(), and clang::UnqualifiedId::setKind().
Referenced by attemptRecovery().
|
inline |
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition at line 3197 of file Sema.h.
Referenced by BuildInstanceMessage(), hasIsEqualMethod(), and ParseObjCSelectorExpression().
| bool Sema::LookupInSuper | ( | LookupResult & | R, |
| CXXRecordDecl * | Class | ||
| ) |
Perform qualified name lookup into all base classes of the given class.
| R | captures both the lookup criteria and any lookup results found. |
| Class | The context in which qualified name lookup will search. Name lookup will search in all base classes merging the results. |
Definition at line 2185 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), Context, E, clang::LookupResult::empty(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getRecordType(), I, LookupQualifiedName(), clang::CXXRecordDecl::MergeAccess(), clang::LookupResult::resolveKind(), clang::Result, and clang::LookupResult::setNamingClass().
Referenced by LookupParsedName(), and LookupQualifiedName().
| Sema::LiteralOperatorLookupResult Sema::LookupLiteralOperator | ( | Scope * | S, |
| LookupResult & | R, | ||
| ArrayRef< QualType > | ArgTys, | ||
| bool | AllowRaw, | ||
| bool | AllowTemplate, | ||
| bool | AllowStringTemplate | ||
| ) |
LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext].
Normal overload resolution is not used to select which literal operator to call for a user-defined literal. Look up the provided literal operator name, and filter the results to the appropriate set for the given argument types.
Definition at line 3032 of file SemaLookup.cpp.
References clang::LookupResult::Ambiguous, clang::LookupResult::begin(), Context, Diag(), E, clang::LookupResult::end(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getResultKind(), clang::ASTContext::hasSameUnqualifiedType(), I, clang::Decl::isInvalidDecl(), LOLR_Cooked, LOLR_Error, LOLR_Raw, LOLR_StringTemplate, LOLR_Template, LookupName(), clang::LookupResult::makeFilter(), NoteOverloadCandidate(), and clang::TemplateParameterList::size().
Referenced by BuildCookedLiteralOperatorCall().
| ObjCMethodDecl * Sema::LookupMethodInObjectType | ( | Selector | Sel, |
| QualType | Ty, | ||
| bool | IsInstance | ||
| ) |
LookupMethodInType - Look up a method in an ObjCObjectType.
Definition at line 1717 of file SemaExprObjC.cpp.
References clang::Type::castAs(), clang::ObjCObjectType::getInterface(), I, and clang::ObjCObjectType::quals().
Referenced by CheckKeyForObjCARCConversion(), hasIsEqualMethod(), HelperIsMethodInObjCType(), and LookupMethodInReceiverType().
| ObjCMethodDecl * Sema::LookupMethodInQualifiedType | ( | Selector | Sel, |
| const ObjCObjectPointerType * | OPT, | ||
| bool | Instance | ||
| ) |
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.
Definition at line 1741 of file SemaExprObjC.cpp.
References clang::ObjCObjectPointerType::quals().
Referenced by BuildInstanceMessage(), HandleExprPropertyRefExpr(), and hasIsEqualMethod().
| CXXMethodDecl * Sema::LookupMovingAssignment | ( | CXXRecordDecl * | Class, |
| unsigned | Quals, | ||
| bool | RValueThis, | ||
| unsigned | ThisQuals | ||
| ) |
Look up the moving assignment operator for the given class.
Definition at line 2998 of file SemaLookup.cpp.
References clang::Qualifiers::Const, CXXMoveAssignment, clang::Sema::SpecialMemberOverloadResult::getMethod(), LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
Referenced by ComputeDefaultedMoveAssignmentExceptionSpec().
| CXXConstructorDecl * Sema::LookupMovingConstructor | ( | CXXRecordDecl * | Class, |
| unsigned | Quals | ||
| ) |
Look up the moving constructor for the given class.
Definition at line 2954 of file SemaLookup.cpp.
References clang::Qualifiers::Const, CXXMoveConstructor, clang::Sema::SpecialMemberOverloadResult::getMethod(), LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
Referenced by ComputeDefaultedMoveCtorExceptionSpec().
| bool Sema::LookupName | ( | LookupResult & | R, |
| Scope * | S, | ||
| bool | AllowBuiltinCreation = false |
||
| ) |
Perform unqualified name lookup starting from a given scope.
Unqualified name lookup (C++ [basic.lookup.unqual], C99 6.2.1) is used to find names within the current scope. For example, 'x' in
Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.
| S | The scope from which unqualified name lookup will begin. If the lookup criteria permits, name lookup may also search in the parent scopes. | |
| [in,out] | R | Specifies the lookup to perform (e.g., the name to look up and the lookup kind), and is updated with the results of lookup including zero or more declarations and possibly additional information used to diagnose ambiguities. |
true if lookup succeeded and false otherwise. Definition at line 1617 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), clang::frontend::CPlusPlus, clang::Scope::DeclScope, clang::DeclContext::Equals(), clang::LookupResult::getAcceptableDecl(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), I, clang::Scope::isDeclScope(), isNamespaceOrTranslationUnitScope(), clang::DeclContext::isTransparentContext(), LookupBuiltin(), LookupRedeclarationWithLinkage, clang::LookupResult::resolveKind(), and clang::LookupResult::setShadowed().
Referenced by ActOnAliasDeclaration(), ActOnFriendFunctionDecl(), ActOnMethodDeclaration(), ActOnNamespaceAliasDef(), ActOnObjCBoolLiteral(), ActOnPragmaDump(), ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), buildMemcpyForAssignmentOp(), BuildUsingDeclaration(), CheckAnonMemberRedeclaration(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), DiagnoseInvalidRedeclaration(), emitReplacement(), FindFirstQualifierInScope(), getObjCMessageKind(), HandleMSProperty(), isKnownName(), isNonTypeNestedNameSpecifier(), LookupLiteralOperator(), LookupOverloadedOperatorName(), LookupParsedName(), LookupPredefedObjCSuperType(), LookupSingleName(), and warnAboutAmbiguousFunction().
| LabelDecl * Sema::LookupOrCreateLabel | ( | IdentifierInfo * | II, |
| SourceLocation | Loc, | ||
| SourceLocation | GnuLabelLoc = SourceLocation() |
||
| ) |
LookupOrCreateLabel - Do a name lookup of a label with the specified name.
If GnuLabelLoc is a valid source location, then this is a definition of an label label name, otherwise it is a normal label definition or use.
Definition at line 3642 of file SemaLookup.cpp.
References Context, clang::LabelDecl::Create(), CurContext, clang::Decl::getDeclContext(), clang::Scope::getFnParent(), clang::SourceLocation::isValid(), LookupLabel, LookupSingleName(), NotForRedeclaration, and PushOnScopeChains().
| void Sema::LookupOverloadedOperatorName | ( | OverloadedOperatorKind | Op, |
| Scope * | S, | ||
| QualType | T1, | ||
| QualType | T2, | ||
| UnresolvedSetImpl & | Functions | ||
| ) |
Definition at line 2713 of file SemaLookup.cpp.
References clang::UnresolvedSetImpl::append(), clang::LookupResult::begin(), Context, clang::ASTContext::DeclarationNames, clang::LookupResult::end(), clang::DeclarationNameTable::getCXXOperatorName(), clang::LookupResult::isAmbiguous(), LookupName(), and LookupOperatorName.
Referenced by buildOperatorCoawaitCall(), and BuildOverloadedBinOp().
| bool Sema::LookupParsedName | ( | LookupResult & | R, |
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| bool | AllowBuiltinCreation = false, |
||
| bool | EnteringContext = false |
||
| ) |
Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.
This routine is a convenience routine meant to be called from contexts that receive a name and an optional C++ scope specifier (e.g., "N::M::x"). It will then perform either qualified or unqualified name lookup (with LookupQualifiedName or LookupName, respectively) on the given name and return those results. It will perform a special type of lookup for "__super::" scope specifier.
| S | The scope from which unqualified name lookup will begin. |
| SS | An optional C++ scope-specifier, e.g., "::N::M". |
| EnteringContext | Indicates whether we are going to enter the context of the scope-specifier SS (if present). |
Definition at line 2141 of file SemaLookup.cpp.
References computeDeclContext(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), LookupInSuper(), LookupName(), LookupQualifiedName(), RequireCompleteDeclContext(), clang::LookupResult::setContextRange(), clang::LookupResult::setNotFoundInCurrentInstantiation(), and clang::NestedNameSpecifier::Super.
Referenced by ActOnNamespaceAliasDef(), ActOnOpenMPIdExpression(), ActOnPragmaUnused(), ActOnUsingDirective(), BuildMemInitializer(), CheckMicrosoftIfExistsSymbol(), isTagTypeWithMissingTag(), and LookupPotentialTypoResult().
| ObjCProtocolDecl * Sema::LookupProtocol | ( | IdentifierInfo * | II, |
| SourceLocation | IdLoc, | ||
| RedeclarationKind | Redecl = NotForRedeclaration |
||
| ) |
Find the protocol with the given name, if any.
Definition at line 2705 of file SemaLookup.cpp.
References LookupObjCProtocolName, LookupSingleName(), and TUScope.
Referenced by ActOnForwardProtocolDeclaration(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnStartProtocolInterface(), CheckForwardProtocolDeclarationForCircularDependency(), CreatePropertyDecl(), FindProtocolDeclaration(), and ParseObjCProtocolExpression().
| bool Sema::LookupQualifiedName | ( | LookupResult & | R, |
| DeclContext * | LookupCtx, | ||
| bool | InUnqualifiedLookup = false |
||
| ) |
Perform qualified name lookup into a given context.
Qualified name lookup (C++ [basic.lookup.qual]) is used to find names when the context of those names is explicit specified, e.g., "std::vector" or "x->member", or as part of unqualified name lookup.
Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.
| R | captures both the lookup criteria and any lookup results found. |
| LookupCtx | The context in which qualified name lookup will search. If the lookup criteria permits, name lookup may also search in the parent contexts or (for C++ classes) base classes. |
| InUnqualifiedLookup | true if this is qualified name lookup that occurs as part of unqualified name lookup. |
Definition at line 1899 of file SemaLookup.cpp.
References bool, Context, clang::CXXRecordDecl::FindNestedNameSpecifierMember(), clang::CXXRecordDecl::FindOrdinaryMember(), clang::CXXRecordDecl::FindTagMember(), clang::CXXRecordDecl::getDefinition(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), LookupAnyMember(), LookupDirect(), clang::CXXRecordDecl::lookupInBases(), LookupQualifiedNameInUsingDirectives(), clang::Name, clang::LookupResult::resolveKind(), clang::LookupResult::setNamingClass(), clang::LookupResult::setNotFoundInCurrentInstantiation(), clang::CXXBasePaths::setOrigin(), and clang::DeclContext::setUseQualifiedLookup().
Referenced by ActOnFriendFunctionDecl(), ActOnStartNamespaceDef(), AddMemberOperatorCandidates(), BuildCallToObjectOfClassType(), BuildCXXNestedNameSpecifier(), BuildNonArrayForRange(), BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), BuildUsingDeclaration(), BuildVariableInstantiation(), CheckUsingDeclQualifier(), CXXRecordMembersNamed(), DiagnoseInvalidRedeclaration(), DiagnoseTwoPhaseLookup(), doesUsualArrayDeleteWantSize(), emitReplacement(), FindAllocationFunctions(), FindAllocationOverload(), FindDeallocationFunction(), FindUsualDeallocationFunction(), HasNoThrowOperator(), isNonTypeNestedNameSpecifier(), LookupInSuper(), LookupMemberExprInRecord(), LookupParsedName(), LookupPotentialTypoResult(), lookupPromiseType(), LookupQualifiedName(), LookupStdInitializerList(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool Sema::LookupQualifiedName | ( | LookupResult & | R, |
| DeclContext * | LookupCtx, | ||
| CXXScopeSpec & | SS | ||
| ) |
Performs qualified name lookup or special type of lookup for "__super::" scope specifier.
This routine is a convenience overload meant to be called from contexts that need to perform a qualified name lookup with an optional C++ scope specifier that might require special kind of lookup.
| R | captures both the lookup criteria and any lookup results found. |
| LookupCtx | The context in which qualified name lookup will search. |
| SS | An optional C++ scope-specifier. |
Definition at line 2112 of file SemaLookup.cpp.
References clang::CXXScopeSpec::getScopeRep(), LookupInSuper(), LookupQualifiedName(), and clang::NestedNameSpecifier::Super.
| NamedDecl * Sema::LookupSingleName | ( | Scope * | S, |
| DeclarationName | Name, | ||
| SourceLocation | Loc, | ||
| LookupNameKind | NameKind, | ||
| RedeclarationKind | Redecl = NotForRedeclaration |
||
| ) |
Look up a name, looking for a single declaration.
Return null if the results were absent, ambiguous, or overloaded.
It is preferable to use the elaborated form and explicitly handle ambiguity and overloaded.
Definition at line 2695 of file SemaLookup.cpp.
References clang::LookupResult::getAsSingle(), and LookupName().
Referenced by ActOnAtEnd(), ActOnCompatibilityAlias(), ActOnEndOfTranslationUnit(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnPragmaRedefineExtname(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnSuperClassOfClassInterface(), ActOnTypedefedProtocols(), createFriendTagNNSFixIt(), DiagnoseDirectIsaAccess(), LookupObjCInterfaceDeclForLiteral(), LookupOrCreateLabel(), LookupProtocol(), maybeDiagnoseTemplateParameterShadow(), and shouldSkipAnonEnumBody().
| Sema::SpecialMemberOverloadResult * Sema::LookupSpecialMember | ( | CXXRecordDecl * | D, |
| CXXSpecialMember | SM, | ||
| bool | ConstArg, | ||
| bool | VolatileArg, | ||
| bool | RValueThis, | ||
| bool | ConstThis, | ||
| bool | VolatileThis | ||
| ) |
Definition at line 2730 of file SemaLookup.cpp.
References clang::QualType::addConst(), AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::QualType::addVolatile(), clang::Sema::SpecialMemberOverloadResult::Ambiguous, clang::AS_public, BumpAlloc, CanDeclareSpecialMemberFunction(), clang::Expr::Classify(), Context, clang::OverloadCandidateSet::CSK_Normal, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXMoveAssignment, CXXMoveConstructor, clang::ASTContext::DeclarationNames, DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::getDestructor(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getTagDeclType(), clang::FunctionDecl::isDeleted(), clang::DeclContext::lookup(), clang::DeclAccessPair::make(), clang::Name, clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::Sema::SpecialMemberOverloadResult::NoMemberOrDeleted, clang::NumArgs, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::Result, clang::Sema::SpecialMemberOverloadResult::setKind(), clang::Sema::SpecialMemberOverloadResult::setMethod(), SpecialMemberCache, clang::Sema::SpecialMemberOverloadResult::Success, clang::VK_LValue, and clang::VK_RValue.
Referenced by checkMoveAssignmentForRepeatedMove(), inferCUDATargetForImplicitSpecialMember(), lookupCallFromSpecialMember(), LookupCopyingAssignment(), LookupCopyingConstructor(), LookupDefaultConstructor(), LookupDestructor(), LookupMovingAssignment(), and LookupMovingConstructor().
| void Sema::LookupTemplateName | ( | LookupResult & | R, |
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| QualType | ObjectType, | ||
| bool | EnteringContext, | ||
| bool & | MemberOfUnknownSpecialization | ||
| ) |
Definition at line 248 of file SemaTemplate.cpp.
References clang::LookupResult::addDecl(), clang::Type::castAs(), clang::LookupResult::clear(), Diag(), clang::LookupResult::empty(), clang::DeclarationName::getAsString(), clang::Decl::getCanonicalDecl(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::getRepresentativeDecl(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::QualType::isNull(), clang::Type::isObjCObjectOrInterfaceType(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isSuppressingDiagnostics(), clang::Name, S, and clang::LookupResult::setLookupName().
Referenced by LookupMemberExprInRecord().
| void Sema::LookupVisibleDecls | ( | Scope * | S, |
| LookupNameKind | Kind, | ||
| VisibleDeclConsumer & | Consumer, | ||
| bool | IncludeGlobalScope = true |
||
| ) |
Definition at line 3599 of file SemaLookup.cpp.
References Context, clang::frontend::CPlusPlus, getLangOpts(), clang::Scope::getParent(), clang::ASTContext::getTranslationUnitDecl(), clang::VisibleDeclConsumer::includeHiddenDecls(), isNamespaceOrTranslationUnitScope(), clang::Result, S, and clang::LookupResult::setAllowHidden().
Referenced by LookupVisibleDecls().
| void Sema::LookupVisibleDecls | ( | DeclContext * | Ctx, |
| LookupNameKind | Kind, | ||
| VisibleDeclConsumer & | Consumer, | ||
| bool | IncludeGlobalScope = true |
||
| ) |
Definition at line 3625 of file SemaLookup.cpp.
References Context, clang::ASTContext::getTranslationUnitDecl(), clang::VisibleDeclConsumer::includeHiddenDecls(), LookupVisibleDecls(), clang::Result, and clang::LookupResult::setAllowHidden().
|
inline |
Definition at line 3255 of file Sema.h.
References ActOnFinishFullExpr(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Expr::getExprLoc().
Referenced by buildSingleCopyAssignRecursively().
|
inline |
Definition at line 3249 of file Sema.h.
References clang::Expr::getExprLoc().
Referenced by buildSingleCopyAssignRecursively().
|
inline |
Definition at line 3252 of file Sema.h.
References ActOnFinishFullExpr().
| void Sema::makeMergedDefinitionVisible | ( | NamedDecl * | ND, |
| SourceLocation | Loc | ||
| ) |
Make a merged definition of an existing hidden definition ND visible at the specified location.
Definition at line 1377 of file SemaLookup.cpp.
References Context, clang::ASTContext::mergeDefinitionIntoModule(), and clang::NamedDecl::setHidden().
| bool Sema::makeUnavailableInSystemHeader | ( | SourceLocation | loc, |
| UnavailableAttr::ImplicitReason | reason | ||
| ) |
makeUnavailableInSystemHeader - There is an error in the current context.
If we're still in a system header, and we can plausibly make the relevant declaration unavailable instead of erroring, do so and return true.
Definition at line 297 of file Sema.cpp.
References ActiveTemplateInstantiations, clang::Decl::addAttr(), Context, CurContext, clang::ASTContext::getSourceManager(), clang::Decl::hasAttr(), and clang::SourceManager::isInSystemHeader().
Referenced by diagnoseObjCARCConversion().
| void Sema::MarkAnyDeclReferenced | ( | SourceLocation | Loc, |
| Decl * | D, | ||
| bool | OdrUse | ||
| ) |
Perform marking for a reference to an arbitrary declaration.
It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building a normal expression which refers to a variable.
Definition at line 13679 of file SemaExpr.cpp.
References MarkFunctionReferenced(), MarkVariableReferenced(), and clang::Decl::setReferenced().
Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), CheckTemplateArgumentAddressOfObjectOrFunction(), and MarkExprReferenced().
| void Sema::MarkAsLateParsedTemplate | ( | FunctionDecl * | FD, |
| Decl * | FnD, | ||
| CachedTokens & | Toks | ||
| ) |
Definition at line 8437 of file SemaTemplate.cpp.
References clang::LateParsedTemplate::D, clang::FunctionDecl::setLateTemplateParsed(), and clang::LateParsedTemplate::Toks.
| void Sema::MarkBaseAndMemberDestructorsReferenced | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Record | ||
| ) |
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced.
Definition at line 4301 of file SemaDeclCXX.cpp.
References AR_accessible, clang::CXXRecordDecl::bases(), clang::Type::castAs(), CheckDerivedToBaseConversion(), CheckDestructorAccess(), Context, DiagnoseUseOfDecl(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::DeclContext::isDependentContext(), isIncompleteOrZeroLengthArrayType(), clang::Decl::isInvalidDecl(), clang::TagDecl::isUnion(), LookupDestructor(), MarkFunctionReferenced(), PDiag(), and clang::CXXRecordDecl::vbases().
Referenced by DefineImplicitDestructor(), and SetCtorInitializers().
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".
| SkipLocalVariables | If true, don't mark local variables as 'referenced'. |
Definition at line 13815 of file SemaExpr.cpp.
Referenced by ActOnOpenMPRegionEnd(), and PopExpressionEvaluationContext().
| void Sema::MarkDeclarationsReferencedInType | ( | SourceLocation | Loc, |
| QualType | T | ||
| ) |
Definition at line 13731 of file SemaExpr.cpp.
References Context, and clang::ASTContext::getCanonicalType().
Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().
| void Sema::MarkDeclRefReferenced | ( | DeclRefExpr * | E | ) |
Perform reference-marking and odr-use handling for a DeclRefExpr.
Definition at line 13645 of file SemaExpr.cpp.
References E, clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), and MarkExprReferenced().
Referenced by ActOnPropertyImplDecl(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), CheckConditionVariable(), CreateFunctionRefExpr(), and FixOverloadedFunctionReference().
|
inline |
Definition at line 6461 of file Sema.h.
References Context.
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().
|
static |
Marks all of the template parameters that will be deduced by a call to the given function template.
Definition at line 5049 of file SemaTemplateDeduction.cpp.
References clang::TemplateParameterList::getDepth(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), I, MarkUsedTemplateParameters(), and clang::TemplateParameterList::size().
| void Sema::MarkFunctionReferenced | ( | SourceLocation | Loc, |
| FunctionDecl * | Func, | ||
| bool | OdrUse = true |
||
| ) |
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
Definition at line 12583 of file SemaExpr.cpp.
References ActiveTemplateInstantiations, Consumer, Context, CurContext, DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), clang::Type::getAs(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::ValueDecl::getType(), clang::ASTConsumer::HandleCXXImplicitFunctionInstantiation(), clang::Decl::hasAttr(), InstantiateFunctionDefinition(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isImplicitlyInstantiable(), clang::FunctionDecl::isInlined(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), IsPotentiallyEvaluatedContext(), clang::isUnresolvedExceptionSpec(), clang::Decl::isUsed(), clang::CXXMethodDecl::isUserProvided(), LangOpts, MarkVTableUsed(), PendingInstantiations, PendingLocalImplicitInstantiations, clang::Redeclarable< decl_type >::redecls(), ResolveExceptionSpec(), clang::Decl::setReferenced(), clang::TSK_ImplicitInstantiation, and UndefinedButUsed.
Referenced by ActOnCUDAExecConfigExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), BuildCXXConstructExpr(), BuildCXXNew(), CheckDestructor(), DefineImplicitLambdaToFunctionPointerConversion(), FinalizeVarWithDestructor(), FindConditionalOverload(), MarkAnyDeclReferenced(), MarkBaseAndMemberDestructorsReferenced(), MarkVirtualMembersReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), ReferenceDllExportedMethods(), SetDelegatingInitializer(), and SetIvarInitializers().
| void Sema::MarkMemberReferenced | ( | MemberExpr * | E | ) |
Perform reference-marking and odr-use handling for a MemberExpr.
Definition at line 13657 of file SemaExpr.cpp.
References E, getLangOpts(), clang::MemberExpr::getLocStart(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::SourceLocation::isValid(), MarkExprReferenced(), and clang::MemberExpr::performsVirtualDispatch().
Referenced by BuildCXXMemberCallExpr(), BuildMemberExpr(), and FixOverloadedFunctionReference().
| void Sema::MarkUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) |
If it's a file scoped decl that must warn if not used, keep track of it.
Definition at line 1429 of file SemaDecl.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
| void Sema::MarkUsedTemplateParameters | ( | const TemplateArgumentList & | TemplateArgs, |
| bool | OnlyDeduced, | ||
| unsigned | Depth, | ||
| llvm::SmallBitVector & | Used | ||
| ) |
Mark which template parameters can be deduced from a given template argument list.
| TemplateArgs | the template argument list from which template parameters will be deduced. |
| Used | a bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced. |
Definition at line 5031 of file SemaTemplateDeduction.cpp.
References Context, clang::TemplateArgumentList::data(), hasPackExpansionBeforeEnd(), I, and clang::TemplateArgumentList::size().
Referenced by MarkDeducedTemplateParameters().
| void Sema::MarkVariableReferenced | ( | SourceLocation | Loc, |
| VarDecl * | Var | ||
| ) |
Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3).
Note that this should not be used directly for normal expressions referring to VarDecl.
Definition at line 13608 of file SemaExpr.cpp.
References DoMarkVarDeclReferenced().
Referenced by MarkAnyDeclReferenced().
| void Sema::MarkVirtualMemberExceptionSpecsNeeded | ( | SourceLocation | Loc, |
| const CXXRecordDecl * | RD | ||
| ) |
Mark the exception specifications of all virtual member functions in the given class as needed.
Definition at line 13353 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::methods(), and ResolveExceptionSpec().
Referenced by DefineUsedVTables().
| void Sema::MarkVirtualMembersReferenced | ( | SourceLocation | Loc, |
| const CXXRecordDecl * | RD | ||
| ) |
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
Definition at line 13360 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), E, clang::CXXRecordDecl::getFinalOverriders(), clang::CXXRecordDecl::getNumVBases(), I, and MarkFunctionReferenced().
Referenced by DefineUsedVTables(), and MarkVTableUsed().
| void Sema::MarkVTableUsed | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Class, | ||
| bool | DefinitionRequired = false |
||
| ) |
Note that the vtable for the given class was used at the given location.
Definition at line 13215 of file SemaDeclCXX.cpp.
References CheckDestructor(), CurContext, clang::CXXRecordDecl::getCanonicalDecl(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getDestructor(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::hasUserDeclaredDestructor(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), clang::DeclContext::isDependentContext(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXRecordDecl::isLocalClass(), clang::TargetCXXABI::isMicrosoft(), isUnevaluatedContext(), LoadExternalVTableUses(), MarkVirtualMembersReferenced(), VTablesUsed, and VTableUses.
Referenced by DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), InstantiateClass(), InstantiateClassMembers(), and MarkFunctionReferenced().
| void Sema::MatchAllMethodDeclarations | ( | const SelectorSet & | InsMap, |
| const SelectorSet & | ClsMap, | ||
| SelectorSet & | InsMapSeen, | ||
| SelectorSet & | ClsMapSeen, | ||
| ObjCImplDecl * | IMPDecl, | ||
| ObjCContainerDecl * | IDecl, | ||
| bool & | IncompleteImpl, | ||
| bool | ImmediateClass, | ||
| bool | WarnCategoryMethodImpl = false |
||
| ) |
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations.
MatchAllMethodDeclarations - Check methods declared in interface or protocol against those declared in their implementations.
Definition at line 2696 of file SemaDeclObjC.cpp.
References clang::ObjCContainerDecl::class_methods(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), I, clang::ObjCContainerDecl::instance_methods(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), and WarnUndefinedMethod().
Referenced by CheckCategoryVsClassMethodMatches(), and ImplMethodsVsClassMethods().
| TemplateParameterList * Sema::MatchTemplateParametersToScopeSpecifier | ( | SourceLocation | DeclStartLoc, |
| SourceLocation | DeclLoc, | ||
| const CXXScopeSpec & | SS, | ||
| TemplateIdAnnotation * | TemplateId, | ||
| ArrayRef< TemplateParameterList * > | ParamLists, | ||
| bool | IsFriend, | ||
| bool & | IsExplicitSpecialization, | ||
| bool & | Invalid | ||
| ) |
Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name.
| DeclStartLoc | the start of the declaration that has a scope specifier or a template parameter list. |
| DeclLoc | The location of the declaration itself. |
| SS | the scope specifier that will be matched to the given template parameter lists. This scope specifier precedes a qualified name that is being declared. |
| TemplateId | The template-id following the scope specifier, if there is one. Used to check for a missing 'template<>'. |
| ParamLists | the template parameter lists, from the outermost to the innermost template parameter lists. |
| IsFriend | Whether to apply the slightly different rules for matching template parameters to scope specifiers in friend declarations. |
| IsExplicitSpecialization | will be set true if the entity being declared is an explicit specialization, false otherwise. |
SS. This template parameter list may have template parameters (if we're declaring a template) or may have no template parameters (if we're declaring a template specialization), or may be NULL (if what we're declaring isn't itself a template). Definition at line 1642 of file SemaTemplate.cpp.
References Context, clang::TemplateParameterList::Create(), clang::FixItHint::CreateInsertion(), clang::DependentTemplateSpecializationType(), DependsOnTemplateParameters(), Diag(), E, clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::DeclContext::getParent(), getRangeOfTypeInNestedNameSpecifier(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), I, clang::Type::isDependentType(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, clang::None, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateSpecializationType(), and clang::TSK_ExplicitSpecialization.
Referenced by ActOnTemplatedFriendTag().
| bool Sema::MatchTwoMethodDeclarations | ( | const ObjCMethodDecl * | left, |
| const ObjCMethodDecl * | right, | ||
| MethodMatchStrategy | strategy = MMS_strict |
||
| ) |
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly.
MatchTwoMethodDeclarations - Checks that two methods have matching type and returns true, or false, accordingly.
TODO: Handle protocol list; such as id<p1,p2> in type comparisons
Definition at line 3114 of file SemaDeclObjC.cpp.
References Context, getLangOpts(), clang::ObjCMethodDecl::getReturnType(), clang::Decl::hasAttr(), clang::NamedDecl::isHidden(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by ActOnAtEnd(), addMethodToGlobalList(), DiagnoseClassExtensionDupMethods(), DiagnoseMultipleMethodInGlobalPool(), and HelperToDiagnoseMismatchedMethodsInGlobalPool().
| ExprResult Sema::MaybeBindToTemporary | ( | Expr * | E | ) |
MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr.
Otherwise it simply returns the passed in expression.
Definition at line 5310 of file SemaExprCXX.cpp.
References Bind, clang::ASTContext::BoundMemberTy, CheckDestructorAccess(), clang::CK_ARCConsumeObject, clang::CK_ARCReclaimReturnedObject, Context, clang::CXXTemporary::Create(), clang::CXXBindTemporaryExpr::Create(), clang::ImplicitCastExpr::Create(), DiagnoseUseOfDecl(), E, clang::ExprError(), ExprEvalContexts, ExprNeedsCleanups, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::RecordType::getDecl(), getElementType(), clang::Expr::getExprLoc(), clang::FunctionType::getExtInfo(), getLangOpts(), clang::ObjCMethodDecl::getMethodFamily(), clang::Type::getPointeeType(), clang::FunctionType::ExtInfo::getProducesResult(), clang::Expr::getType(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::Expr::IgnoreParens(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCRetainableType(), clang::Expr::isRValue(), clang::FunctionDecl::isTrivial(), LookupDestructor(), MarkFunctionReferenced(), clang::OMF_performSelector, PDiag(), and clang::VK_RValue.
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXCastArgument(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), CopyObject(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().
| ExprResult Sema::MaybeConvertParenListExprToParenExpr | ( | Scope * | S, |
| Expr * | OrigExpr | ||
| ) |
This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators.
Definition at line 5967 of file SemaExpr.cpp.
References E, clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getLParenLoc(), clang::ParenListExpr::getNumExprs(), clang::ParenListExpr::getRParenLoc(), and clang::Result.
Referenced by ActOnInstanceMessage(), and ActOnStartCXXMemberReference().
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node.
Otherwise, just returns the passed-in expression.
Definition at line 5466 of file SemaExprCXX.cpp.
References CleanupVarDeclMarking(), Context, clang::ExprWithCleanups::Create(), DiscardCleanupsInEvaluationContext(), E, ExprCleanupObjects, ExprEvalContexts, and ExprNeedsCleanups.
Referenced by ActOnFinishFullExpr(), ActOnPropertyImplDecl(), BuildExceptionDeclaration(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), captureInBlock(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), SetIvarInitializers(), and SetParamDefaultArgument().
| ExprResult Sema::MaybeCreateExprWithCleanups | ( | ExprResult | SubExpr | ) |
Definition at line 5459 of file SemaExprCXX.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and MaybeCreateExprWithCleanups().
Definition at line 5486 of file SemaExprCXX.cpp.
References CleanupVarDeclMarking(), Context, ExprNeedsCleanups, MaybeCreateExprWithCleanups(), and clang::ASTContext::VoidTy.
Referenced by ActOnFinishFullStmt().
| void Sema::maybeExtendBlockObject | ( | ExprResult & | E | ) |
Do an explicit extend of the given block pointer if we're in ARC.
Definition at line 5467 of file SemaExpr.cpp.
References clang::CK_ARCExtendBlockObject, Context, clang::ImplicitCastExpr::Create(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isBlockPointerType(), clang::Expr::isRValue(), and clang::VK_RValue.
Referenced by CheckMessageArgumentTypes().
| void Sema::MaybeSuggestAddingStaticToDecl | ( | const FunctionDecl * | D | ) |
Definition at line 301 of file SemaExpr.cpp.
References clang::FixItHint::CreateInsertion(), Diag(), clang::SourceRange::getBegin(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::FunctionDecl::getSourceRange(), and hasAnyExplicitStorageClass().
Referenced by diagnoseUseOfInternalDeclInInlineFunction().
| AlwaysInlineAttr * Sema::mergeAlwaysInlineAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| IdentifierInfo * | Ident, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 3498 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), and clang::Decl::hasAttr().
Referenced by handleAlwaysInlineAttr(), and mergeDeclAttribute().
| AvailabilityAttr * Sema::mergeAvailabilityAttr | ( | NamedDecl * | D, |
| SourceRange | Range, | ||
| IdentifierInfo * | Platform, | ||
| VersionTuple | Introduced, | ||
| VersionTuple | Deprecated, | ||
| VersionTuple | Obsoleted, | ||
| bool | IsUnavailable, | ||
| StringRef | Message, | ||
| AvailabilityMergeKind | AMK, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Attribute merging methods. Return true if a new attribute was added.
Definition at line 1911 of file SemaDeclAttr.cpp.
References AMK_None, AMK_Override, AMK_ProtocolImplementation, AMK_Redeclaration, checkAvailabilityAttr(), Context, Diag(), clang::VersionTuple::empty(), clang::VersionTuple::getAsString(), clang::Decl::getAttrs(), clang::SourceRange::getBegin(), clang::IdentifierInfo::getName(), clang::Decl::hasAttrs(), clang::SourceRange::isInvalid(), clang::SourceRange::isValid(), and versionsMatch().
Referenced by handleAvailabilityAttr(), and mergeDeclAttribute().
| CommonAttr * Sema::mergeCommonAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| IdentifierInfo * | Ident, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 3514 of file SemaDeclAttr.cpp.
References Context.
Referenced by handleCommonAttr(), and mergeDeclAttribute().
| bool Sema::MergeCompatibleFunctionDecls | ( | FunctionDecl * | New, |
| FunctionDecl * | Old, | ||
| Scope * | S, | ||
| bool | MergeTypeWithOld | ||
| ) |
Completes the merge of two function declarations that are known to be compatible.
This routine handles the merging of attributes and other properties of function declarations from the old declaration to the new declaration, once we know that New is in fact a redeclaration of Old.
Definition at line 3188 of file SemaDecl.cpp.
References Context, clang::frontend::CPlusPlus, clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::FunctionDecl::isPure(), clang::Decl::isUsed(), mergeParamDeclAttributes(), mergeParamDeclTypes(), clang::ASTContext::mergeTypes(), clang::Decl::setIsUsed(), clang::FunctionDecl::setPure(), and clang::ValueDecl::setType().
| bool Sema::MergeCXXFunctionDecl | ( | FunctionDecl * | New, |
| FunctionDecl * | Old, | ||
| Scope * | S | ||
| ) |
MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that they have the same type.
Subroutine of MergeFunctionDecl. Returns true if there was an error, false otherwise.
Definition at line 435 of file SemaDeclCXX.cpp.
References CheckEquivalentExceptionSpec(), Diag(), clang::Decl::FOK_Undeclared, functionDeclHasDefaultArgument(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArgRange(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getFriendObjectKind(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), getSpecialMember(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::FunctionDecl::isConstexpr(), clang::NamedDecl::isCXXClassMember(), isDeclInScope(), clang::FunctionDecl::isDefined(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isInlined(), clang::Decl::isLocalExternDecl(), clang::LookupResult::isVisible(), p, clang::ParmVarDecl::setDefaultArg(), clang::ParmVarDecl::setHasInheritedDefaultArg(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::ParmVarDecl::setUnparsedDefaultArg(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
| void Sema::mergeDeclAttributes | ( | NamedDecl * | New, |
| Decl * | Old, | ||
| AvailabilityMergeKind | AMK = AMK_Redeclaration |
||
| ) |
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
Definition at line 2370 of file SemaDecl.cpp.
References clang::Decl::addAttr(), checkNewAttributesAfterDef(), Context, Diag(), clang::Decl::dropAttrs(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::Decl::getMostRecentDecl(), clang::Decl::hasAttrs(), I, clang::Decl::isUsed(), mergeAlignedAttrs(), mergeDeclAttribute(), clang::Decl::setAttrs(), and clang::Decl::specific_attrs().
Referenced by ActOnForwardProtocolDeclaration(), and ActOnStartProtocolInterface().
| DLLExportAttr * Sema::mergeDLLExportAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 4650 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::Decl::hasAttr().
Referenced by handleDLLAttr(), and mergeDeclAttribute().
| DLLImportAttr * Sema::mergeDLLImportAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 4637 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::SourceRange::getBegin(), and clang::Decl::hasAttr().
Referenced by handleDLLAttr(), and mergeDeclAttribute().
| FormatAttr * Sema::mergeFormatAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| IdentifierInfo * | Format, | ||
| int | FormatIdx, | ||
| int | FirstArg, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 2791 of file SemaDeclAttr.cpp.
References Context, and clang::Decl::specific_attrs().
Referenced by handleFormatAttr(), and mergeDeclAttribute().
| bool Sema::MergeFunctionDecl | ( | FunctionDecl * | New, |
| NamedDecl *& | OldD, | ||
| Scope * | S, | ||
| bool | MergeTypeWithOld | ||
| ) |
MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'.
Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.
In C++, New and Old must be declarations that are not overloaded. Use IsOverload to determine whether New and Old are overloaded, and to select the Old declaration that New should be merged with.
Returns true if there was an error, false otherwise.
Definition at line 2664 of file SemaDecl.cpp.
References clang::ASTContext::adjustFunctionType(), clang::ASTContext::BuiltinInfo, canRedefineFunction(), clang::Type::castAs(), Context, clang::frontend::CPlusPlus, clang::ParmVarDecl::Create(), clang::ASTContext::DependentTy, Diag(), clang::Decl::dropAttr(), End, clang::Decl::FOK_None, clang::Type::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::ASTContext::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::Type::getContainedAutoType(), clang::NamedDecl::getDeclName(), clang::AutoType::getDeducedType(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionType::getNameForCallConv(), clang::FunctionType::ExtInfo::getNoReturn(), getNoteDiagForInvalidRedeclaration(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getRegParmType(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), hasIdenticalPassObjectSizeAttrs(), clang::FunctionDecl::hasPrototype(), clang::ASTContext::hasSameType(), haveIncompatibleLanguageLinkages(), clang::QualType::isCanonical(), clang::NamedDecl::isCXXClassMember(), clang::AutoType::isDeduced(), clang::FunctionDecl::isDefined(), clang::Type::isDependentType(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::DeclContext::isFunctionOrMethod(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::FunctionDecl::isOutOfLine(), clang::Builtin::Context::isPredefinedLibFunction(), clang::CXXMethodDecl::isStatic(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isTrivial(), clang::Decl::isUsed(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::IdentifierInfo::revertBuiltin(), clang::SC_None, clang::SC_Static, clang::FunctionDecl::setHasInheritedPrototype(), clang::Decl::setImplicit(), clang::ParmVarDecl::setScopeInfo(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), clang::ASTContext::typesAreCompatible(), Warnings, clang::FunctionType::ExtInfo::withCallingConv(), clang::FunctionType::ExtInfo::withNoReturn(), clang::FunctionType::ExtInfo::withProducesResult(), and clang::FunctionType::ExtInfo::withRegParm().
| InternalLinkageAttr * Sema::mergeInternalLinkageAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| IdentifierInfo * | Ident, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 3524 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::ExpectedFunctionVariableOrClass, clang::ExpectedVariableOrFunction, clang::SourceRange::getBegin(), and getLangOpts().
Referenced by handleInternalLinkageAttr(), and mergeDeclAttribute().
| MinSizeAttr * Sema::mergeMinSizeAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 3550 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), and clang::Decl::hasAttr().
Referenced by handleMinSizeAttr(), and mergeDeclAttribute().
| MSInheritanceAttr * Sema::mergeMSInheritanceAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| bool | BestCase, | ||
| unsigned | AttrSpellingListIndex, | ||
| MSInheritanceAttr::Spelling | SemanticSpelling | ||
| ) |
Definition at line 4698 of file SemaDeclAttr.cpp.
References checkMSInheritanceAttrOnDefinition(), Context, Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), clang::CXXRecordDecl::getDescribedClassTemplate(), and clang::CXXRecordDecl::hasDefinition().
Referenced by handleMSInheritanceAttr(), and mergeDeclAttribute().
| void Sema::mergeObjCMethodDecls | ( | ObjCMethodDecl * | New, |
| ObjCMethodDecl * | Old | ||
| ) |
Definition at line 3225 of file SemaDecl.cpp.
References clang::Decl::getDeclContext(), mergeParamDeclAttributes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by CheckObjCMethodOverrides().
| OptimizeNoneAttr * Sema::mergeOptimizeNoneAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 3564 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), and clang::Decl::hasAttr().
Referenced by handleOptimizeNoneAttr(), and mergeDeclAttribute().
| SectionAttr * Sema::mergeSectionAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| StringRef | Name, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 2544 of file SemaDeclAttr.cpp.
References Context, Diag(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), and clang::Name.
Referenced by handleSectionAttr(), and mergeDeclAttribute().
| void Sema::MergeTypedefNameDecl | ( | Scope * | S, |
| TypedefNameDecl * | New, | ||
| LookupResult & | OldDecls | ||
| ) |
MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous declaration 'Old'.
Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate. If there was an error, set New to be invalid.
Definition at line 1881 of file SemaDecl.cpp.
References clang::frontend::C11, Context, clang::frontend::CPlusPlus, Diag(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), clang::Type::getAs(), clang::LookupResult::getAsSingle(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getLength(), clang::Decl::getLocation(), clang::ASTContext::getObjCClassType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCSelType(), clang::LookupResult::getRepresentativeDecl(), clang::ASTContext::getSourceManager(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::Scope::isDeclScope(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::Type::isPointerType(), clang::IdentifierInfo::isStr(), clang::Type::isStructureType(), clang::SourceLocation::isValid(), clang::Type::isVoidPointerType(), clang::Scope::RemoveDecl(), clang::Decl::setInvalidDecl(), clang::TypedefNameDecl::setModedTypeSourceInfo(), clang::ASTContext::setObjCClassRedefinitionType(), clang::ASTContext::setObjCIdRedefinitionType(), clang::ASTContext::setObjCSelRedefinitionType(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TypeDecl::setTypeForDecl(), and clang::TypedefNameDecl::setTypeSourceInfo().
| TypeVisibilityAttr * Sema::mergeTypeVisibilityAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| TypeVisibilityAttr::VisibilityType | Vis, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 2198 of file SemaDeclAttr.cpp.
Referenced by handleVisibilityAttr(), and mergeDeclAttribute().
| void Sema::MergeVarDecl | ( | VarDecl * | New, |
| LookupResult & | Previous | ||
| ) |
MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.
Tentative definition rules (C99 6.9.2p2) are checked by FinalizeDeclaratorGroup. Unfortunately, we can't analyze tentative definitions here, since the initializer hasn't been attached.
Definition at line 3380 of file SemaDecl.cpp.
References clang::frontend::CPlusPlus, clang::VarDecl::Definition, Diag(), clang::Decl::dropAttr(), clang::Decl::getAccess(), clang::VarDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::NamedDecl::getFormalLinkage(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), getNoteDiagForInvalidRedeclaration(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::LookupResult::getRepresentativeDecl(), clang::VarDecl::getStorageClass(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTLSKind(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::NamedDecl::hasLinkage(), haveIncompatibleLanguageLinkages(), clang::InternalLinkage, clang::DeclContext::isDependentContext(), clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDeclOrParm(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::Decl::isUsed(), mergeTypeWithPrevious(), clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Decl::setIsUsed(), clang::Redeclarable< decl_type >::setPreviousDecl(), and clang::VarDecl::TLS_Dynamic.
Referenced by InstantiateVariableDefinition().
Merge the exception specifications of two variable declarations.
This is called when there's a redeclaration of a VarDecl. The function checks if the redeclaration might have an exception specification and validates compatibility and merges the specs if necessary.
Definition at line 672 of file SemaDeclCXX.cpp.
References CheckEquivalentExceptionSpec(), Context, clang::Type::getAs(), getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isFunctionProtoType(), P, and clang::Decl::setInvalidDecl().
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
Figure out how to merge their types, emitting diagnostics as appropriate.
Declarations using the auto type specifier (C++ [decl.spec.auto]) call back to here in AddInitializerToDecl. We can't check them before the initializer is attached.
Definition at line 3255 of file SemaDecl.cpp.
References Context, clang::ASTContext::DependentTy, Diag(), clang::ASTContext::getAsArrayType(), clang::NamedDecl::getDeclName(), clang::ArrayType::getElementType(), clang::Decl::getLocation(), getNoteDiagForInvalidRedeclaration(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::VarDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().
| VisibilityAttr * Sema::mergeVisibilityAttr | ( | Decl * | D, |
| SourceRange | Range, | ||
| VisibilityAttr::VisibilityType | Vis, | ||
| unsigned | AttrSpellingListIndex | ||
| ) |
Definition at line 2191 of file SemaDeclAttr.cpp.
Referenced by handleVisibilityAttr(), and mergeDeclAttribute().
| bool Sema::NeedToCaptureVariable | ( | VarDecl * | Var, |
| SourceLocation | Loc | ||
| ) |
Checks if the variable must be captured.
Definition at line 13384 of file SemaExpr.cpp.
References TryCapture_Implicit, and tryCaptureVariable().
| void Sema::NoteAllFoundTemplates | ( | TemplateName | Name | ) |
Definition at line 1998 of file SemaTemplate.cpp.
References Diag(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), and I.
Referenced by ActOnCXXNestedNameSpecifier().
| void Sema::NoteAllOverloadCandidates | ( | Expr * | E, |
| QualType | DestType = QualType(), |
||
| bool | TakingAddress = false |
||
| ) |
Definition at line 8934 of file SemaOverload.cpp.
References Context, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::find(), clang::Expr::getType(), I, NoteOverloadCandidate(), and clang::ASTContext::OverloadTy.
Referenced by DiagnoseAssignmentResult(), handleCleanupAttr(), ResolveAndFixSingleFunctionTemplateSpecialization(), and ResolveSingleFunctionTemplateSpecialization().
| void Sema::NoteDeletedFunction | ( | FunctionDecl * | FD | ) |
Emit a note explaining that this function is deleted.
Definition at line 201 of file SemaExpr.cpp.
References Diag(), clang::Decl::getLocation(), and clang::FunctionDecl::isDeleted().
Referenced by CheckCXX98CompatAccessibleCopy(), CopyObject(), CreateOverloadedBinOp(), clang::InitializationSequence::Diagnose(), and FindDeallocationFunction().
| void Sema::NoteHiddenVirtualMethods | ( | CXXMethodDecl * | MD, |
| SmallVectorImpl< CXXMethodDecl * > & | OverloadedMethods | ||
| ) |
Definition at line 6392 of file SemaDeclCXX.cpp.
References Diag(), clang::Decl::getLocation(), clang::ValueDecl::getType(), HandleFunctionTypeMismatch(), and PDiag().
Referenced by CheckOverrideControl(), and DiagnoseHiddenVirtualMethods().
| void Sema::NoteOverloadCandidate | ( | FunctionDecl * | Fn, |
| QualType | DestType = QualType(), |
||
| bool | TakingAddress = false |
||
| ) |
Definition at line 8917 of file SemaOverload.cpp.
References checkAddressOfCandidateIsAvailable(), Diag(), clang::Decl::getLocation(), clang::ValueDecl::getType(), HandleFunctionTypeMismatch(), and PDiag().
Referenced by clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), LookupLiteralOperator(), NoteAllOverloadCandidates(), and NoteFunctionCandidate().
| Decl * Sema::ParsedFreeStandingDeclSpec | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| DeclSpec & | DS | ||
| ) |
ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
"struct foo;") is parsed.
Definition at line 3599 of file SemaDecl.cpp.
| Decl * Sema::ParsedFreeStandingDeclSpec | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| DeclSpec & | DS, | ||
| MultiTemplateParamsArg | TemplateParams, | ||
| bool | IsExplicitInstantiation = false |
||
| ) |
ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
"struct foo;") is parsed. It also accepts template parameters to cope with template friend declarations.
Definition at line 3707 of file SemaDecl.cpp.
References Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::ParsedAttributes::empty(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAsStructureType(), clang::Type::getAsUnionType(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getAttributes(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclSpec::getConceptSpecLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), GetDiagnosticTypeSpecifierID(), clang::ParsedAttributes::getList(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::AttributeList::getNext(), clang::ASTContext::getPrintingPolicy(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TagDecl::getTagKind(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecScope(), clang::DeclSpec::getTypeSpecType(), clang::TagDecl::isCompleteDefinition(), clang::DeclSpec::isConceptSpecified(), clang::DeclSpec::isConstexprSpecified(), clang::DeclSpec::isExternInLinkageSpec(), clang::DeclSpec::isFriendSpecified(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isMissingDeclaratorOk(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::TagDecl::isUnion(), clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TagDecl::setFreeStanding(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_volatile, clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_error, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, clang::DeclSpec::TST_typename, and clang::DeclSpec::TST_union.
| ExprResult Sema::ParseObjCEncodeExpression | ( | SourceLocation | AtLoc, |
| SourceLocation | EncodeLoc, | ||
| SourceLocation | LParenLoc, | ||
| ParsedType | Ty, | ||
| SourceLocation | RParenLoc | ||
| ) |
Definition at line 1083 of file SemaExprObjC.cpp.
References BuildObjCEncodeExpression(), Context, getLocForEndOfToken(), clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().
| ExprResult Sema::ParseObjCProtocolExpression | ( | IdentifierInfo * | ProtocolName, |
| SourceLocation | AtLoc, | ||
| SourceLocation | ProtoLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | ProtoIdLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
ParseObjCProtocolExpression - Build protocol expression for @protocol.
Definition at line 1215 of file SemaExprObjC.cpp.
References Context, Diag(), clang::ObjCProtocolDecl::getDefinition(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCProtoType(), clang::ObjCProtocolDecl::hasDefinition(), clang::QualType::isNull(), and LookupProtocol().
| ExprResult Sema::ParseObjCSelectorExpression | ( | Selector | Sel, |
| SourceLocation | AtLoc, | ||
| SourceLocation | SelLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | RParenLoc, | ||
| bool | WarnMultipleSelectors | ||
| ) |
ParseObjCSelectorExpression - Build selector expression for @selector.
Definition at line 1154 of file SemaExprObjC.cpp.
References Context, clang::FixItHint::CreateReplacement(), Diag(), DiagnoseMismatchedSelectors(), clang::Selector::getAsString(), clang::ObjCMethodDecl::getImplementationControl(), getLangOpts(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::Selector::getMethodFamily(), clang::ASTContext::getObjCSelType(), getSourceManager(), clang::SourceManager::isInSystemHeader(), LookupFactoryMethodInGlobalPool(), LookupInstanceMethodInGlobalPool(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::Optional, ReferencedSelectors, and SelectorsForTypoCorrection().
| ExprResult Sema::ParseObjCStringLiteral | ( | SourceLocation * | AtLocs, |
| ArrayRef< Expr * > | Strings | ||
| ) |
Definition at line 34 of file SemaExprObjC.cpp.
References clang::StringLiteral::Ascii, Context, clang::StringLiteral::Create(), Diag(), E, clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getConstantArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeCVRQualifiers(), clang::StringLiteral::getLocStart(), clang::ArrayType::getSizeModifier(), clang::StringLiteral::getString(), clang::Expr::getType(), clang::StringLiteral::isAscii(), S, clang::StringLiteral::tokloc_begin(), and clang::StringLiteral::tokloc_end().
| TypedefDecl * Sema::ParseTypedefDecl | ( | Scope * | S, |
| Declarator & | D, | ||
| QualType | T, | ||
| TypeSourceInfo * | TInfo | ||
| ) |
Subroutines of ActOnDeclarator().
Definition at line 11524 of file SemaDecl.cpp.
References Context, clang::TypedefDecl::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::DeclSpec::getRepAsDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::DeclSpec::getTypeSpecType(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::QualType::isNull(), clang::Decl::setInvalidDecl(), clang::Decl::setModulePrivate(), clang::TST_class, clang::TST_enum, clang::TST_interface, clang::TST_struct, and clang::TST_union.
|
inline |
Build a partial diagnostic.
Definition at line 25 of file SemaInternal.h.
References Context, and clang::ASTContext::getDiagAllocator().
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOpenMPIdExpression(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnSuperClassOfClassInterface(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildMemInitializer(), BuildUsingDeclaration(), CheckCXX98CompatAccessibleCopy(), CheckEquivalentExceptionSpec(), CheckExceptionSpecCompatibility(), CheckExplicitlyDefaultedMemberExceptionSpec(), CheckForNullPointerDereference(), CheckNonNullArgument(), CheckOverridingFunctionExceptionSpec(), CheckParamExceptionSpec(), CheckPlaceholderExpr(), clang::InitializationSequence::Diagnose(), DiagnoseAdditionInShift(), DiagnoseAssignmentResult(), DiagnoseBadConversion(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseBitwisePrecedence(), DiagnoseConditionalPrecedence(), DiagnoseInvalidRedeclaration(), DiagnoseShiftCompare(), diagnoseTypo(), EmitDiagnosticForLogicalAndInLogicalOr(), emitEmptyLookupTypoDiagnostic(), FinalizeVarWithDestructor(), FindProtocolDeclaration(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), LookupMemberExprInRecord(), MarkBaseAndMemberDestructorsReferenced(), MaybeBindToTemporary(), NoteAmbiguousUserConversions(), NoteHiddenVirtualMethods(), NoteOverloadCandidate(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), SetIvarInitializers(), and TryNamespaceTypoCorrection().
| ExprResult Sema::PerformContextualImplicitConversion | ( | SourceLocation | Loc, |
| Expr * | From, | ||
| ContextualImplicitConverter & | Converter | ||
| ) |
Perform a contextual implicit conversion.
Attempt to convert the given expression to a type which is accepted by the given converter.
This routine will attempt to convert an expression of class type to a type accepted by the specified converter. In C++11 and before, the class must have a single non-explicit conversion function converting to a matching type. In C++1y, there can be multiple such conversion functions, but only one target type.
| Loc | The source location of the construct that requires the conversion. |
| From | The expression we're converting from. |
| Converter | Used to control and diagnose the conversion process. |
Definition at line 5454 of file SemaOverload.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::OverloadCandidateSet::BestViableFunction(), CheckPlaceholderExpr(), collectViableConversionCandidates(), clang::frontend::CPlusPlus14, clang::OverloadCandidateSet::CSK_Normal, DefaultLvalueConversion(), diagnoseAmbiguousConversion(), clang::Sema::ContextualImplicitConverter::diagnoseIncomplete(), clang::Sema::ContextualImplicitConverter::diagnoseNoMatch(), diagnoseNoViableConversion(), E, clang::ExprError(), finishContextualImplicitConversion(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::RecordType::getDecl(), getLangOpts(), clang::QualType::getNonReferenceType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), I, isCompleteType(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::DeclAccessPair::make(), clang::Sema::ContextualImplicitConverter::match(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, recordConversion(), RequireCompleteType(), clang::UnresolvedSetImpl::size(), and clang::Sema::ContextualImplicitConverter::Suppress.
Referenced by ActOnCXXDelete(), BuildCXXNew(), PerformOpenMPImplicitIntegerConversion(), and VerifyIntegerConstantExpression().
| ExprResult Sema::PerformContextuallyConvertToBool | ( | Expr * | From | ) |
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3).
Definition at line 5025 of file SemaOverload.cpp.
References AA_Converting, clang::ASTContext::BoolTy, checkPlaceholderForOverload(), Context, Diag(), DiagnoseMultipleUserDefinedConversion(), clang::ExprError(), clang::Expr::getType(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and TryContextuallyConvertToBool().
Referenced by BuildStaticAssertDeclaration(), CheckCXXBooleanCondition(), handleEnableIfAttr(), and instantiateDependentEnableIfAttr().
| ExprResult Sema::PerformContextuallyConvertToObjCPointer | ( | Expr * | From | ) |
PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.
Definition at line 5291 of file SemaOverload.cpp.
References AA_Converting, checkPlaceholderForOverload(), Context, clang::ExprError(), clang::ASTContext::getObjCIdType(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and TryContextuallyConvertToObjCPointer().
Referenced by BuildInstanceMessage().
| ExprResult Sema::PerformCopyInitialization | ( | const InitializedEntity & | Entity, |
| SourceLocation | EqualLoc, | ||
| ExprResult | Init, | ||
| bool | TopLevelOfInitList = false, |
||
| bool | AllowExplicit = false |
||
| ) |
Definition at line 7667 of file SemaInit.cpp.
References clang::InitializationKind::CreateCopy(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Result.
Referenced by ActOnPropertyImplDecl(), BuildCallToObjectOfClassType(), BuildLiteralOperatorCall(), captureInBlock(), checkBuiltinArgument(), CheckEnableIf(), CheckMessageArgumentTypes(), CheckObjCCollectionLiteralElement(), checkUnknownAnyArg(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), and CXXCheckConditionalOperands().
| void Sema::PerformDependentDiagnostics | ( | const DeclContext * | Pattern, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 4717 of file SemaTemplateInstantiateDecl.cpp.
References clang::DependentDiagnostic::Access, clang::DeclContext::ddiags(), and HandleDependentAccessCheck().
Referenced by InstantiateClass(), and InstantiateFunctionDefinition().
| ExprResult Sema::PerformImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| AssignmentAction | Action, | ||
| bool | AllowExplicit = false |
||
| ) |
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
Returns the converted expression. Flavor is the kind of conversion we're performing, used in the error message. If AllowExplicit, explicit user-defined conversions are permitted.
Definition at line 1334 of file SemaOverload.cpp.
Referenced by BuildCounterInit(), BuildCounterUpdate(), BuildCXXNew(), CheckConvertedConstantExpression(), CheckOpenMPLoop(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), FindConditionalOverload(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), and WidenIterationCount().
| ExprResult Sema::PerformImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| AssignmentAction | Action, | ||
| bool | AllowExplicit, | ||
| ImplicitConversionSequence & | ICS | ||
| ) |
Definition at line 1341 of file SemaOverload.cpp.
References checkPlaceholderForOverload(), clang::ExprError(), clang::Expr::getType(), and TryImplicitConversion().
| ExprResult Sema::PerformImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| const ImplicitConversionSequence & | ICS, | ||
| AssignmentAction | Action, | ||
| CheckedConversionKind | CCK = CCK_ImplicitConversion |
||
| ) |
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS.
Returns the converted expression. Action is the kind of conversion we're performing, used in the error message.
Definition at line 2976 of file SemaExprCXX.cpp.
References AA_Converting, clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), clang::CK_ConstructorConversion, clang::CK_UserDefinedConversion, Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), clang::UserDefinedConversionSequence::EllipsisConversion, clang::ImplicitConversionSequence::EllipsisConversion, clang::ExprError(), clang::UserDefinedConversionSequence::FoundConversionFunction, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), PDiag(), PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ImplicitConversionSequence::UserDefined, and clang::ImplicitConversionSequence::UserDefinedConversion.
| ExprResult Sema::PerformImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| const StandardConversionSequence & | SCS, | ||
| AssignmentAction | Action, | ||
| CheckedConversionKind | CCK | ||
| ) |
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS.
Returns the converted expression. Flavor is the context in which we're performing this conversion, for use in error messages.
Definition at line 3066 of file SemaExprCXX.cpp.
References AA_Assigning, AA_Casting, AA_Converting, AA_Initializing, AA_Passing, AA_Passing_CFAudited, AA_Returning, AA_Sending, clang::ASTContext::BoolTy, BuildCXXConstructExpr(), clang::Type::castAs(), CCK_CStyleCast, CCK_FunctionalCast, CCK_ImplicitConversion, CheckDerivedToBaseConversion(), CheckExceptionSpecCompatibility(), CheckMemberPointerConversion(), CheckObjCARCConversion(), CheckObjCARCUnavailableWeakConversion(), CheckPointerConversion(), CheckTransparentUnionArgumentConstraints(), clang::CK_ArrayToPointerDecay, clang::CK_AtomicToNonAtomic, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CXXConstructExpr::CK_Complete, clang::CK_DerivedToBase, clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingComplexToIntegralComplex, clang::CK_FloatingComplexToReal, clang::CK_FloatingRealToComplex, clang::CK_FloatingToIntegral, clang::CK_FunctionToPointerDecay, clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralComplexToReal, clang::CK_IntegralRealToComplex, clang::CK_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_Invalid, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_VectorSplat, clang::CK_ZeroToOCLEvent, Compatible, CompleteConstructorCall(), Context, clang::StandardConversionSequence::CopyConstructor, clang::ImplicitCastExpr::Create(), DefaultLvalueConversion(), clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, Diag(), diagnoseNullableToNonnullConversion(), DiagnoseUseOfDecl(), EmitRelatedResultTypeNote(), clang::ExprError(), clang::StandardConversionSequence::First, FixOverloadedFunctionReference(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::EnumType::getDecl(), clang::ComplexType::getElementType(), getElementType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Expr::getObjectKind(), clang::ASTContext::getPointerType(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::AtomicType::getValueType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ICK_Array_To_Pointer, clang::ICK_Block_Pointer_Conversion, clang::ICK_Boolean_Conversion, clang::ICK_C_Only_Conversion, clang::ICK_Compatible_Conversion, clang::ICK_Complex_Conversion, clang::ICK_Complex_Promotion, clang::ICK_Complex_Real, clang::ICK_Derived_To_Base, clang::ICK_Floating_Conversion, clang::ICK_Floating_Integral, clang::ICK_Floating_Promotion, clang::ICK_Function_To_Pointer, clang::ICK_Identity, clang::ICK_Integral_Conversion, clang::ICK_Integral_Promotion, clang::ICK_Lvalue_To_Rvalue, clang::ICK_NoReturn_Adjustment, clang::ICK_Num_Conversion_Kinds, clang::ICK_Pointer_Conversion, clang::ICK_Pointer_Member, clang::ICK_Qualification, clang::ICK_TransparentUnionConversion, clang::ICK_Vector_Conversion, clang::ICK_Vector_Splat, clang::ICK_Writeback_Conversion, clang::ICK_Zero_Event_Conversion, ImpCastExprToType(), clang::StandardConversionSequence::IncompatibleObjC, clang::Type::isBooleanType(), isCompleteType(), clang::EnumDecl::isFixed(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::OK_ObjCProperty, clang::ASTContext::OverloadTy, PrepareCastToObjCObjectPointer(), prepareVectorSplat(), ResolveAddressOfOverloadedFunction(), ScalarTypeToBooleanCastKind(), clang::StandardConversionSequence::Second, clang::StandardConversionSequence::Third, and clang::VK_RValue.
| ExprResult Sema::PerformMemberExprBaseConversion | ( | Expr * | Base, |
| bool | IsArrow | ||
| ) |
Perform conversions on the LHS of a member access expression.
Definition at line 1186 of file SemaExprMember.cpp.
References clang::Expr::getType(), and clang::Type::isFunctionType().
Referenced by LookupMemberExpr().
| ExprResult Sema::PerformMoveOrCopyInitialization | ( | const InitializedEntity & | Entity, |
| const VarDecl * | NRVOCandidate, | ||
| QualType | ResultType, | ||
| Expr * | Value, | ||
| bool | AllowNRVO = true |
||
| ) |
Perform the initialization of a potentially-movable value, which is the result of return value.
This routine implements C++0x [class.copy]p33, which attempts to treat returned lvalues as rvalues in certain cases (to prefer move construction), then falls back to treating them as lvalues if that failed.
Definition at line 2738 of file SemaStmt.cpp.
References clang::CK_NoOp, Context, clang::ImplicitCastExpr::Create(), clang::InitializationKind::CreateCopy(), clang::ExprError(), clang::Type::getAs(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ImplicitCastExpr::OnStack, clang::InitializationSequence::SK_ConstructorInitialization, Step, and clang::VK_XValue.
| ExprResult Sema::PerformObjectArgumentInitialization | ( | Expr * | From, |
| NestedNameSpecifier * | Qualifier, | ||
| NamedDecl * | FoundDecl, | ||
| CXXMethodDecl * | Method | ||
| ) |
PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.
Definition at line 4951 of file SemaOverload.cpp.
References clang::ImplicitConversionSequence::Bad, clang::BadConversionSequence::bad_qualifiers, clang::CK_NoOp, clang::Expr::Classify(), Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Qualifiers::getCVRQualifiers(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::CXXMethodDecl::getThisType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::ICK_Derived_To_Base, ImpCastExprToType(), clang::ImplicitConversionSequence::isBad(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::BadConversionSequence::Kind, clang::Expr::Classification::makeSimpleLValue(), PerformObjectMemberConversion(), clang::StandardConversionSequence::Second, clang::ImplicitConversionSequence::Standard, and TryObjectArgumentInitialization().
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXMemberCallExpr(), BuildOverloadedArrowExpr(), CheckEnableIf(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), and clang::InitializationSequence::Perform().
| ExprResult Sema::PerformObjectMemberConversion | ( | Expr * | From, |
| NestedNameSpecifier * | Qualifier, | ||
| NamedDecl * | FoundDecl, | ||
| NamedDecl * | Member | ||
| ) |
Cast a base object to a member's actual type.
Logically this happens in three phases:
Definition at line 2514 of file SemaExpr.cpp.
References clang::CK_UncheckedDerivedToBase, Context, clang::ExprError(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), and clang::Type::isRecordType().
Referenced by BuildFieldReferenceExpr(), and PerformObjectArgumentInitialization().
| ExprResult Sema::PerformOpenMPImplicitIntegerConversion | ( | SourceLocation | OpLoc, |
| Expr * | Op | ||
| ) |
Definition at line 5784 of file SemaOpenMP.cpp.
References Diag(), clang::ExprError(), clang::Decl::getLocation(), clang::Type::isEnumeralType(), and PerformContextualImplicitConversion().
Referenced by ActOnOpenMPLinearClause(), ActOnOpenMPScheduleClause(), and IsNonNegativeIntegerValue().
Performs template instantiation for all implicit template instantiations we have seen until this point.
Definition at line 4652 of file SemaTemplateInstantiateDecl.cpp.
References clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::VarDecl::getTemplateSpecializationKind(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticDataMember(), PendingInstantiations, PendingLocalImplicitInstantiations, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.
Referenced by ActOnEndOfTranslationUnit(), InstantiateFunctionDefinition(), and InstantiateVariableDefinition().
| void Sema::PopCompoundScope | ( | ) |
Definition at line 1179 of file Sema.cpp.
References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().
| void Sema::PopDeclContext | ( | ) |
Definition at line 1076 of file SemaDecl.cpp.
Referenced by ActOnFinishDelayedMemberDeclarations(), ActOnFinishLinkageSpecification(), and ActOnFinishNamespaceDef().
| void Sema::PopExpressionEvaluationContext | ( | ) |
Definition at line 12479 of file SemaExpr.cpp.
References AttributeLangSupport::C, CleanupVarDeclMarking(), ConstantEvaluated, clang::Sema::ExpressionEvaluationContextRecord::Context, Diag(), ExprCleanupObjects, ExprEvalContexts, ExprNeedsCleanups, clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated(), clang::Sema::ExpressionEvaluationContextRecord::Lambdas, MarkDeclarationsReferencedInExpr(), MaybeODRUseExprs, clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects, clang::Sema::ExpressionEvaluationContextRecord::NumTypos, clang::Sema::ExpressionEvaluationContextRecord::ParentNeedsCleanups, and clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs.
Referenced by ActOnCXXExitDeclInitializer(), EndOpenMPDSABlock(), InstantiateVariableInitializer(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().
| void Sema::PopFunctionScopeInfo | ( | const sema::AnalysisBasedWarnings::Policy * | WP = nullptr, |
| const Decl * | D = nullptr, |
||
| const BlockExpr * | blkExpr = nullptr |
||
| ) |
Definition at line 1159 of file Sema.cpp.
References AnalysisWarnings, Diag(), FunctionScopes, clang::sema::AnalysisBasedWarnings::IssueWarnings(), and clang::sema::FunctionScopeInfo::PossiblyUnreachableDiags.
Referenced by ActOnFinishCXXInClassMemberInitializer(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().
| void Sema::popObjCTypeParamList | ( | Scope * | S, |
| ObjCTypeParamList * | typeParamList | ||
| ) |
Definition at line 729 of file SemaDeclObjC.cpp.
References IdResolver, clang::IdentifierResolver::RemoveDecl(), and clang::Scope::RemoveDecl().
|
inline |
Definition at line 3533 of file Sema.h.
References clang::Sema::DelayedDiagnostics::popUndelayed().
| void Sema::PopParsingDeclaration | ( | ParsingDeclState | state, |
| Decl * | decl | ||
| ) |
Definition at line 5899 of file SemaDeclAttr.cpp.
References clang::sema::DelayedDiagnostic::Access, clang::sema::DelayedDiagnostic::Deprecation, clang::sema::DelayedDiagnostic::ForbiddenType, clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::sema::DelayedDiagnosticPool::getParent(), HandleDelayedAccessCheck(), handleDelayedAvailabilityCheck(), handleDelayedForbiddenType(), clang::Decl::isInvalidDecl(), clang::sema::DelayedDiagnostic::Kind, clang::sema::DelayedDiagnosticPool::pool_begin(), clang::sema::DelayedDiagnosticPool::pool_end(), clang::Sema::DelayedDiagnostics::popWithoutEmitting(), clang::sema::DelayedDiagnostic::Triggered, and clang::sema::DelayedDiagnostic::Unavailable.
Referenced by clang::SuppressAccessChecks::done().
| void Sema::PopPragmaVisibility | ( | bool | IsNamespaceEnd, |
| SourceLocation | EndLoc | ||
| ) |
PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces.
Definition at line 588 of file SemaAttr.cpp.
References Diag(), FreeVisContext(), NoVisibility, Stack, and VisContext.
Referenced by ActOnFinishNamespaceDef(), and ActOnPragmaVisibility().
| CastKind Sema::PrepareCastToObjCObjectPointer | ( | ExprResult & | E | ) |
Prepare a conversion of the given expression to an ObjC object pointer type.
Definition at line 5482 of file SemaExpr.cpp.
References clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), and clang::ast_matchers::type.
Referenced by PerformImplicitConversion(), and TryReinterpretCast().
| CastKind Sema::PrepareScalarCast | ( | ExprResult & | Src, |
| QualType | DestTy | ||
| ) |
Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.
Definition at line 5497 of file SemaExpr.cpp.
References clang::Type::castAs(), clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingComplexToBoolean, clang::CK_FloatingComplexToIntegralComplex, clang::CK_FloatingComplexToReal, clang::CK_FloatingRealToComplex, clang::CK_FloatingToBoolean, clang::CK_FloatingToIntegral, clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralComplexToBoolean, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralComplexToReal, clang::CK_IntegralRealToComplex, clang::CK_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_IntegralToPointer, clang::CK_NoOp, clang::CK_NullToPointer, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), getElementType(), clang::Type::getPointeeType(), clang::Type::getScalarTypeKind(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNull, clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.
Referenced by CXXCheckConditionalOperands().
| ExprResult Sema::prepareVectorSplat | ( | QualType | VectorTy, |
| Expr * | SplattedExpr | ||
| ) |
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary.
Definition at line 5744 of file SemaExpr.cpp.
References clang::Type::castAs(), clang::CK_BooleanToSignedIntegral, clang::CK_IntegralToFloating, Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getElementType(), clang::Expr::getType(), clang::ASTContext::IntTy, clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
Referenced by PerformImplicitConversion().
| void Sema::PrintInstantiationStack | ( | ) |
Prints the current instantiation stack through a series of notes.
Definition at line 373 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, Context, clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution, clang::Sema::ActiveTemplateInstantiation::DefaultFunctionArgumentInstantiation, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentChecking, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation, Diags, clang::Sema::ActiveTemplateInstantiation::ExceptionSpecInstantiation, clang::Sema::ActiveTemplateInstantiation::ExplicitTemplateArgumentSubstitution, clang::Decl::getDeclContext(), clang::NamedDecl::getName(), getPrintingPolicy(), getTemplateArgumentBindingsText(), clang::DiagnosticsEngine::getTemplateBacktraceLimit(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTypeDeclType(), clang::Name, clang::NamedDecl::printName(), clang::PrintTemplateArgumentList(), clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution, clang::DiagnosticsEngine::Report(), and clang::Sema::ActiveTemplateInstantiation::TemplateInstantiation.
Referenced by EmitCurrentDiagnostic().
| void Sema::PrintStats | ( | ) | const |
Print out statistics about the semantic analysis.
Definition at line 344 of file Sema.cpp.
References AnalysisWarnings, BumpAlloc, NumSFINAEErrors, and clang::sema::AnalysisBasedWarnings::PrintStats().
Referenced by clang::ParseAST().
| bool Sema::ProcessAccessDeclAttributeList | ( | AccessSpecDecl * | ASDecl, |
| const AttributeList * | AttrList | ||
| ) |
Definition at line 5522 of file SemaDeclAttr.cpp.
References Diag(), clang::AttributeList::getNext(), and ProcessDeclAttribute().
Referenced by ActOnAccessSpecifier().
| void Sema::ProcessDeclAttributeList | ( | Scope * | S, |
| Decl * | D, | ||
| const AttributeList * | AttrList, | ||
| bool | IncludeCXX11Attributes = true |
||
| ) |
ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes.
Definition at line 5474 of file SemaDeclAttr.cpp.
References Diag(), clang::Decl::dropAttr(), clang::ExpectedKernelFunction, clang::Decl::getAttr(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getNext(), clang::Decl::hasAttr(), ProcessDeclAttribute(), and clang::Decl::setInvalidDecl().
Referenced by ActOnAliasDeclaration(), ActOnEmptyDeclaration(), ActOnEnumBody(), ActOnEnumConstant(), ActOnForwardProtocolDeclaration(), ActOnMethodDeclaration(), ActOnStartClassInterface(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnUsingDirective(), and ProcessDeclAttributes().
| void Sema::ProcessDeclAttributes | ( | Scope * | S, |
| Decl * | D, | ||
| const Declarator & | PD | ||
| ) |
ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D.
This is a bit tricky because PD can have attributes specified in many different places, and we need to find and apply them all.
Definition at line 5665 of file SemaDeclAttr.cpp.
References clang::DeclSpec::getAttributes(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::ParsedAttributes::getList(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), and ProcessDeclAttributeList().
Referenced by ActOnExceptionDeclarator(), ActOnObjCExceptionDecl(), CreatePropertyDecl(), and HandleMSProperty().
Definition at line 5637 of file SemaDeclAttr.cpp.
References DeclApplyPragmaWeak(), clang::NamedDecl::getIdentifier(), I, LoadExternalWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.
| void Sema::ProcessPropertyDecl | ( | ObjCPropertyDecl * | property | ) |
Process the specified property declaration and create decls for the setters and getters as needed.
ProcessPropertyDecl - Make sure that any user-defined setter/getter methods have the property type and issue diagnostics if they don't.
| property | The property declaration being processed |
Also synthesize a getter/setter method if none exist (and update the appropriate lookup tables.
Definition at line 2083 of file SemaObjCProperty.cpp.
References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), clang::AttributedType::attr_nonnull, clang::AttributedType::attr_nullable, CheckARCMethodDecl(), CheckObjCMethodOverrides(), Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), Diag(), DiagnosePropertyAccessorMismatch(), clang::Decl::getAttr(), clang::ASTContext::getAttributedType(), clang::ASTContext::getCanonicalType(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getSetterName(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::isReadOnly(), clang::None, clang::ObjCPropertyDecl::OBJC_PR_null_resettable, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCMethodDecl::Optional, clang::ObjCPropertyDecl::Optional, clang::ObjCMethodDecl::Required, RTC_Unknown, clang::SC_None, clang::ObjCMethodDecl::setPropertyAccessor(), clang::AttributedType::stripOuterNullability(), clang::Unspecified, and clang::ASTContext::VoidTy.
Referenced by ActOnAtEnd(), and HandlePropertyInClassExtension().
| StmtResult Sema::ProcessStmtAttributes | ( | Stmt * | Stmt, |
| AttributeList * | Attrs, | ||
| SourceRange | Range | ||
| ) |
Stmt attributes - this routine is the top level dispatcher.
Definition at line 227 of file SemaStmtAttr.cpp.
References CheckForIncompatibleAttributes(), clang::SourceRange::getBegin(), clang::AttributeList::getNext(), ProcessStmtAttribute(), and S.
| void Sema::propagateDLLAttrToBaseClassTemplate | ( | CXXRecordDecl * | Class, |
| Attr * | ClassAttr, | ||
| ClassTemplateSpecializationDecl * | BaseTemplateSpec, | ||
| SourceLocation | BaseLoc | ||
| ) |
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility.
Definition at line 4837 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), checkClassLevelDLLAttribute(), clang::Attr::clone(), Diag(), getASTContext(), clang::getDLLAttr(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::ClassTemplateSpecializationDecl::getSpecializationKind(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::ClassTemplateSpecializationDecl::isExplicitSpecialization(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by CheckBaseSpecifier().
Definition at line 1139 of file Sema.cpp.
References FunctionScopes, and getDiagnostics().
| void Sema::PushCapturedRegionScope | ( | Scope * | RegionScope, |
| CapturedDecl * | CD, | ||
| RecordDecl * | RD, | ||
| CapturedRegionKind | K | ||
| ) |
Definition at line 1509 of file Sema.cpp.
References Context, FunctionScopes, clang::CapturedDecl::getContextParam(), getDiagnostics(), clang::sema::CapturingScopeInfo::ReturnType, and clang::ASTContext::VoidTy.
| void Sema::PushCompoundScope | ( | ) |
Definition at line 1175 of file Sema.cpp.
References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().
| void Sema::PushDeclContext | ( | Scope * | S, |
| DeclContext * | DC | ||
| ) |
Set the current declaration context until it gets popped.
Definition at line 1069 of file SemaDecl.cpp.
References clang::Scope::setEntity().
Referenced by ActOnStartDelayedMemberDeclarations(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), and ActOnStartOfObjCMethodDef().
| void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext, |
| Decl * | LambdaContextDecl = nullptr, |
||
| bool | IsDecltype = false |
||
| ) |
Definition at line 12460 of file SemaExpr.cpp.
References ExprCleanupObjects, ExprEvalContexts, ExprNeedsCleanups, and MaybeODRUseExprs.
Referenced by ActOnCXXEnterDeclInitializer(), clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext(), InstantiateVariableInitializer(), PushExpressionEvaluationContext(), StartOpenMPDSABlock(), and clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope().
| void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext, |
| ReuseLambdaContextDecl_t | , | ||
| bool | IsDecltype = false |
||
| ) |
Definition at line 12472 of file SemaExpr.cpp.
References ExprEvalContexts, and PushExpressionEvaluationContext().
| void Sema::pushExternalDeclIntoScope | ( | NamedDecl * | D, |
| DeclarationName | Name | ||
| ) |
Make the given externally-produced declaration visible at the top level scope.
| D | The externally-produced declaration to push. |
| Name | The name of the externally-produced declaration. |
Definition at line 1263 of file SemaDecl.cpp.
| void Sema::PushFunctionScope | ( | ) |
Enter a new function scope.
Definition at line 1127 of file Sema.cpp.
References FunctionScopes, and getDiagnostics().
Referenced by ActOnStartCXXInClassMemberInitializer(), ActOnStartOfObjCMethodDef(), and clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope().
| LambdaScopeInfo * Sema::PushLambdaScope | ( | ) |
Definition at line 1144 of file Sema.cpp.
References FunctionScopes, and getDiagnostics().
Referenced by RebuildLambdaScopeInfo().
| void Sema::PushNamespaceVisibilityAttr | ( | const VisibilityAttr * | Attr, |
| SourceLocation | Loc | ||
| ) |
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
Definition at line 579 of file SemaAttr.cpp.
References NoVisibility, and PushPragmaVisibility().
Referenced by ActOnStartNamespaceDef().
Add this decl to the scope shadowed decl chains.
Definition at line 1203 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), clang::frontend::CPlusPlus, clang::NamedDecl::declarationReplaces(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Scope::getEntity(), clang::Decl::getLexicalDeclContext(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), I, clang::Scope::isDeclScope(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isOutOfLine(), clang::DeclContext::isTransparentContext(), and clang::Scope::RemoveDecl().
Referenced by ActOnAliasDeclaration(), ActOnCompatibilityAlias(), ActOnDefs(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnNamespaceAliasDef(), actOnObjCTypeParamList(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnUsingDeclaration(), addImplicitTypedef(), BuildUsingShadowDecl(), DeclApplyPragmaWeak(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), HandleMSProperty(), Initialize(), InjectAnonymousStructOrUnionMembers(), and LookupOrCreateLabel().
|
inline |
Definition at line 3530 of file Sema.h.
References clang::Sema::DelayedDiagnostics::pushUndelayed().
|
inline |
Definition at line 3524 of file Sema.h.
References clang::Sema::DelayedDiagnostics::push().
Referenced by clang::SuppressAccessChecks::SuppressAccessChecks().
| void Sema::PushUsingDirective | ( | Scope * | S, |
| UsingDirectiveDecl * | UDir | ||
| ) |
Definition at line 7630 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::Scope::getEntity(), clang::DeclContext::isFunctionOrMethod(), and clang::Scope::PushUsingDirective().
Referenced by ActOnUsingDirective().
| void Sema::ReadMethodPool | ( | Selector | Sel | ) |
Read the contents of the method pool for a given selector from external storage.
Definition at line 3220 of file SemaDeclObjC.cpp.
References clang::ExternalSemaSource::ReadMethodPool().
Referenced by AddClassMessageCompletions(), and CollectMultipleMethodsInGlobalPool().
| ExprResult Sema::RebuildExprInCurrentInstantiation | ( | Expr * | E | ) |
Definition at line 8335 of file SemaTemplate.cpp.
References clang::Expr::getExprLoc().
Referenced by RebuildDeclaratorInCurrentInstantiation().
| bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation | ( | CXXScopeSpec & | SS | ) |
Definition at line 8341 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), Context, clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getWithLocInContext(), and clang::CXXScopeSpec::isInvalid().
Referenced by ActOnCXXEnterDeclaratorScope(), and RebuildDeclaratorInCurrentInstantiation().
| bool Sema::RebuildTemplateParamsInCurrentInstantiation | ( | TemplateParameterList * | Params | ) |
Rebuild the template parameters now that we know we're in a current instantiation.
Definition at line 8359 of file SemaTemplate.cpp.
References clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::DeclaratorDecl::getTypeSourceInfo(), I, clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), and clang::TemplateParameterList::size().
| TypeSourceInfo * Sema::RebuildTypeInCurrentInstantiation | ( | TypeSourceInfo * | T, |
| SourceLocation | Loc, | ||
| DeclarationName | Name | ||
| ) |
Rebuilds a type within the context of the current instantiation.
The type T is part of the type of an out-of-line member definition of a class template (or class template partial specialization) that was parsed and constructed before we entered the scope of the class template (or partial specialization thereof). This routine will rebuild that type now that we have entered the declarator's scope, which may produce different canonical types, e.g.,
Here, the type "typename X<T>::pointer" will be created as a DependentNameType, since we do not know that we can look into X<T> when we parsed the type. This function will rebuild the type, performing the lookup of "pointer" in X<T> and returning an ElaboratedType whose canonical type is the same as the canonical type of T*, allowing the return types of the out-of-line definition and the declaration to match.
Definition at line 8325 of file SemaTemplate.cpp.
References clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().
Referenced by RebuildDeclaratorInCurrentInstantiation().
| void Sema::RecordParsingTemplateParameterDepth | ( | unsigned | Depth | ) |
This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.
Definition at line 1150 of file Sema.cpp.
References Depth, and getCurLambda().
|
inline |
Definition at line 1184 of file Sema.h.
References getCurFunction(), isUnevaluatedContext(), and clang::sema::FunctionScopeInfo::recordUseOfWeak().
Referenced by LookupMemberExpr().
| Expr * Sema::recreateSyntacticForm | ( | PseudoObjectExpr * | E | ) |
Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs.
This is a hack which should be removed when TreeTransform is capable of rebuilding a tree without stripping implicit operations.
Definition at line 1635 of file SemaPseudoObject.cpp.
References Context, clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), and stripOpaqueValuesFromPseudoObjectRef().
| void Sema::redelayDiagnostics | ( | sema::DelayedDiagnosticPool & | pool | ) |
Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context instead of in the given pool.
Essentially, this just moves them to the current pool.
Definition at line 5949 of file SemaDeclAttr.cpp.
References clang::Sema::DelayedDiagnostics::getCurrentPool(), and clang::sema::DelayedDiagnosticPool::steal().
Referenced by clang::SuppressAccessChecks::redelay().
Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations.
We include any extern "C" declaration that is not visible in the translation unit here, not just function-scope declarations.
Definition at line 5137 of file SemaDecl.cpp.
References Context, clang::frontend::CPlusPlus, clang::ASTContext::getExternCContextDecl(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::getRedeclContext(), clang::DeclContext::isTranslationUnit(), and clang::DeclContext::makeDeclVisibleInContext().
| void Sema::RegisterTypeTagForDatatype | ( | const IdentifierInfo * | ArgumentKind, |
| uint64_t | MagicValue, | ||
| QualType | Type, | ||
| bool | LayoutCompatible, | ||
| bool | MustBeNull | ||
| ) |
Register a magic integral constant to be used as a type tag.
Definition at line 9811 of file SemaChecking.cpp.
| bool Sema::RequireCompleteDeclContext | ( | CXXScopeSpec & | SS, |
| DeclContext * | DC | ||
| ) |
Require that the context specified by SS be complete.
If SS refers to a type, this routine checks whether the type is complete enough (or can be made complete enough) for name lookup into the DeclContext. A type that is not yet completed can be considered "complete enough" if it is a class/struct/union/enum that is currently being defined. Or, if we have a type that names a class template specialization that is not a complete type, we will attempt to instantiate that class template.
Definition at line 191 of file SemaCXXScopeSpec.cpp.
References Context, Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::EnumType::getDecl(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::EnumDecl::getMemberSpecializationInfo(), clang::CXXScopeSpec::getRange(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTContext::getTypeDeclType(), InstantiateEnum(), clang::TagType::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), RequireCompleteType(), clang::CXXScopeSpec::SetInvalid(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::ast_matchers::type.
Referenced by ActOnCXXEnterDeclaratorScope(), ActOnFriendFunctionDecl(), BuildCXXNestedNameSpecifier(), BuildUsingDeclaration(), CheckUsingDeclQualifier(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), LookupParsedName(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| bool Sema::RequireCompleteExprType | ( | Expr * | E, |
| TypeDiagnoser & | Diagnoser | ||
| ) |
Ensure that the type of the given expression is complete.
This routine checks whether the expression E has a complete type. If the expression refers to an instantiable construct, that instantiation is performed as needed to complete its type. Furthermore Sema::RequireCompleteType is called for the expression's type (or in the case of a reference type, the referred-to type).
| E | The expression whose type is required to be complete. |
| Diagnoser | The object that will emit a diagnostic if the type is incomplete. |
true if the type of E is incomplete and diagnosed, false otherwise. Definition at line 6478 of file SemaType.cpp.
References completeExprArrayBound(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isIncompleteArrayType(), and RequireCompleteType().
Referenced by RequireCompleteExprType().
Definition at line 6496 of file SemaType.cpp.
References RequireCompleteExprType().
|
inline |
Definition at line 1436 of file Sema.h.
References RequireCompleteExprType().
| bool Sema::RequireCompleteType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| TypeDiagnoser & | Diagnoser | ||
| ) |
Ensure that the type T is a complete type.
This routine checks whether the type T is complete in any context where a complete type is required. If T is a complete type, returns false. If T is a class template specialization, this routine then attempts to perform class template instantiation. If instantiation fails, or if T is incomplete and cannot be completed, issues the diagnostic diag (giving it the type T) and returns true.
| Loc | The location in the source that the incomplete type diagnostic should refer to. |
| T | The type that this routine is examining for completeness. |
true if T is incomplete and a diagnostic was emitted, false otherwise. Definition at line 6518 of file SemaType.cpp.
References Consumer, clang::Type::getAs(), and clang::ASTConsumer::HandleTagDeclRequiredDefinition().
Referenced by ActOnCXXDelete(), ActOnEndOfTranslationUnit(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPPrivateClause(), ActOnOpenMPReductionClause(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartCXXMemberReference(), ActOnSuperClassOfClassInterface(), BuildArrayType(), BuildAtomicType(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXTypeConstructExpr(), BuildExceptionDeclaration(), BuildInstanceMessage(), BuildObjCEncodeExpression(), BuildOverloadedArrowExpr(), captureInLambda(), CheckAllocatedType(), checkArithmeticIncompletePointerType(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCommaOperands(), CheckForModifiableLvalue(), CheckMessageArgumentTypes(), CheckOMPThreadPrivateDecl(), CheckOverridingFunctionReturnType(), CheckPointerToMemberOperands(), CheckSpecifiedExceptionType(), CheckUnaryTypeTraitTypeCompleteness(), CopyObject(), clang::InitializationSequence::Diagnose(), DiagnoseMultipleUserDefinedConversion(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), FindInstantiatedDecl(), HandleExprPropertyRefExpr(), IgnoredValueConversions(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupPromiseType(), PerformContextualImplicitConversion(), RequireCompleteDeclContext(), RequireCompleteExprType(), RequireCompleteType(), RequireLiteralType(), SetParamDefaultArgument(), and TryStaticImplicitCast().
| bool Sema::RequireCompleteType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| unsigned | DiagID | ||
| ) |
Definition at line 6780 of file SemaType.cpp.
References RequireCompleteType().
|
inline |
Definition at line 1425 of file Sema.h.
References RequireCompleteType().
| bool Sema::RequireLiteralType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| TypeDiagnoser & | Diagnoser | ||
| ) |
Ensure that the type T is a literal type.
This routine checks whether the type T is a literal type. If T is an incomplete type, an attempt is made to complete it. If T is a literal type, or AllowIncompleteType is true and T is an incomplete type, returns false. Otherwise, this routine issues the diagnostic PD (giving it the type T), along with notes explaining why the type is not a literal type, and returns true.
| Loc | The location in the source that the non-literal type diagnostic should refer to. |
| T | The type that this routine is examining for literalness. |
| Diagnoser | Emits a diagnostic if T is not a literal type. |
true if T is not a literal type and a diagnostic was emitted, false otherwise. Definition at line 6818 of file SemaType.cpp.
References clang::CXXRecordDecl::bases(), Context, CXXDestructor, Diag(), clang::Sema::TypeDiagnoser::diagnose(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDestructor(), getLiteralDiagFromTagKind(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::TagDecl::getTagKind(), clang::CXXRecordDecl::hasConstexprNonCopyMoveConstructor(), clang::CXXRecordDecl::hasNonLiteralTypeFieldsOrBases(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::isAggregate(), isCompleteType(), clang::Type::isDependentType(), clang::Type::isLiteralType(), clang::CXXMethodDecl::isUserProvided(), clang::Type::isVariableArrayType(), RequireCompleteType(), SpecialMemberIsTrivial(), and clang::CXXRecordDecl::vbases().
Referenced by CheckConstexprDeclStmt(), CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), and RequireLiteralType().
| bool Sema::RequireLiteralType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| unsigned | DiagID | ||
| ) |
Definition at line 6893 of file SemaType.cpp.
References RequireLiteralType().
|
inline |
Definition at line 1446 of file Sema.h.
References RequireLiteralType().
| bool Sema::RequireNonAbstractType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| TypeDiagnoser & | Diagnoser | ||
| ) |
Definition at line 4447 of file SemaDeclCXX.cpp.
References Context, clang::Sema::TypeDiagnoser::diagnose(), DiagnoseAbstractType(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), and isAbstractType().
Referenced by ActOnPropertyImplDecl(), BuildArrayType(), BuildCXXCastArgument(), BuildCXXTypeConstructExpr(), BuildExceptionDeclaration(), captureInLambda(), CheckAllocatedType(), CreateNewFunctionDecl(), CXXCheckConditionalOperands(), RequireNonAbstractType(), and TryStaticImplicitCast().
|
inline |
Definition at line 5512 of file Sema.h.
References RequireNonAbstractType().
| FunctionDecl * Sema::ResolveAddressOfOverloadedFunction | ( | Expr * | AddressOfExpr, |
| QualType | TargetType, | ||
| bool | Complain, | ||
| DeclAccessPair & | FoundResult, | ||
| bool * | pHadMultipleCandidates = nullptr |
||
| ) |
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to.
For example:
This routine returns the resulting FunctionDecl if it could be resolved, and NULL otherwise. When Complain is true, this routine will emit diagnostics if there is an error.
Definition at line 10579 of file SemaOverload.cpp.
References CheckAddressOfMemberAccess(), Context, clang::Expr::getType(), and clang::ASTContext::OverloadTy.
Referenced by clang::InitializationSequence::Diagnose(), clang::InitializationSequence::InitializeFrom(), IsStandardConversion(), PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), TryReferenceInit(), and TryStaticMemberPointerUpcast().
| bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization | ( | ExprResult & | SrcExpr, |
| bool | DoFunctionPointerConverion = false, |
||
| bool | Complain = false, |
||
| SourceRange | OpRangeForComplaining = SourceRange(), |
||
| QualType | DestTypeForComplaining = QualType(), |
||
| unsigned | DiagIDForComplaining = 0 |
||
| ) |
Definition at line 10714 of file SemaOverload.cpp.
References Context, DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseUseOfDecl(), clang::ExprError(), clang::OverloadExpr::find(), FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, and ResolveSingleFunctionTemplateSpecialization().
Referenced by CheckPlaceholderExpr(), and TryReinterpretCast().
| const FunctionProtoType * clang::Sema::ResolveExceptionSpec | ( | SourceLocation | Loc, |
| const FunctionProtoType * | FPT | ||
| ) |
Definition at line 141 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), Diag(), clang::EST_Unevaluated, clang::EST_Unparsed, EvaluateImplicitExceptionSpec(), clang::FunctionProtoType::getExceptionSpecDecl(), clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), InstantiateExceptionSpec(), and clang::isUnresolvedExceptionSpec().
Referenced by clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::canCalleeThrow(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), EvaluateUnaryTypeTrait(), HasNoThrowOperator(), MarkFunctionReferenced(), and MarkVirtualMemberExceptionSpecsNeeded().
| FunctionDecl * Sema::ResolveSingleFunctionTemplateSpecialization | ( | OverloadExpr * | ovl, |
| bool | Complain = false, |
||
| DeclAccessPair * | FoundResult = nullptr |
||
| ) |
Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.
This routine can only resolve template-ids that refer to a single function template, where that template-id refers to a single template whose template arguments are either provided by the template-id or have defaults, as described in C++0x [temp.arg.explicit]p3.
If no template-ids are found, no diagnostics are emitted and NULL is returned.
Definition at line 10627 of file SemaOverload.cpp.
References Context, clang::OverloadExpr::copyTemplateArgumentsInto(), clang::frontend::CPlusPlus14, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceReturnType(), DeduceTemplateArguments(), Diag(), E, clang::Expr::getExprLoc(), getLangOpts(), clang::OverloadExpr::getName(), clang::OverloadExpr::getNameLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadExpr::hasExplicitTemplateArgs(), I, clang::MakeDeductionFailureInfo(), and NoteAllOverloadCandidates().
Referenced by handleCleanupAttr(), ResolveAndFixSingleFunctionTemplateSpecialization(), and ResolveOverloadForDeduction().
| void Sema::RestoreNestedNameSpecifierAnnotation | ( | void * | Annotation, |
| SourceRange | AnnotationRange, | ||
| CXXScopeSpec & | SS | ||
| ) |
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
| Annotation | The annotation pointer, produced by SaveNestedNameSpecifierAnnotation(). |
| AnnotationRange | The source range corresponding to the annotation. |
| SS | The nested-name-specifier that will be updated with the contents of the annotation pointer. |
Definition at line 971 of file SemaCXXScopeSpec.cpp.
References clang::CXXScopeSpec::Adopt(), and clang::CXXScopeSpec::SetInvalid().
| void * Sema::SaveNestedNameSpecifierAnnotation | ( | CXXScopeSpec & | SS | ) |
Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier.
| SS | A nested-name-specifier. |
SS. Definition at line 957 of file SemaCXXScopeSpec.cpp.
References clang::ASTContext::Allocate(), Context, clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::location_data(), and clang::CXXScopeSpec::location_size().
ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type.
Definition at line 410 of file Sema.cpp.
References clang::CK_FloatingComplexToBoolean, clang::CK_FloatingToBoolean, clang::CK_IntegralComplexToBoolean, clang::CK_IntegralToBoolean, clang::CK_Invalid, clang::CK_MemberPointerToBoolean, clang::CK_NoOp, clang::CK_PointerToBoolean, clang::Type::getScalarTypeKind(), clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.
Referenced by PerformImplicitConversion().
| const ObjCMethodDecl * Sema::SelectorsForTypoCorrection | ( | Selector | Sel, |
| QualType | ObjectType = QualType() |
||
| ) |
Definition at line 3434 of file SemaDeclObjC.cpp.
References clang::Type::getAsObjCInterfacePointerType(), clang::Selector::getAsString(), clang::ObjCMethodList::getNext(), clang::Selector::getNumArgs(), HelperIsMethodInObjCType(), HelperSelectorsForTypoCorrection(), clang::QualType::isNull(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCQualifiedIdType(), MethodPool, and clang::NumArgs.
Referenced by CheckMessageArgumentTypes(), and ParseObjCSelectorExpression().
| ExprResult Sema::SemaBuiltinShuffleVector | ( | CallExpr * | TheCall | ) |
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
Definition at line 2656 of file SemaChecking.cpp.
References Context, Diag(), clang::ExprError(), clang::VectorType::GenericVector, clang::CallExpr::getArg(), clang::Type::getAs(), clang::CallExpr::getCallee(), getElementType(), clang::CallExpr::getLocEnd(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::CallExpr::getRParenLoc(), clang::Expr::getType(), clang::ASTContext::getVectorType(), clang::Type::hasIntegerRepresentation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), and clang::CallExpr::setArg().
| ExprResult Sema::SemaConvertVectorExpr | ( | Expr * | E, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc | ||
| ) |
SemaConvertVectorExpr - Handle __builtin_convertvector.
Definition at line 2740 of file SemaChecking.cpp.
References Context, Diag(), clang::ExprError(), clang::Type::getAs(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isVectorType(), clang::OK_Ordinary, and clang::VK_RValue.
| bool Sema::SetCtorInitializers | ( | CXXConstructorDecl * | Constructor, |
| bool | AnyErrors, | ||
| ArrayRef< CXXCtorInitializer * > | Initializers = None |
||
| ) |
Definition at line 3876 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), BuildImplicitBaseInitializer(), AttributeLangSupport::C, CollectFieldInitializer(), Context, clang::DeclContext::decls(), Diag(), DiagnoseAbstractType(), clang::CXXCtorInitializer::getAnyMember(), clang::Type::getAs(), clang::CXXCtorInitializer::getBaseClass(), clang::FieldDecl::getCanonicalDecl(), clang::TagDecl::getCanonicalDecl(), clang::CXXRecordDecl::getDefinition(), clang::CXXCtorInitializer::getIndirectMember(), clang::Decl::getLocation(), clang::CXXCtorInitializer::getMember(), clang::CXXMethodDecl::getParent(), clang::FieldDecl::getParent(), clang::Expr::getType(), clang::RecordDecl::hasFlexibleArrayMember(), I, clang::CXXRecordDecl::isAbstract(), clang::CXXCtorInitializer::isBaseInitializer(), clang::DeclContext::isDependentContext(), clang::TagDecl::isUnion(), MarkBaseAndMemberDestructorsReferenced(), clang::CXXConstructorDecl::setCtorInitializers(), clang::Decl::setInvalidDecl(), clang::CXXConstructorDecl::setNumCtorInitializers(), and clang::CXXRecordDecl::vbases().
Referenced by ActOnDefaultCtorInitializers(), ActOnMemInitializers(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitMoveConstructor(), and DefineInheritingConstructor().
| void Sema::SetDeclDefaulted | ( | Decl * | dcl, |
| SourceLocation | DefaultLoc | ||
| ) |
Definition at line 12873 of file SemaDeclCXX.cpp.
References CheckExplicitlyDefaultedSpecialMember(), CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, CXXMoveConstructor, DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), Diag(), clang::FunctionDecl::getCanonicalDecl(), clang::CXXMethodDecl::getParent(), getSpecialMember(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::isDefined(), clang::TagDecl::isDependentType(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::setDefaulted(), and clang::FunctionDecl::setExplicitlyDefaulted().
Referenced by InstantiateFunctionDefinition(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| void Sema::SetDeclDeleted | ( | Decl * | dcl, |
| SourceLocation | DelLoc | ||
| ) |
Definition at line 12814 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::CXXMethodDecl::begin_overridden_methods(), Diag(), E, clang::CXXMethodDecl::end_overridden_methods(), clang::FunctionDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::getDLLAttr(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getPreviousDecl(), I, clang::FunctionDecl::isDeleted(), clang::FunctionDecl::isMain(), clang::FunctionDecl::setDeletedAsWritten(), clang::Decl::setInvalidDecl(), and clang::TSK_ExplicitSpecialization.
Referenced by CheckExplicitlyDefaultedSpecialMember(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| bool Sema::SetDelegatingInitializer | ( | CXXConstructorDecl * | Constructor, |
| CXXCtorInitializer * | Initializer | ||
| ) |
Definition at line 3855 of file SemaDeclCXX.cpp.
References Context, DelegatingCtorDecls, DiagnoseUseOfDecl(), clang::CXXMethodDecl::getParent(), clang::CXXCtorInitializer::getSourceLocation(), clang::CXXCtorInitializer::isDelegatingInitializer(), LookupDestructor(), MarkFunctionReferenced(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back(), clang::CXXConstructorDecl::setCtorInitializers(), and clang::CXXConstructorDecl::setNumCtorInitializers().
Referenced by ActOnMemInitializers().
| void Sema::SetIvarInitializers | ( | ObjCImplementationDecl * | ObjCImplementation | ) |
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized.
Definition at line 13396 of file SemaDeclCXX.cpp.
References CheckDestructorAccess(), CollectIvarsToConstructOrDestruct(), Context, clang::frontend::CPlusPlus, clang::InitializationKind::CreateDefault(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ASTContext::getBaseElementType(), clang::ObjCImplDecl::getClassInterface(), getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::InitializedEntity::InitializeMember(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), LookupDestructor(), MarkFunctionReferenced(), MaybeCreateExprWithCleanups(), clang::None, PDiag(), and clang::ObjCImplementationDecl::setIvarInitializers().
Referenced by ActOnAtEnd().
|
inline |
Definition at line 530 of file Sema.h.
References LateTemplateParser, LateTemplateParserCleanup, OpaqueParser, and P.
Referenced by clang::Parser::ParseTopLevelDecl().
| bool Sema::SetMemberAccessSpecifier | ( | NamedDecl * | MemberDecl, |
| NamedDecl * | PrevMemberDecl, | ||
| AccessSpecifier | LexicalAS | ||
| ) |
SetMemberAccessSpecifier - Set the access specifier of a member.
Returns true on error (when the previous member decl access specifier is different from the new member decl access specifier).
Definition at line 39 of file SemaAccess.cpp.
References clang::AS_none, Diag(), clang::Decl::getAccess(), clang::Decl::getLocation(), and clang::Decl::setAccess().
| bool Sema::SetParamDefaultArgument | ( | ParmVarDecl * | Param, |
| Expr * | DefaultArg, | ||
| SourceLocation | EqualLoc | ||
| ) |
Definition at line 248 of file SemaDeclCXX.cpp.
References Context, clang::InitializationKind::CreateCopy(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Decl::getLocation(), clang::ValueDecl::getType(), I, clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), MaybeCreateExprWithCleanups(), RequireCompleteType(), clang::Result, clang::ParmVarDecl::setDefaultArg(), clang::Decl::setInvalidDecl(), and UnparsedDefaultArgInstantiations.
Referenced by ActOnParamDefaultArgument(), and SubstParmVarDecl().
| void Sema::setTagNameForLinkagePurposes | ( | TagDecl * | TagFromDeclSpec, |
| TypedefNameDecl * | NewTD | ||
| ) |
Definition at line 3643 of file SemaDecl.cpp.
References clang::ASTContext::addTypedefNameForUnnamedTagDecl(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::NamedDecl::getIdentifier(), clang::TagDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::ASTContext::getTagDeclType(), clang::TypedefNameDecl::getUnderlyingType(), clang::NamedDecl::hasLinkageBeenComputed(), clang::TagDecl::hasNameForLinkage(), clang::ASTContext::hasSameType(), clang::Decl::isInvalidDecl(), clang::TagDecl::isThisDeclarationADefinition(), and clang::TagDecl::setTypedefNameForAnonDecl().
Referenced by ActOnAliasDeclaration().
| bool Sema::ShouldDeleteSpecialMember | ( | CXXMethodDecl * | MD, |
| CXXSpecialMember | CSM, | ||
| bool | Diagnose = false |
||
| ) |
Determine if a special member function should have a deleted definition when it is defaulted.
Determine whether a defaulted special member function should be defined as deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11, C++11 [class.copy]p23, and C++11 [class.dtor]p5.
Definition at line 5757 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), Context, clang::CXXRecordDecl::ctors(), CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, clang::ASTContext::DeclarationNames, Diag(), clang::RecordDecl::fields(), FindDeallocationFunction(), clang::DeclarationNameTable::getCXXOperatorName(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), I, inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::isAbstract(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::TagDecl::isDependentType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXMethodDecl::isVirtual(), LangOpts, clang::CXXRecordDecl::methods(), clang::Name, and clang::CXXRecordDecl::vbases().
Referenced by CheckExplicitlyDefaultedSpecialMember(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), and DeclareImplicitMoveConstructor().
| bool Sema::ShouldEnterDeclaratorScope | ( | Scope * | S, |
| const CXXScopeSpec & | SS | ||
| ) |
Definition at line 984 of file SemaCXXScopeSpec.cpp.
References CurContext, clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isSet(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by clang::Parser::ParseUnqualifiedId().
| Sema::SkipBodyInfo Sema::shouldSkipAnonEnumBody | ( | Scope * | S, |
| IdentifierInfo * | II, | ||
| SourceLocation | IILoc | ||
| ) |
Determine whether the body of an anonymous enumeration should be skipped.
| II | The name of the first enumerator. |
Definition at line 14067 of file SemaDecl.cpp.
References clang::frontend::CPlusPlus, ForRedeclaration, clang::NamedDecl::getDeclName(), getLangOpts(), hasVisibleDefinition(), LookupOrdinaryName, LookupSingleName(), and clang::Sema::SkipBodyInfo::Previous.
| bool Sema::ShouldWarnIfUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) | const |
Definition at line 1378 of file SemaDecl.cpp.
References Context, clang::ASTContext::DeclMustBeEmitted(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::hasAttr(), clang::DeclContext::isDependentContext(), IsDisallowedCopyOrAssign(), clang::Decl::isInvalidDecl(), isMainFileLoc(), clang::Decl::isUsed(), and clang::TSK_ImplicitInstantiation.
Referenced by ShouldRemoveFromUnused().
| bool Sema::SpecialMemberIsTrivial | ( | CXXMethodDecl * | MD, |
| CXXSpecialMember | CSM, | ||
| bool | Diagnose = false |
||
| ) |
Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25, and C++11 [class.dtor]p5.
Definition at line 6144 of file SemaDeclCXX.cpp.
References checkTrivialClassMembers(), checkTrivialSubobjectCall(), clang::Qualifiers::Const, Context, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, CXXMoveConstructor, Diag(), clang::Type::getAs(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::CXXBaseSpecifier::getLocStart(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ReferenceType::getPointeeType(), clang::ASTContext::getRecordType(), clang::ASTContext::getRValueReferenceType(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXMethodDecl::isUserProvided(), clang::FunctionDecl::isVariadic(), clang::CXXBaseSpecifier::isVirtual(), clang::CXXMethodDecl::isVirtual(), TSK_BaseClass, and clang::QualType::withConst().
Referenced by CheckCompletedCXXClass(), checkTrivialSubobjectCall(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and RequireLiteralType().
| CXXMethodDecl * Sema::startLambdaDefinition | ( | CXXRecordDecl * | Class, |
| SourceRange | IntroducerRange, | ||
| TypeSourceInfo * | MethodType, | ||
| SourceLocation | EndLoc, | ||
| ArrayRef< ParmVarDecl * > | Params | ||
| ) |
Start the definition of a lambda expression.
Definition at line 354 of file SemaLambda.cpp.
References clang::AS_public, clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::Type::castAs(), Context, clang::FunctionTemplateDecl::Create(), clang::CXXMethodDecl::Create(), clang::DeclarationNameLoc::CXXOperatorName, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::SourceRange::getBegin(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Decl::getDeclContext(), clang::SourceRange::getEnd(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getGenericLambdaTemplateParameterList(), clang::Decl::getLocation(), clang::FunctionProtoType::getParamTypes(), clang::SourceLocation::getRawEncoding(), clang::FunctionType::getReturnType(), clang::TypeSourceInfo::getType(), clang::DeclContext::isDependentContext(), P, clang::FunctionDecl::params(), clang::Result, clang::SC_None, clang::Decl::setAccess(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::CXXRecordDecl::setLambdaMangling(), clang::Decl::setLexicalDeclContext(), and clang::FunctionDecl::setParams().
| void Sema::StartOpenMPClause | ( | OpenMPClauseKind | K | ) |
| void Sema::StartOpenMPDSABlock | ( | OpenMPDirectiveKind | K, |
| const DeclarationNameInfo & | DirName, | ||
| Scope * | CurScope, | ||
| SourceLocation | Loc | ||
| ) |
Called on start of new data sharing attribute block.
Definition at line 924 of file SemaOpenMP.cpp.
References DSAStack, PotentiallyEvaluated, and PushExpressionEvaluationContext().
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
Definition at line 4122 of file SemaExprObjC.cpp.
References Context, clang::Expr::hasPlaceholderType(), and clang::UO_Extension.
Referenced by CheckMessageArgumentTypes(), and CheckPlaceholderExpr().
| bool Sema::Subst | ( | const TemplateArgumentLoc * | Args, |
| unsigned | NumArgs, | ||
| TemplateArgumentListInfo & | Result, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2711 of file SemaTemplateInstantiate.cpp.
Referenced by FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
Substitute Replacement for auto in TypeWithAuto.
Definition at line 4119 of file SemaTemplateDeduction.cpp.
Referenced by DeduceTemplateArguments(), and SubstAutoWithinFunctionReturnType().
| TypeSourceInfo * Sema::SubstAutoTypeSourceInfo | ( | TypeSourceInfo * | TypeWithAuto, |
| QualType | Replacement | ||
| ) |
Substitute Replacement for auto in TypeWithAuto.
Definition at line 4125 of file SemaTemplateDeduction.cpp.
| bool Sema::SubstBaseSpecifiers | ( | CXXRecordDecl * | Instantiation, |
| CXXRecordDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Perform substitution on the base class specifiers of the given class template specialization.
Produces a diagnostic and returns true on error, returns false and attaches the instantiated base classes to the class template specialization if successful.
Definition at line 1744 of file SemaTemplateInstantiate.cpp.
References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases(), CheckBaseSpecifier(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), Context, I, clang::Decl::setInvalidDecl(), and SubstType().
Referenced by InstantiateClass().
| Decl * Sema::SubstDecl | ( | Decl * | D, |
| DeclContext * | Owner, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2734 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::isInvalidDecl(), and clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit().
Referenced by FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), InstantiateVariableDefinition(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| DeclarationNameInfo Sema::SubstDeclarationNameInfo | ( | const DeclarationNameInfo & | NameInfo, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Do template substitution on declaration name info.
Definition at line 2693 of file SemaTemplateInstantiate.cpp.
References clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().
Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
| TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable | ( | TemplateDecl * | Template, |
| SourceLocation | TemplateLoc, | ||
| SourceLocation | RAngleLoc, | ||
| Decl * | Param, | ||
| SmallVectorImpl< TemplateArgument > & | Converted, | ||
| bool & | HasDefaultArg | ||
| ) |
If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument.
Definition at line 3357 of file SemaTemplate.cpp.
References clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TypeSourceInfo::getType(), hasVisibleDefaultArgument(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TemplateName::isNull(), and SubstDefaultTemplateArgument().
Referenced by FinishTemplateArgumentDeduction().
| void Sema::SubstExceptionSpec | ( | FunctionDecl * | New, |
| const FunctionProtoType * | Proto, | ||
| const MultiLevelTemplateArgumentList & | Args | ||
| ) |
Definition at line 1592 of file SemaTemplateInstantiate.cpp.
References clang::EST_None, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getLocation(), clang::TypeLoc::getLocEnd(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::FunctionProtoType::ExceptionSpecInfo::Type, and UpdateExceptionSpec().
Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and InstantiateExceptionSpec().
| ExprResult Sema::SubstExpr | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2648 of file SemaTemplateInstantiate.cpp.
References E.
Referenced by instantiateDependentAlignedAttr(), instantiateDependentAlignValueAttr(), instantiateDependentAssumeAlignedAttr(), instantiateDependentCUDALaunchBoundsAttr(), instantiateDependentEnableIfAttr(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), SubstDefaultTemplateArgument(), and SubstParmVarDecl().
| bool Sema::SubstExprs | ( | ArrayRef< Expr * > | Exprs, |
| bool | IsCall, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SmallVectorImpl< Expr * > & | Outputs | ||
| ) |
Substitute the given template arguments into a list of expressions, expanding pack expansions if required.
| Exprs | The list of expressions to substitute into. |
| IsCall | Whether this is some form of call, in which case default arguments will be dropped. |
| TemplateArgs | The set of template arguments to substitute. |
| Outputs | Will receive all of the substituted arguments. |
Definition at line 2667 of file SemaTemplateInstantiate.cpp.
| TypeSourceInfo * Sema::SubstFunctionDeclType | ( | TypeSourceInfo * | T, |
| const MultiLevelTemplateArgumentList & | Args, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity, | ||
| CXXRecordDecl * | ThisContext, | ||
| unsigned | ThisTypeQuals | ||
| ) |
A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
Its purpose is solely to force the instantiation of default-argument expressions and to avoid instantiating an exception-specification.
Definition at line 1550 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, Context, clang::TypeLoc::getAs(), clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), clang::QualType::isNull(), NeedsInstantiationAsFunctionType(), clang::TypeLocBuilder::reserve(), and clang::Result.
Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().
| ExprResult Sema::SubstInitializer | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | CXXDirectInit | ||
| ) |
Definition at line 2658 of file SemaTemplateInstantiate.cpp.
Referenced by InstantiateInClassInitializer(), InstantiateMemInitializers(), and InstantiateVariableInitializer().
| Sema::TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate, |
| TemplateArgumentListInfo & | ExplicitTemplateArgs, | ||
| SmallVectorImpl< DeducedTemplateArgument > & | Deduced, | ||
| SmallVectorImpl< QualType > & | ParamTypes, | ||
| QualType * | FunctionType, | ||
| sema::TemplateDeductionInfo & | Info | ||
| ) |
Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit].
| FunctionTemplate | the function template into which the explicit template arguments will be substituted. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| Deduced | the deduced template arguments, which will be populated with the converted and checked explicit template arguments. |
| ParamTypes | will be populated with the instantiated function parameters. |
| FunctionType | if non-NULL, the result type of the function template will also be instantiated and the pointed-to value will be updated with the instantiated function type. |
| Info | if substitution fails for any reason, this object will be populated with more information about the failure. |
Definition at line 2477 of file SemaTemplateDeduction.cpp.
References Builder, BuildFunctionType(), CheckTemplateArgumentList(), Context, clang::frontend::CPlusPlus11, clang::TemplateArgumentList::CreateCopy(), CurrentInstantiationScope, clang::Sema::ActiveTemplateInstantiation::ExplicitTemplateArgumentSubstitution, clang::TemplateArgumentList::get(), clang::Type::getAs(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::TemplateArgument::getKind(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::DeclContext::getParent(), clang::FunctionType::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::FunctionProtoType::hasTrailingReturn(), I, clang::QualType::isNull(), makeTemplateParameter(), P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::params(), clang::sema::TemplateDeductionInfo::reset(), clang::LocalInstantiationScope::SetPartiallySubstitutedPack(), clang::TemplateParameterList::size(), clang::TemplateArgumentList::size(), clang::TemplateArgumentListInfo::size(), SubstParmTypes(), SubstType(), TDK_InstantiationDepth, TDK_InvalidExplicitArguments, TDK_SubstitutionFailure, TDK_Success, and Unevaluated.
Referenced by DeduceTemplateArguments().
| NestedNameSpecifierLoc Sema::SubstNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2681 of file SemaTemplateInstantiate.cpp.
References clang::NestedNameSpecifierLoc::getBeginLoc().
Referenced by SubstDefaultTemplateArgument(), SubstQualifier(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool Sema::SubstParmTypes | ( | SourceLocation | Loc, |
| ParmVarDecl ** | Params, | ||
| unsigned | NumParams, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SmallVectorImpl< QualType > & | ParamTypes, | ||
| SmallVectorImpl< ParmVarDecl * > * | OutParams = nullptr |
||
| ) |
Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution.
Definition at line 1721 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations.
Referenced by clang::TemplateDeclInstantiator::SubstFunctionType(), and SubstituteExplicitTemplateArguments().
| ParmVarDecl * Sema::SubstParmVarDecl | ( | ParmVarDecl * | D, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| int | indexAdjustment, | ||
| Optional< unsigned > | NumExpansions, | ||
| bool | ExpectParameterPack | ||
| ) |
Definition at line 1612 of file SemaTemplateInstantiate.cpp.
References CheckPackExpansion(), CheckParameter(), clang::Type::containsUnexpandedParameterPack(), Context, CurContext, CurrentInstantiationScope, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getAs(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArg(), clang::ParmVarDecl::getFunctionScopeDepth(), clang::ParmVarDecl::getFunctionScopeIndex(), clang::NamedDecl::getIdentifier(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::VarDecl::getStorageClass(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::LocalInstantiationScope::InstantiatedLocalPackArg(), clang::Decl::isLexicallyWithinFunctionOrMethod(), clang::ParmVarDecl::isParameterPack(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVoidType(), clang::Decl::setDeclContext(), clang::ParmVarDecl::setHasInheritedDefaultArg(), SetParamDefaultArgument(), clang::ParmVarDecl::setScopeInfo(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::ParmVarDecl::setUnparsedDefaultArg(), SubstExpr(), SubstType(), and UnparsedDefaultArgInstantiations.
| StmtResult Sema::SubstStmt | ( | Stmt * | S, |
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2637 of file SemaTemplateInstantiate.cpp.
References S.
Referenced by InstantiateFunctionDefinition().
| TemplateName Sema::SubstTemplateName | ( | NestedNameSpecifierLoc | QualifierLoc, |
| TemplateName | Name, | ||
| SourceLocation | Loc, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) |
Definition at line 2701 of file SemaTemplateInstantiate.cpp.
References clang::CXXScopeSpec::Adopt().
Referenced by SubstDefaultTemplateArgument().
| TypeSourceInfo * Sema::SubstType | ( | TypeSourceInfo * | T, |
| const MultiLevelTemplateArgumentList & | Args, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Perform substitution on the type T with a given set of template arguments.
This routine substitutes the given template arguments into the type T and produces the instantiated type.
| T | the type into which the template arguments will be substituted. If this type is not dependent, it will be returned immediately. |
| Args | the template arguments that will be substituted for the top-level template parameters within T. |
| Loc | the location in the source code where this substitution is being performed. It will typically be the location of the declarator (if we're instantiating the type of some declaration) or the location of the type in the source code (if, e.g., we're instantiating the type of a cast expression). |
| Entity | the name of the entity associated with a declaration being instantiated (if any). May be empty to indicate that there is no such entity (if, e.g., this is a type that occurs as part of a cast expression) or that the entity has no name (e.g., an unnamed function parameter). |
Definition at line 1451 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, clang::TypeSourceInfo::getType(), clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().
Referenced by addInstantiatedParametersToScope(), CompleteVarTemplateSpecializationDecl(), FinishTemplateArgumentDeduction(), FinishTemplateArgumentDeduction(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), SubstBaseSpecifiers(), SubstDefaultTemplateArgument(), SubstituteExplicitTemplateArguments(), and SubstParmVarDecl().
| QualType Sema::SubstType | ( | QualType | T, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Deprecated form of the above.
Definition at line 1498 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().
| TypeSourceInfo * Sema::SubstType | ( | TypeLoc | TL, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity | ||
| ) |
Definition at line 1467 of file SemaTemplateInstantiate.cpp.
References ActiveTemplateInstantiations, Context, clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::Type::isInstantiationDependentType(), clang::QualType::isNull(), clang::Type::isVariablyModifiedType(), clang::TypeLocBuilder::pushFullCopy(), and clang::TypeLocBuilder::reserve().
| bool Sema::TemplateParameterListsAreEqual | ( | TemplateParameterList * | New, |
| TemplateParameterList * | Old, | ||
| bool | Complain, | ||
| TemplateParameterListEqualKind | Kind, | ||
| SourceLocation | TemplateArgLoc = SourceLocation() |
||
| ) |
Determine whether the given template parameter lists are equivalent.
| New | The new template parameter list, typically written in the source code as part of a new template declaration. |
| Old | The old template parameter list, typically found via name lookup of the template declared with this template parameter list. |
| Complain | If true, this routine will produce a diagnostic if the template parameter lists are not equivalent. |
| Kind | describes how we are to match the template parameter lists. |
| TemplateArgLoc | If this source location is valid, then we are actually checking the template parameter list of a template argument (New) against the template parameter list of its corresponding template template parameter (Old). We produce slightly different diagnostics in this scenario. |
Definition at line 5693 of file SemaTemplate.cpp.
References clang::TemplateParameterList::begin(), DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), MatchTemplateParameterKind(), and clang::TemplateParameterList::size().
Referenced by ActOnAliasDeclaration(), and MatchTemplateParameterKind().
|
inlinestatic |
To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it.
Definition at line 9224 of file Sema.h.
Referenced by AddMethodCandidate(), AddOverloadCandidate(), and DeduceTemplateArguments().
| ExprResult Sema::TransformToPotentiallyEvaluated | ( | Expr * | E | ) |
Definition at line 12449 of file SemaExpr.cpp.
References E, ExprEvalContexts, and isUnevaluatedContext().
Referenced by HandleExprEvaluationContextForTypeof().
| void Sema::translateTemplateArguments | ( | const ASTTemplateArgsPtr & | TemplateArgsIn, |
| TemplateArgumentListInfo & | TemplateArgs | ||
| ) |
Translates template arguments as provided by the parser into template arguments used by semantic analysis.
Definition at line 523 of file SemaTemplate.cpp.
References clang::TemplateArgumentListInfo::addArgument(), I, clang::LangAS::Last, and translateTemplateArgument().
Referenced by ActOnCXXNestedNameSpecifier(), and makeTemplateArgumentListInfo().
| ObjCMethodDecl * Sema::tryCaptureObjCSelf | ( | SourceLocation | Loc | ) |
Try to capture an implicit reference to 'self'.
Definition at line 1237 of file SemaExprObjC.cpp.
References getFunctionLevelDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), and tryCaptureVariable().
Referenced by ActOnClassPropertyRefExpr(), and ActOnSuperMessage().
| bool Sema::tryCaptureVariable | ( | VarDecl * | Var, |
| SourceLocation | Loc, | ||
| TryCaptureKind | Kind, | ||
| SourceLocation | EllipsisLoc, | ||
| bool | BuildAndDiagnose, | ||
| QualType & | CaptureType, | ||
| QualType & | DeclRefType, | ||
| const unsigned *const | FunctionScopeIndexToStopAt | ||
| ) |
Try to capture the given variable.
| Var | The variable to capture. |
| Loc | The location at which the capture occurs. |
| Kind | The kind of capture, which may be implicit (for either a block or a lambda), or explicit by-value or by-reference (for a lambda). |
| EllipsisLoc | The location of the ellipsis, if one is provided in an explicit lambda capture. |
| BuildAndDiagnose | Whether we are actually supposed to add the captures or diagnose errors. If false, this routine merely check whether the capture can occur without performing the capture itself or complaining if the variable cannot be captured. |
| CaptureType | Will be set to the type of the field used to capture this variable in the innermost block or lambda. Only valid when the variable can be captured. |
| DeclRefType | Will be set to the type of a reference to the capture from within the current scope. Only valid when the variable can be captured. |
| FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture variables that may or may not be used in certain specializations of a nested generic lambda. |
Definition at line 13182 of file SemaExpr.cpp.
References captureInBlock(), captureInCapturedRegion(), captureInLambda(), captureVariablyModifiedType(), Context, clang::CR_OpenMP, CurContext, Diag(), diagnoseUncapturableValueReference(), clang::DeclContext::Equals(), FunctionScopes, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::getLambdaAwareParentOfDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::DeclContext::getParent(), getParentOfCapturingContextOrNull(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::VarDecl::hasLocalStorage(), I, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::isGenericLambdaCallOperatorSpecialization(), clang::VarDecl::isInitCapture(), IsOpenMPCapturedVar(), isOpenMPPrivateVar(), isOpenMPTargetCapturedVar(), isVariableAlreadyCapturedInScopeInfo(), isVariableCapturable(), clang::Type::isVariablyModifiedType(), clang::sema::LambdaScopeInfo::Lambda, LangOpts, and TryCapture_Implicit.
Referenced by CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), getCapturedDeclRefType(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), clang::MarkVarDeclODRUsed(), NeedToCaptureVariable(), tryCaptureObjCSelf(), and tryCaptureVariable().
| bool Sema::tryCaptureVariable | ( | VarDecl * | Var, |
| SourceLocation | Loc, | ||
| TryCaptureKind | Kind = TryCapture_Implicit, |
||
| SourceLocation | EllipsisLoc = SourceLocation() |
||
| ) |
Try to capture the given variable.
Definition at line 13375 of file SemaExpr.cpp.
References tryCaptureVariable().
| bool Sema::tryExprAsCall | ( | Expr & | E, |
| QualType & | ZeroArgCallReturnTy, | ||
| UnresolvedSetImpl & | OverloadSet | ||
| ) |
Figure out if an expression could be turned into a call.
Use this when trying to recover from an error where the programmer may have written just the name of a function instead of actually calling it.
| E | - The expression to examine. |
| ZeroArgCallReturnTy | - If the expression can be turned into a call with no arguments, this parameter is set to the type returned by such a call; otherwise, it is set to an empty QualType. |
| OverloadSet | - If the expression is an overloaded function name, this parameter is populated with the decls of the various overloads. |
Definition at line 1304 of file Sema.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::ASTContext::BoundMemberTy, BuildCallToMemberFunction(), clang::UnresolvedSetImpl::clear(), Context, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), getDiagnostics(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::DiagnosticsEngine::getSuppressAllDiagnostics(), clang::Expr::getType(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::Expr::IgnoreParens(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::None, clang::ASTContext::OverloadTy, and clang::DiagnosticsEngine::setSuppressAllDiagnostics().
Referenced by tryToRecoverWithCall().
| ImplicitConversionSequence Sema::TryImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| bool | SuppressUserConversions, | ||
| bool | AllowExplicit, | ||
| bool | InOverloadResolution, | ||
| bool | CStyle, | ||
| bool | AllowObjCWritebackConversion | ||
| ) |
Definition at line 1315 of file SemaOverload.cpp.
References TryImplicitConversion().
Referenced by clang::InitializationSequence::InitializeFrom(), and TryReferenceInitializationCore().
| bool Sema::tryToRecoverWithCall | ( | ExprResult & | E, |
| const PartialDiagnostic & | PD, | ||
| bool | ForceComplain = false, |
||
| bool(*)(QualType) | IsPlausibleResult = nullptr |
||
| ) |
Try to recover by turning the given expression into a call.
Returns true if recovery was attempted or an error was emitted; this may also leave the ExprResult invalid.
Definition at line 1459 of file Sema.cpp.
References ActOnCallExpr(), clang::FixItHint::CreateInsertion(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), getLocForEndOfToken(), clang::SourceLocation::getLocWithOffset(), IsCallableWithAppend(), clang::QualType::isNull(), clang::None, notePlausibleOverloads(), and tryExprAsCall().
Referenced by CheckPlaceholderExpr(), and LookupMemberExpr().
| bool Sema::UnifySection | ( | StringRef | SectionName, |
| int | SectionFlags, | ||
| DeclaratorDecl * | TheDecl | ||
| ) |
Definition at line 363 of file SemaAttr.cpp.
References Context, Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ASTContext::PSF_Implicit, and clang::ASTContext::SectionInfos.
Referenced by ActOnPragmaMSSection().
| bool Sema::UnifySection | ( | StringRef | SectionName, |
| int | SectionFlags, | ||
| SourceLocation | PragmaSectionLocation | ||
| ) |
Definition at line 390 of file SemaAttr.cpp.
References Context, Diag(), clang::ASTContext::PSF_Implicit, and clang::ASTContext::SectionInfos.
| void Sema::UnmarkAsLateParsedTemplate | ( | FunctionDecl * | FD | ) |
Definition at line 8452 of file SemaTemplate.cpp.
References clang::FunctionDecl::setLateTemplateParsed().
| void clang::Sema::UpdateExceptionSpec | ( | FunctionDecl * | FD, |
| const FunctionProtoType::ExceptionSpecInfo & | ESI | ||
| ) |
Definition at line 174 of file SemaExceptionSpec.cpp.
References clang::ASTContext::adjustExceptionSpec(), Context, getASTMutationListener(), clang::isUnresolvedExceptionSpec(), clang::Redeclarable< decl_type >::redecls(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by EvaluateImplicitExceptionSpec(), InstantiateExceptionSpec(), and SubstExceptionSpec().
| void Sema::UpdateMarkingForLValueToRValue | ( | Expr * | E | ) |
Definition at line 13428 of file SemaExpr.cpp.
References Context, getCurLambda(), clang::Expr::IgnoreParens(), IsVariableNonDependentAndAConstantExpression(), and MaybeODRUseExprs.
Referenced by ActOnConstantExpression().
| bool Sema::UseArgumentDependentLookup | ( | const CXXScopeSpec & | SS, |
| const LookupResult & | R, | ||
| bool | HasTrailingLParen | ||
| ) |
Definition at line 2662 of file SemaExpr.cpp.
References clang::FunctionDecl::getBuiltinID(), clang::Decl::isImplicit(), and clang::CXXScopeSpec::isSet().
| QualType Sema::UsualArithmeticConversions | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| bool | IsCompAssign = false |
||
| ) |
UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8).
If both operands aren't arithmetic, this routine returns the first non-arithmetic type found. The client is responsible for emitting appropriate error diagnostics.
Definition at line 1256 of file SemaExpr.cpp.
References clang::CK_IntegralCast, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleFloatConversion(), clang::Type::isArithmeticType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isPromotableBitField(), clang::Type::isPromotableIntegerType(), and clang::Type::isRealFloatingType().
Referenced by CXXCheckConditionalOperands().
| ExprResult Sema::UsualUnaryConversions | ( | Expr * | E | ) |
UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3).
The conversions of array and function types are sometimes suppressed. For example, the array->pointer conversion doesn't apply if the array is an argument to the sizeof or address (&) operators. In these instances, this routine should not be called.
Definition at line 749 of file SemaExpr.cpp.
References clang::CK_FloatingCast, clang::CK_IntegralCast, Context, E, clang::ExprError(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), clang::Type::isHalfType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isPromotableBitField(), and clang::Type::isPromotableIntegerType().
Referenced by BuildObjCBridgedCast(), CheckIndirectionOperand(), checkOpenCLVectorShift(), and SemaBuiltinCallWithStaticChain().
| ExprResult Sema::VerifyBitField | ( | SourceLocation | FieldLoc, |
| IdentifierInfo * | FieldName, | ||
| QualType | FieldTy, | ||
| bool | IsMsStruct, | ||
| Expr * | BitWidth, | ||
| bool * | ZeroWidth = nullptr |
||
| ) |
VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid.
Returns false on success. Can optionally return whether the bit-field is of width 0
Definition at line 12833 of file SemaDecl.cpp.
References Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getIntWidth(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getTypeSize(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result, | ||
| VerifyICEDiagnoser & | Diagnoser, | ||
| bool | AllowFold = true |
||
| ) |
VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics.
Returns false on success. Can optionally return the value of the expression.
Definition at line 12273 of file SemaExpr.cpp.
References Context, clang::frontend::CPlusPlus11, clang::Expr::EvalStatus::Diag, Diag(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), clang::Sema::VerifyICEDiagnoser::diagnoseNotICE(), E, clang::Expr::EvaluateAsRValue(), clang::Expr::EvaluateKnownConstInt(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::APValue::getInt(), getLangOpts(), clang::Decl::getLocation(), clang::Expr::getType(), clang::Expr::EvalStatus::HasSideEffects, clang::Type::isEnumeralType(), clang::APValue::isInt(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Note, PerformContextualImplicitConversion(), clang::Sema::VerifyICEDiagnoser::Suppress, and clang::Expr::EvalResult::Val.
Referenced by ActOnCXXNew(), AddAlignedAttr(), AddAlignValueAttr(), BuildStaticAssertDeclaration(), CheckArrayDesignatorExpr(), checkExceptionSpecification(), EvaluateArrayTypeTrait(), isArraySizeVLA(), and VerifyIntegerConstantExpression().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result, | ||
| unsigned | DiagID, | ||
| bool | AllowFold = true |
||
| ) |
Definition at line 12248 of file SemaExpr.cpp.
References Diag(), and VerifyIntegerConstantExpression().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result = nullptr |
||
| ) |
Definition at line 12236 of file SemaExpr.cpp.
References Diag(), LangOpts, and VerifyIntegerConstantExpression().
| void Sema::WarnConflictingTypedMethods | ( | ObjCMethodDecl * | Method, |
| ObjCMethodDecl * | MethodDecl, | ||
| bool | IsProtocolMethodDecl | ||
| ) |
Definition at line 2439 of file SemaDeclObjC.cpp.
References checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Diag(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by MatchAllMethodDeclarations().
| void Sema::WarnExactTypedMethods | ( | ObjCMethodDecl * | ImpMethodDecl, |
| ObjCMethodDecl * | MethodDecl, | ||
| bool | IsProtocolMethodDecl | ||
| ) |
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration.
Definition at line 2490 of file SemaDeclObjC.cpp.
References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Context, Diag(), clang::NamedDecl::getDeclName(), clang::ObjCMethodDecl::getImplementationControl(), clang::Decl::getLocation(), clang::GetNullarySelector(), clang::ObjCMethodDecl::getSelector(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isVariadic(), clang::ast_matchers::match(), clang::ObjCMethodDecl::Optional, clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().
Referenced by MatchAllMethodDeclarations().
|
inline |
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
Definition at line 1209 of file Sema.h.
References WeakTopLevelDecl.
Referenced by clang::ParseAST().
|
friend |
|
friend |
| bool clang::Sema::AccessCheckingSFINAE |
When true, access checking violations are treated as SFINAE failures rather than hard errors.
Definition at line 5495 of file Sema.h.
Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().
| SmallVector<Module*, 16> clang::Sema::ActiveTemplateInstantiationLookupModules |
Extra modules inspected when performing a lookup during a template instantiation.
Computed lazily.
Definition at line 6605 of file Sema.h.
Referenced by clang::Sema::InstantiatingTemplate::Clear().
| SmallVector<ActiveTemplateInstantiation, 16> clang::Sema::ActiveTemplateInstantiations |
List of active template instantiations.
This vector is treated as a stack. As one template instantiation requires another template instantiation, additional instantiations are pushed onto the stack up to a user-configurable limit LangOptions::InstantiationDepth.
Definition at line 6601 of file Sema.h.
Referenced by BuildCXXNoexceptExpr(), BuildDecltypeType(), CheckFriendTypeDecl(), CheckLiteralOperatorDeclaration(), CheckMoveOnConstruction(), CheckTemplateSpecializationScope(), clang::Sema::InstantiatingTemplate::Clear(), diagnoseAndRemoveTypeQualifiers(), DiagnoseSelfAssignment(), DiagnoseTwoPhaseLookup(), EmitCurrentDiagnostic(), getCurBlock(), getCurLambda(), GetFullTypeForDeclarator(), handleNonNullAttr(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), isSFINAEContext(), makeUnavailableInSystemHeader(), MarkFunctionReferenced(), PrintInstantiationStack(), SemaBuiltinSEHScopeCheck(), SubstFunctionDeclType(), SubstParmTypes(), SubstType(), and warnBracedScalarInit().
| bool clang::Sema::AllowAbstractFieldReference |
| sema::AnalysisBasedWarnings clang::Sema::AnalysisWarnings |
Worker object for performing CFG-based warnings.
Definition at line 6891 of file Sema.h.
Referenced by PopFunctionScopeInfo(), and PrintStats().
| int clang::Sema::ArgumentPackSubstitutionIndex |
The current index into pack expansion arguments that will be used for substitution of parameter packs.
The pack expansion index will be -1 to indicate that parameter packs should be instantiated as themselves. Otherwise, the index specifies which argument within the parameter pack will be used for substitution.
Definition at line 6644 of file Sema.h.
Referenced by clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII(), FindInstantiatedDecl(), and getPackSubstitutedTemplateArgument().
| ObjCMethodDecl* clang::Sema::ArrayWithObjectsMethod |
| PragmaStack<StringLiteral *> clang::Sema::BSSSegStack |
Definition at line 386 of file Sema.h.
Referenced by ActOnPragmaMSSeg().
| llvm::BumpPtrAllocator clang::Sema::BumpAlloc |
Definition at line 919 of file Sema.h.
Referenced by addMethodToGlobalList(), CreateParsedType(), LookupSpecialMember(), and PrintStats().
| RecordDecl* clang::Sema::CFError = nullptr |
The struct behind the CFErrorRef pointer.
Definition at line 9184 of file Sema.h.
Referenced by classifyPointerDeclarator().
| CodeCompleteConsumer* clang::Sema::CodeCompleter |
Code-completion consumer.
Definition at line 304 of file Sema.h.
Referenced by CodeCompleteOverloadResults().
| PragmaStack<StringLiteral *> clang::Sema::CodeSegStack |
Definition at line 388 of file Sema.h.
Referenced by ActOnPragmaMSSeg().
| bool clang::Sema::CollectStats |
Flag indicating whether or not to collect detailed statistics.
Definition at line 301 of file Sema.h.
Referenced by clang::ParseAST().
| PragmaStack<StringLiteral *> clang::Sema::ConstSegStack |
Definition at line 387 of file Sema.h.
Referenced by ActOnPragmaMSSeg().
| ASTConsumer& clang::Sema::Consumer |
Definition at line 296 of file Sema.h.
Referenced by ActOnAtEnd(), ActOnEndOfTranslationUnit(), ActOnModuleInclude(), ActOnPragmaDetectMismatch(), ActOnPragmaMSComment(), CorrectTypo(), CorrectTypoDelayed(), createImplicitModuleImportForErrorRecovery(), DefineUsedVTables(), getASTConsumer(), Initialize(), InstantiateClass(), InstantiateClassMembers(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), MarkFunctionReferenced(), ReferenceDllExportedMethods(), RequireCompleteType(), and ~Sema().
| ASTContext& clang::Sema::Context |
Definition at line 295 of file Sema.h.
Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnArrayTypeTrait(), ActOnAtEnd(), ActOnClassMessage(), ActOnClassPropertyRefExpr(), ActOnComment(), ActOnCompatibilityAlias(), ActOnConversionDeclarator(), ActOnCUDAExecConfigExpr(), ActOnCXXDelete(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnCXXTypeConstructExpr(), ActOnDecltypeExpression(), ActOnDefs(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnFileScopeAsmDecl(), ActOnFinishFullExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnInstanceMessage(), ActOnMemInitializer(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnNamespaceAliasDef(), ActOnObjCBoolLiteral(), ActOnObjCBridgedCast(), ActOnObjCInstanceType(), actOnObjCProtocolQualifierType(), actOnObjCTypeArgsAndProtocolQualifiers(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), actOnObjCTypeParamList(), ActOnOpenMPAlignedClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPBarrierDirective(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCaptureClause(), ActOnOpenMPCollapseClause(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDefaultClause(), ActOnOpenMPDependClause(), ActOnOpenMPDeviceClause(), ActOnOpenMPDistributeDirective(), ActOnOpenMPFinalClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPGrainsizeClause(), ActOnOpenMPHintClause(), ActOnOpenMPIdExpression(), ActOnOpenMPIfClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPMapClause(), ActOnOpenMPMasterDirective(), ActOnOpenMPMergeableClause(), ActOnOpenMPNogroupClause(), ActOnOpenMPNowaitClause(), ActOnOpenMPNumTasksClause(), ActOnOpenMPNumTeamsClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPOrderedClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPriorityClause(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReadClause(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionStart(), ActOnOpenMPSafelenClause(), ActOnOpenMPScheduleClause(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSeqCstClause(), ActOnOpenMPSharedClause(), ActOnOpenMPSIMDClause(), ActOnOpenMPSimdDirective(), ActOnOpenMPSimdlenClause(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTaskyieldDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPThreadLimitClause(), ActOnOpenMPThreadsClause(), ActOnOpenMPUntiedClause(), ActOnOpenMPUpdateClause(), ActOnOpenMPWriteClause(), ActOnParamDefaultArgumentError(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaWeakID(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnSuperClassOfClassInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnTypeTrait(), ActOnUsingDirective(), AddAlignedAttr(), AddAlignmentAttributesForRecord(), AddAlignValueAttr(), addAsFieldToClosureType(), AddAssumeAlignedAttr(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), AddBuiltinCandidate(), AddBuiltinOperatorCandidates(), AddCFAuditedAttribute(), AddConversionCandidate(), AddFunctionCandidates(), addFunctionPointerConversion(), addImplicitTypedef(), AddLaunchBoundsAttr(), AddMemberOperatorCandidates(), AddMethodTemplateCandidate(), AddMsStructLayoutForRecord(), AddOptnoneAttributeIfNoConflicts(), AddOverloadCandidate(), AddPropertyAttrs(), AddPushedVisibilityAttribute(), AddSuperSendCompletion(), AddSurrogateCandidate(), AddTemplateConversionCandidate(), AddTemplateOverloadCandidate(), addThisCompletion(), adjustBlockReturnsToEnum(), adjustCCAndNoReturn(), AdjustFunctionParmAndArgTypesForDeduction(), adjustMemberFunctionCC(), applyObjCProtocolQualifiers(), applyObjCTypeArgs(), AttachBaseSpecifiers(), attemptRecovery(), BuildArrayType(), BuildArrayTypeTrait(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockPointerType(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildClassMessageImplicit(), buildCoawaitCalls(), BuildCookedLiteralOperatorCall(), BuildCounterInit(), BuildCounterUpdate(), BuildCStyleCastExpr(), BuildCXXCastArgument(), BuildCXXFoldExpr(), BuildCXXFunctionalCastExpr(), BuildCXXMemberCallExpr(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXTypeConstructExpr(), buildDeclRefExpr(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExpressionTrait(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFloatingLiteral(), BuildForRangeBeginEndCall(), BuildFunctionType(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildMemberInitializer(), BuildMemberPointerType(), buildMemcpyForAssignmentOp(), BuildMemInitializer(), BuildMSPropertyRefExpr(), buildNestedType(), BuildObjCBridgedCast(), BuildObjCEncodeExpression(), BuildObjCExceptionDecl(), BuildOverloadedArrowExpr(), buildOverloadedCallSet(), BuildParenType(), BuildPipeType(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildQualifiedType(), BuildReferenceType(), buildSingleCopyAssign(), buildSingleCopyAssignRecursively(), BuildStdInitializerList(), BuildTypeofExprType(), BuildTypeTrait(), BuildUnaryTransformType(), BuildUsingDeclaration(), BuildUsingShadowDecl(), buildVarDecl(), BuildVariableInstantiation(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::canCalleeThrow(), clang::canTypeidThrow(), captureInBlock(), captureInCapturedRegion(), captureInLambda(), captureThis(), CastForMoving(), CastsAwayConstness(), checkAddressOfFunctionIsAvailable(), CheckAlignasUnderalignment(), CheckAllocatedType(), CheckARCMethodDecl(), checkARCPropertyImpl(), CheckAsmLValue(), CheckBaseSpecifier(), checkBlockPointerTypesForAssignment(), checkBuiltinArgument(), CheckCallingConvAttr(), CheckCaseExpression(), checkClassLevelDLLAttribute(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConditionVariable(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), checkCoroutineContext(), CheckCXXThisCapture(), CheckDerivedToBaseConversion(), CheckDestructor(), CheckDestructorDeclarator(), checkDLLAttributeRedeclaration(), CheckEnableIf(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitlyDefaultedMemberExceptionSpec(), CheckExplicitlyDefaultedSpecialMember(), CheckExtVectorComponent(), CheckForIncompatibleAttributes(), checkFormatStringExpr(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckForReference(), checkFunctionOrMethodParameterIndex(), checkGlobalOrExternCConflict(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckImplementationIvars(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), checkIntToPointerCast(), CheckKeyForObjCARCConversion(), checkLaunchBoundsArgument(), CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMoveOnConstruction(), CheckNonNullArguments(), CheckNonNullExpr(), checkNullabilityConsistency(), checkNullabilityTypeSpecifier(), CheckObjCARCConversion(), CheckObjCARCUnavailableWeakConversion(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), checkObjCKindOfType(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCPointerTypesForAssignment(), CheckObjCPropertyAttributes(), CheckOMPThreadPrivateDecl(), checkOpenCLVectorShift(), CheckOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckPackExpansion(), CheckPlaceholderExpr(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckRealImagOperand(), CheckRegparmAttr(), checkSectionName(), checkSimdlenSafelenValues(), CheckSpecifiedExceptionType(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkTrivialClassMembers(), checkTypeParamListConsistency(), checkUInt32Argument(), CheckUnaryTypeTraitTypeCompleteness(), checkUnknownAnyArg(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), checkVectorResult(), CloneDesignatedInitExpr(), CollectFieldInitializer(), CollectIvarsToConstructOrDestruct(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), computeDeclContext(), ComputeDefaultedDefaultCtorExceptionSpec(), ComputeInheritingCtorExceptionSpec(), ConvertDeclSpecToType(), ConvertDeducedTemplateArgument(), CopyObject(), clang::CodeCompletionResult::CreateCodeCompletionString(), CreateFunctionRefExpr(), CreateNewFunctionDecl(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CreatePropertyDecl(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), CXXCheckConditionalOperands(), CXXRecordMembersNamed(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DeclApplyPragmaWeak(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitDefaultConstructor(), DeduceAutoType(), DeduceFromInitializerList(), DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), defaultedSpecialMemberIsConstexpr(), DefaultSynthesizeProperties(), DefineImplicitDefaultConstructor(), DelayDependentAccess(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArrayStarInParamType(), DiagnoseAssignmentResult(), DiagnoseBadAccess(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCastOfObjCSEL(), DiagnoseDirectIsaAccess(), DiagnoseEqualityWithExtraParens(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseInvalidRedeclaration(), diagnoseListInit(), DiagnoseNarrowingInInitList(), DiagnoseNontrivial(), diagnoseNoViableConversion(), diagnoseNullableToNonnullConversion(), diagnoseObjCARCConversion(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), DiagnoseReinterpretUpDownCast(), DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), DiagnoseUseOfUnimplementedSelectors(), doesUsualArrayDeleteWantSize(), DoMarkVarDeclReferenced(), EmitCurrentDiagnostic(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), ExpandAnonymousFieldDesignator(), ExtractUnqualifiedFunctionType(), filterNonConflictingPreviousTypedefDecls(), FindAllocationFunctions(), FindAssociatedClassesAndNamespaces(), FindBaseInitializer(), findCapturingExpr(), FindCompositePointerType(), FindInstantiatedDecl(), FindUsualDeallocationFunction(), clang::DeclSpec::Finish(), FinishTemplateArgumentDeduction(), FinishTemplateArgumentDeduction(), FitsInto(), FixOverloadedFunctionReference(), getAmbiguousPathsDisplayString(), getASTContext(), getBaseMessageSendResultType(), getCCForDeclaratorChunk(), getCompletionPrintingPolicy(), clang::TypoCorrectionConsumer::getContext(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), getDefaultArgExprsForConstructors(), GetDiagForGotoScopeDecl(), getElaboratedType(), getFloat128Identifier(), GetFullTypeForDeclarator(), getGenericLambdaTemplateParameterList(), getImplicitMethodEPI(), getMessageSendResultType(), getMoreSpecializedPartialSpecialization(), getNSNumberFactoryMethod(), getObjCMessageKind(), getOrCreateStdNamespace(), getParamType(), getPrintingPolicy(), getStdBadAlloc(), getStdNamespace(), getSuperIdentifier(), getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), GetTypeForDeclaratorCast(), GetTypeOfFunction(), GetTypeSourceInfoForDeclarator(), getUndefinedButUsed(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleComplexFloatConversion(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDestructorAttr(), handleDisableTailCallsAttr(), handleDLLAttr(), handleEnableIfAttr(), handleExclusiveTrylockFunctionAttr(), HandleExprPropertyRefExpr(), handleFallThroughAttr(), handleFloatConversion(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleIntegerConversion(), handleInterruptAttr(), handleIntToFloatConversion(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLoopHintAttr(), handleMipsInterruptAttr(), handleModeAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNotTailCalledAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBoxable(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCGCTypeAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), HandlePropertyInClassExtension(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), handleTargetAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), hasDeducibleTemplateParameters(), hasVisibleDefaultArgument(), hasVisibleDefinition(), IgnoredValueConversions(), ImpCastExprToType(), inferARCLifetimeForPointee(), inferARCWriteback(), inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), InjectAnonymousStructOrUnionMembers(), InstantiateAttrs(), InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isAbstractType(), isAcceptableNestedNameSpecifier(), isAllowableExplicitConversion(), isAtLeastAsSpecializedAs(), IsCXXRecordForMappable(), isEquivalentInternalLinkageDeclaration(), isForbiddenTypeAllowed(), isFunctionDefinitionDiscarded(), IsInitializerListConstructorConversion(), isKnownName(), isLibstdcxxEagerExceptionSpecHack(), IsNonNegativeIntegerValue(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isPermittedNeonBaseType(), isSameOrCompatibleFunctionType(), IsStandardConversion(), IsUserDefinedConversion(), isValidSubjectOfNSAttribute(), IsVectorConversion(), LookupBuiltin(), LookupConstructors(), LookupDirect(), LookupInSuper(), LookupLiteralOperator(), LookupMemberExpr(), LookupMethodInReceiverType(), LookupObjCInterfaceDeclForLiteral(), LookupOrCreateLabel(), LookupOverloadedOperatorName(), LookupPredefedObjCSuperType(), lookupPromiseType(), LookupSpecialMember(), LookupVisibleDecls(), LookupVisibleDecls(), makeUnavailableInSystemHeader(), MarkBaseAndMemberDestructorsReferenced(), MarkDeclarationsReferencedInType(), MarkDeducedTemplateParameters(), MarkFunctionReferenced(), MarkUsedTemplateParameters(), clang::MarkVarDeclODRUsed(), MatchesFriend(), MatchTemplateParameterKind(), MatchTwoMethodDeclarations(), MaybeAddOverrideCalls(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), mergeAlignedAttrs(), mergeAlwaysInlineAttr(), mergeAvailabilityAttr(), mergeCommonAttr(), mergeDeclAttribute(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeFormatAttr(), mergeInterfaceMethodToImpl(), mergeInternalLinkageAttr(), mergeMinSizeAttr(), mergeMSInheritanceAttr(), mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), mergeParamDeclTypes(), mergeSectionAttr(), mergeTypeNullabilityForRedecl(), MergeVarDeclExceptionSpecs(), mergeVisibilityAttr(), MightInstantiateTo(), NoteAllOverloadCandidates(), NoteSurrogateCandidate(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), parseModeAttrArg(), ParseObjCEncodeExpression(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), PDiag(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), performLambdaVarCaptureInitialization(), PerformObjectArgumentInitialization(), PrintInstantiationStack(), ProcessDeclAttribute(), ProcessPropertyDecl(), PushCapturedRegionScope(), RebuildDeclaratorInCurrentInstantiation(), recordConversion(), recoverFromTypeInKnownDependentBase(), RequireCompleteDeclContext(), RequireLiteralType(), RequireNonAbstractType(), ResolveAddressOfOverloadedFunction(), ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), ResolveSingleFunctionTemplateSpecialization(), SaveNestedNameSpecifierAnnotation(), Sema(), SemaBuiltinCallWithStaticChain(), SemaBuiltinCpuSupports(), SemaBuiltinMemChkCall(), SetCtorInitializers(), SetDelegatingInitializer(), SetIvarInitializers(), SetParamDefaultArgument(), ShouldDeleteSpecialMember(), ShouldDiagnoseSwitchCaseNotInEnum(), ShouldRemoveFromUnused(), ShouldTryAgainWithRedefinitionType(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), SpecialMemberIsTrivial(), stripARCUnbridgedCast(), SubstAutoWithinFunctionReturnType(), SubstBaseSpecifiers(), SubstFunctionDeclType(), SubstituteExplicitTemplateArguments(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), SubstType(), threadSafetyCheckIsSmartPointer(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), translateTemplateArgument(), tryCaptureVariable(), TryClassUnification(), TryConstCast(), TryContextuallyConvertToBool(), TryContextuallyConvertToObjCPointer(), TryDefaultInitialization(), TryDiagnoseProtectedAccess(), tryExprAsCall(), TryImplicitConversion(), TryInitializerListConstruction(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UnifySection(), UpdateExceptionSpec(), UpdateMarkingForLValueToRValue(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), WarnExactTypedMethods(), WidenIterationCount(), clang::ASTWriter::WriteAST(), and ~Sema().
| DeclContext* clang::Sema::CurContext |
CurContext - This is the current declaration context of parsing.
Definition at line 307 of file Sema.h.
Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAtEnd(), ActOnCompatibilityAlias(), ActOnCXXMemberDeclarator(), ActOnEmptyDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFileScopeAsmDecl(), ActOnFinishCXXMemberDecls(), ActOnFinishFullExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMethodDeclaration(), ActOnModuleBegin(), ActOnModuleEnd(), ActOnModuleImport(), ActOnModuleInclude(), ActOnNamespaceAliasDef(), actOnObjCTypeParam(), ActOnOpenMPAtomicDirective(), ActOnOpenMPDependClause(), ActOnOpenMPDistributeDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPSimdDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPThreadprivateDirective(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnTemplatedFriendTag(), ActOnUsingDirective(), AddClassMessageCompletions(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverloadCandidate(), BuildBaseInitializer(), BuildCallToMemberFunction(), BuildCXXNestedNameSpecifier(), BuildDelegatingInitializer(), BuildExceptionDeclaration(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildObjCExceptionDecl(), buildOverloadedCallSet(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), BuildUsingDeclaration(), BuildUsingShadowDecl(), buildVarDecl(), CheckAccess(), checkCoroutineContext(), CheckExplicitInstantiationScope(), CheckFriendTypeDecl(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckInheritingConstructorUsingDecl(), CheckNakedParmReference(), CheckObjCDeclScope(), CheckOpenMPIterationSpace(), CheckOpenMPLoop(), CheckTemplateSpecializationScope(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), clang::Sema::ContextRAII::ContextRAII(), CreateNewFunctionDecl(), DeclApplyPragmaWeak(), clang::InitializationSequence::Diagnose(), DiagnoseBadTarget(), diagnoseMisplacedModuleImport(), DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReference(), DoMarkVarDeclReferenced(), EmitRelatedResultTypeNoteForReturn(), FindDeallocationFunction(), FindInstantiatedDecl(), FindUsualDeallocationFunction(), FinishForRangeVarDecl(), getCurBlock(), getCurLambda(), getCurLexicalContext(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getFunctionLevelDeclContext(), getFunctionStorageClass(), getNullabilityCompletenessCheckFileID(), getObjCContainerKind(), getObjCDeclContext(), HandlePropertyInClassExtension(), InstantiateMemInitializers(), clang::isBetterOverloadCandidate(), isCurrentClassName(), isCurrentClassNameTypo(), isLibstdcxxEagerExceptionSpecHack(), IsPotentiallyEvaluatedContext(), isReferenceToNonConstCapture(), isSelfExpr(), LookupMethodInReceiverType(), LookupOrCreateLabel(), makeUnavailableInSystemHeader(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkVTableUsed(), MaybeAddOverrideCalls(), performLambdaVarCaptureInitialization(), clang::Sema::ContextRAII::pop(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), ShouldEnterDeclaratorScope(), SubstParmVarDecl(), tryCaptureVariable(), TryTypoCorrectionForCall(), and warnAboutAmbiguousFunction().
| StringLiteral* clang::Sema::CurInitSeg |
Last section used with #pragma init_seg.
Definition at line 394 of file Sema.h.
Referenced by ActOnPragmaMSInitSeg().
| SourceLocation clang::Sema::CurInitSegLoc |
Definition at line 395 of file Sema.h.
Referenced by ActOnPragmaMSInitSeg().
| LocalInstantiationScope* clang::Sema::CurrentInstantiationScope |
The current instantiation scope used to store local variables.
Definition at line 6873 of file Sema.h.
Referenced by BuildVariableInstantiation(), CheckParameterPacksForExpansion(), clang::LocalInstantiationScope::cloneScopes(), clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::LocalInstantiationScope::Exit(), FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), getNumArgumentsInExpansion(), InstantiateAttrs(), InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::LocalInstantiationScope::LocalInstantiationScope(), RebuildLambdaScopeInfo(), clang::TemplateDeclInstantiator::SubstFunctionType(), SubstituteExplicitTemplateArguments(), and SubstParmVarDecl().
| SmallVector<Scope*, 2> clang::Sema::CurrentSEHFinally |
Stack of active SEH __finally scopes. Can be empty.
Definition at line 356 of file Sema.h.
Referenced by CheckJumpOutOfSEHFinally().
| QualType clang::Sema::CXXThisTypeOverride |
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function.
In such cases, this provides the type used for 'this'.
Definition at line 4579 of file Sema.h.
Referenced by ClassifyImplicitMemberAccess(), clang::Sema::ContextRAII::ContextRAII(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), isThisOutsideMemberFunctionBody(), clang::Sema::ContextRAII::pop(), and clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII().
| RecordDecl* clang::Sema::CXXTypeInfoDecl |
| PragmaStack<StringLiteral *> clang::Sema::DataSegStack |
Definition at line 385 of file Sema.h.
Referenced by ActOnPragmaMSSeg().
| std::vector<NamedDecl*> clang::Sema::DeclsInPrototypeScope |
List of decls defined in a function prototype.
This contains EnumConstants that incorrectly end up in translation unit scope because there is no function to pin them on. ActOnFunctionDeclarator reads this list and patches them into the FunctionDecl.
| SmallVector<std::pair<CXXMethodDecl*, const FunctionProtoType*>, 2> clang::Sema::DelayedDefaultedMemberExceptionSpecs |
All the members seen during a class definition which were both explicitly defaulted and had explicitly-specified exception specifications, along with the function type containing their user-specified exception specification.
Those exception specifications were overridden with the default specifications, but we still need to check whether they are compatible with the default specification, and we can't do that until the nesting set of class definitions is complete.
Definition at line 517 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckExplicitlyDefaultedSpecialMember().
| SmallVector<CXXRecordDecl*, 4> clang::Sema::DelayedDllExportClasses |
Definition at line 9234 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXNonNestedClass(), and checkClassLevelDLLAttribute().
| SmallVector<std::pair<const CXXMethodDecl*, const CXXMethodDecl*>, 2> clang::Sema::DelayedExceptionSpecChecks |
All the overriding functions seen during a class definition that had their exception spec checks delayed, plus the overridden function.
Definition at line 507 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckOverridingFunctionExceptionSpec().
| DelegatingCtorDeclsType clang::Sema::DelegatingCtorDecls |
All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.
Definition at line 501 of file Sema.h.
Referenced by CheckDelegatingCtorCycles(), and SetDelegatingInitializer().
| llvm::MapVector<FieldDecl *, DeleteLocs> clang::Sema::DeleteExprs |
Definition at line 464 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and getMismatchingDeleteExpressions().
| DiagnosticsEngine& clang::Sema::Diags |
Definition at line 297 of file Sema.h.
Referenced by ActOnCXXMemberDeclarator(), ActOnEndOfTranslationUnit(), ActOnFriendFunctionDecl(), applyCocoaAPICheck(), BuildCXXMemberCallExpr(), BuildInstanceMessage(), CheckCompatibleReinterpretCast(), CheckConstexprFunctionBody(), CheckCXX98CompatAccessibleCopy(), CheckForDuplicateEnumValues(), CheckProtocolMethodDefs(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), Diag(), DiagnoseAbstractType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseBadFunctionCast(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseForRangeVariableCopies(), DiagnoseHiddenVirtualMethods(), DiagnoseMismatchedSelectors(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseUnusedBackingIvarInAccessor(), EmitCurrentDiagnostic(), FindInstantiatedDecl(), getDiagnostics(), getNullabilityCompletenessCheckFileID(), LookupMemberExpr(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::OverloadCandidateSet::NoteCandidates(), noteOverloads(), PrintInstantiationStack(), ReferenceDllExportedMethods(), and Sema().
| ObjCMethodDecl* clang::Sema::DictionaryWithObjectsMethod |
| bool clang::Sema::DisableTypoCorrection |
Tracks whether we are in a context where typo correction is disabled.
Definition at line 6877 of file Sema.h.
Referenced by clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope(), and clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope().
| SmallVector<BlockDecl*, 8> clang::Sema::ExprCleanupObjects |
ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.
The element type here is ExprWithCleanups::Object.
Definition at line 418 of file Sema.h.
Referenced by DiscardCleanupsInEvaluationContext(), MaybeCreateExprWithCleanups(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().
| SmallVector<ExpressionEvaluationContextRecord, 8> clang::Sema::ExprEvalContexts |
A stack of expression evaluation contexts.
Definition at line 860 of file Sema.h.
Referenced by ActOnDecltypeExpression(), CheckCallReturnType(), ClassifyImplicitMemberAccess(), CorrectDelayedTyposInExpr(), CorrectTypoDelayed(), DiagRuntimeBehavior(), DiscardCleanupsInEvaluationContext(), IsPotentiallyEvaluatedContext(), isUnevaluatedContext(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), Sema(), and TransformToPotentiallyEvaluated().
| bool clang::Sema::ExprNeedsCleanups |
ExprNeedsCleanups - True if the current evaluation context requires cleanups to be run at its conclusion.
Definition at line 413 of file Sema.h.
Referenced by ActOnDecltypeExpression(), BuildObjCBridgedCast(), checkIndirectCopyRestoreSource(), CheckObjCARCConversion(), DiscardCleanupsInEvaluationContext(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), clang::InitializationSequence::Perform(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().
| llvm::DenseMap<IdentifierInfo*,AsmLabelAttr*> clang::Sema::ExtnameUndeclaredIdentifiers |
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
Used in Solaris system headers to define functions that occur in multiple standards to call the version in the currently selected standard.
Definition at line 662 of file Sema.h.
Referenced by ActOnPragmaRedefineExtname().
| ExtVectorDeclsType clang::Sema::ExtVectorDecls |
ExtVectorDecls - This is a list all the extended vector types.
This allows us to associate a raw vector type with one of the ext_vector type names. This is only necessary for issuing pretty diagnostics.
Definition at line 443 of file Sema.h.
Referenced by CheckExtVectorComponent(), and handleExtVectorTypeAttr().
| std::unique_ptr<CXXFieldCollector> clang::Sema::FieldCollector |
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
Definition at line 446 of file Sema.h.
Referenced by ActOnCXXMemberDeclarator(), ActOnFinishCXXMemberSpecification(), and Sema().
|
mutable |
A cache of the flags available in enumerations with the flag_bits attribute.
Definition at line 908 of file Sema.h.
Referenced by IsValueInFlagEnum().
| FPOptions clang::Sema::FPFeatures |
Definition at line 291 of file Sema.h.
Referenced by ActOnPragmaFPContract(), CreateOverloadedBinOp(), getFPOptions(), and clang::Sema::FPContractStateRAII::~FPContractStateRAII().
| SmallVector<sema::FunctionScopeInfo *, 4> clang::Sema::FunctionScopes |
Stack containing information about each of the nested function, block, and method scopes that are currently active.
This array is never empty. Clients should ignore the first element, which is used to cache a single FunctionScopeInfo that's used to parse every top-level function.
Definition at line 434 of file Sema.h.
Referenced by CheckCXXThisCapture(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DiagnoseUnexpandedParameterPacks(), DiagRuntimeBehavior(), getCurBlock(), getCurCapturedRegion(), getCurFunction(), getCurLambda(), getEnclosingFunction(), isUnexpandedParameterPackPermitted(), PopFunctionScopeInfo(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), Sema(), tryCaptureVariable(), and ~Sema().
| bool clang::Sema::GlobalNewDeleteDeclared |
A flag to remember whether the implicit forms of operator new and delete have been declared.
Definition at line 752 of file Sema.h.
Referenced by DeclareGlobalNewDelete().
| IdentifierResolver clang::Sema::IdResolver |
Definition at line 675 of file Sema.h.
Referenced by ActOnDelayedCXXMethodParameter(), ActOnMethodDeclaration(), ActOnObjCExceptionDecl(), ActOnReenterCXXMethodParameter(), ActOnReenterTemplateScope(), addImplicitTypedef(), DeclareGlobalAllocationFunction(), HideUsingShadowDecl(), Initialize(), and popObjCTypeParamList().
| SourceLocation clang::Sema::ImplicitMSInheritanceAttrLoc |
Source location for newly created implicit MSInheritanceAttrs.
Definition at line 359 of file Sema.h.
Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().
| bool clang::Sema::InNonInstantiationSFINAEContext |
Whether we are in a SFINAE context that is not associated with template instantiation.
This is used when setting up a SFINAE trap (see SFINAETrap) outside of a template instantiation or template argument deduction.
Definition at line 6622 of file Sema.h.
Referenced by clang::Sema::InstantiatingTemplate::Clear(), isSFINAEContext(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().
| bool clang::Sema::IsBuildingRecoveryCallExpr |
Flag indicating if Sema is building a recovery call expression.
This flag is used to avoid building recovery call expressions if Sema is already doing so, which would cause infinite recursions.
Definition at line 409 of file Sema.h.
Referenced by BuildRecoveryCallExpr().
| const LangOptions& clang::Sema::LangOpts |
Definition at line 293 of file Sema.h.
Referenced by ActOnAtEnd(), ActOnComment(), ActOnDefs(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnMethodDeclaration(), ActOnOpenMPLinearClause(), ActOnPragmaMSVtorDisp(), applyCocoaAPICheck(), BuildDelegatingInitializer(), checkArithmeticOnObjCPointer(), CheckExtensionTraitOperandType(), CheckImplementationIvars(), CheckObjCTraitOperandConstraints(), DefaultSynthesizeProperties(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), DiagnoseUnimplementedAccessor(), getFixItZeroInitializerForType(), getLangOpts(), getScalarZeroExpressionForType(), handleCommonAttr(), handleMSInheritanceAttr(), handleUuidAttr(), ImplMethodsVsClassMethods(), isArraySizeVLA(), IsOpenMPCapturedByRef(), IsOpenMPCapturedVar(), isOpenMPPrivateVar(), isOpenMPTargetCapturedVar(), MarkFunctionReferenced(), ShouldDeleteSpecialMember(), tryCaptureVariable(), VerifyIntegerConstantExpression(), and warnAboutAmbiguousFunction().
| ActiveTemplateInstantiation clang::Sema::LastTemplateInstantiationErrorContext |
The last template from which a template instantiation error or warning was produced.
This value is used to suppress printing of redundant template instantiation backtraces when there are multiple errors in the same instantiation. FIXME: Does this belong in Sema? It's tough to implement it anywhere else.
Definition at line 6636 of file Sema.h.
Referenced by EmitCurrentDiagnostic().
| LateParsedTemplateMapT clang::Sema::LateParsedTemplateMap |
Definition at line 521 of file Sema.h.
Referenced by InstantiateFunctionDefinition(), and ~Sema().
| LateTemplateParserCB* clang::Sema::LateTemplateParser |
Definition at line 526 of file Sema.h.
Referenced by InstantiateFunctionDefinition(), and SetLateTemplateParser().
| LateTemplateParserCleanupCB* clang::Sema::LateTemplateParserCleanup |
Definition at line 527 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and SetLateTemplateParser().
| llvm::DenseSet<Module*> clang::Sema::LookupModulesCache |
Cache of additional modules that should be used for name lookup within the current template instantiation.
Computed lazily; use getLookupModules() to get a complete set.
Definition at line 6610 of file Sema.h.
Referenced by clang::Sema::InstantiatingTemplate::Clear().
| llvm::SmallPtrSet<Expr*, 2> clang::Sema::MaybeODRUseExprs |
Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression.
This is cleared at the end of each full expression.
Definition at line 426 of file Sema.h.
Referenced by CleanupVarDeclMarking(), DiscardCleanupsInEvaluationContext(), DoMarkVarDeclReferenced(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), and UpdateMarkingForLValueToRValue().
| GlobalMethodPool clang::Sema::MethodPool |
Method Pool - allows efficient lookup when typechecking messages to "id".
We need to maintain a list, since selectors can have differing signatures across classes. In Cocoa, this happens to be extremely uncommon (only 1% of selectors are "overloaded"). At the head of the list it is recorded whether there were 0, 1, or >= 2 methods inside categories with a particular selector.
Definition at line 962 of file Sema.h.
Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CheckObjCMethodOverrides(), CollectMultipleMethodsInGlobalPool(), DiagnoseMismatchedSelectors(), LookupImplementedMethodInGlobalPool(), moveMethodToBackOfGlobalList(), clang::ASTReader::ReadMethodPool(), and SelectorsForTypoCorrection().
| unsigned clang::Sema::MSAsmLabelNameCounter |
| LangOptions::PragmaMSPointersToMembersKind clang::Sema::MSPointerToMemberRepresentationMethod |
Controls member pointer representation format under the MS ABI.
Definition at line 325 of file Sema.h.
Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().
| bool clang::Sema::MSStructPragmaOn |
Definition at line 321 of file Sema.h.
Referenced by ActOnPragmaMSStruct(), and AddMsStructLayoutForRecord().
| RecordDecl* clang::Sema::MSVCGuidDecl |
| unsigned clang::Sema::NonInstantiationEntries |
The number of ActiveTemplateInstantiation entries in ActiveTemplateInstantiations that are not actual instantiations and, therefore, should not be counted as part of the instantiation depth.
Definition at line 6627 of file Sema.h.
Referenced by clang::Sema::InstantiatingTemplate::Clear().
| std::unique_ptr<NSAPI> clang::Sema::NSAPIObj |
Caches identifiers/selectors for NSFoundation APIs.
Definition at line 700 of file Sema.h.
Referenced by ActOnAtEnd(), applyCocoaAPICheck(), CheckObjCCollectionLiteralElement(), GetNSMutableArrayArgumentIndex(), GetNSMutableDictionaryArgumentIndex(), getNSNumberFactoryMethod(), GetNSSetArgumentIndex(), hasIsEqualMethod(), LookupObjCInterfaceDeclForLiteral(), Sema(), and ValidateObjCLiteralInterfaceDecl().
| ObjCInterfaceDecl* clang::Sema::NSArrayDecl |
| ObjCInterfaceDecl* clang::Sema::NSDictionaryDecl |
| ObjCInterfaceDecl* clang::Sema::NSNumberDecl |
The declaration of the Objective-C NSNumber class.
Definition at line 703 of file Sema.h.
Referenced by getNSNumberFactoryMethod().
| ObjCMethodDecl* clang::Sema::NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods] |
The Objective-C NSNumber methods used to create NSNumber literals.
Definition at line 715 of file Sema.h.
Referenced by getNSNumberFactoryMethod(), and Sema().
| QualType clang::Sema::NSNumberPointer |
Pointer to NSNumber type (NSNumber *).
Definition at line 709 of file Sema.h.
Referenced by getNSNumberFactoryMethod().
| ObjCInterfaceDecl* clang::Sema::NSStringDecl |
| QualType clang::Sema::NSStringPointer |
| ObjCInterfaceDecl* clang::Sema::NSValueDecl |
| QualType clang::Sema::NSValuePointer |
| FileNullabilityMap clang::Sema::NullabilityMap |
A mapping that describes the nullability we've seen in each header file.
Definition at line 391 of file Sema.h.
Referenced by checkNullabilityConsistency(), checkNullabilityTypeSpecifier(), and GetFullTypeForDeclarator().
| unsigned clang::Sema::NumSFINAEErrors |
The number of SFINAE diagnostics that have been trapped.
Definition at line 922 of file Sema.h.
Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::hasErrorOccurred(), PrintStats(), and clang::Sema::SFINAETrap::~SFINAETrap().
| void* clang::Sema::OpaqueParser |
Definition at line 528 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), InstantiateFunctionDefinition(), and SetLateTemplateParser().
| OpenCLOptions clang::Sema::OpenCLFeatures |
Definition at line 290 of file Sema.h.
Referenced by getOpenCLOptions().
| SourceLocation clang::Sema::OptimizeOffPragmaLocation |
This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet.
If optimizations are currently "on", this is set to an invalid location.
Definition at line 403 of file Sema.h.
Referenced by ActOnPragmaOptimize(), AddRangeBasedOptnone(), and getOptimizeOffPragmaLocation().
| DeclContext* clang::Sema::OriginalLexicalContext |
Generally null except when we temporarily switch decl contexts, like in.
Definition at line 311 of file Sema.h.
Referenced by getCurLexicalContext().
| void* clang::Sema::PackContext |
PackContext - Manages the stack for #pragma pack.
An alignment of 0 indicates default alignment.
Definition at line 319 of file Sema.h.
Referenced by ActOnPragmaOptionsAlign(), ActOnPragmaPack(), AddAlignmentAttributesForRecord(), FreePackedContext(), and ~Sema().
| llvm::SmallPtrSet<const Decl*, 4> clang::Sema::ParsingInitForAutoVars |
ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer.
Definition at line 475 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and checkAttributesAfterMerging().
| std::deque<PendingImplicitInstantiation> clang::Sema::PendingInstantiations |
The queue of implicit template instantiations that are required but have not yet been performed.
Definition at line 6906 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), DoMarkVarDeclReferenced(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), MarkFunctionReferenced(), PerformPendingInstantiations(), and clang::Sema::SavePendingInstantiationsAndVTableUsesRAII::SavePendingInstantiationsAndVTableUsesRAII().
| std::deque<PendingImplicitInstantiation> clang::Sema::PendingLocalImplicitInstantiations |
The queue of implicit template instantiations that are required and must be performed within the current local scope.
This queue is only used for member functions of local classes in templates, which must be instantiated in the same scope as their enclosing function, so that they can reference function-local types, static variables, enumerators, etc.
Definition at line 6946 of file Sema.h.
Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), PerformPendingInstantiations(), clang::Sema::SavePendingLocalImplicitInstantiationsRAII::SavePendingLocalImplicitInstantiationsRAII(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| Preprocessor& clang::Sema::PP |
Definition at line 294 of file Sema.h.
Referenced by ActOnClassPropertyRefExpr(), ActOnEndOfTranslationUnit(), AddCFAuditedAttribute(), AddOrdinaryNameResults(), buildMemberCall(), BuildNonArrayForRange(), buildVarDecl(), checkCoroutineContext(), clang::CodeCompletionResult::CreateCodeCompletionString(), DeclareGlobalNewDelete(), DiagnoseOwningPropertyGetterSynthesis(), getCompletionPrintingPolicy(), GetFullTypeForDeclarator(), clang::arcmt::trans::getNilString(), getNSErrorIdent(), getNullabilityKeyword(), getOrCreateStdNamespace(), getPreprocessor(), getPrintingPolicy(), HandleExprPropertyRefExpr(), handleOwnershipAttr(), Initialize(), isMacroDefined(), isStdInitializerList(), LookupMemberExpr(), lookupPromiseType(), LookupStdInitializerList(), and clang::ASTWriter::WriteAST().
| std::unique_ptr<RecordDeclSetTy> clang::Sema::PureVirtualClassDiagSet |
PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions.
Used to prevent emitting the same list more than once.
Definition at line 471 of file Sema.h.
Referenced by DiagnoseAbstractType().
| llvm::MapVector<Selector, SourceLocation> clang::Sema::ReferencedSelectors |
Method selectors used in a @selector expression.
Used for implementation of -Wselector.
Definition at line 966 of file Sema.h.
Referenced by DiagnoseUseOfUnimplementedSelectors(), ParseObjCSelectorExpression(), and RemoveSelectorFromWarningCache().
| Selector clang::Sema::RespondsToSelectorSel |
will hold 'respondsToSelector:'
Definition at line 745 of file Sema.h.
Referenced by ActOnInstanceMessage().
| SourceManager& clang::Sema::SourceMgr |
Definition at line 298 of file Sema.h.
Referenced by ActOnComment(), ActOnEndOfTranslationUnit(), ActOnUsingDirective(), applyCocoaAPICheck(), DiagnoseUnusedComparison(), GetFullTypeForDeclarator(), getNullabilityCompletenessCheckFileID(), getSourceManager(), isMainFileLoc(), and warnAboutAmbiguousFunction().
| llvm::FoldingSet<SpecialMemberOverloadResult> clang::Sema::SpecialMemberCache |
A cache of special member function overload resolution results for C++ records.
Definition at line 904 of file Sema.h.
Referenced by LookupSpecialMember().
| llvm::SmallSet<SpecialMemberDecl, 4> clang::Sema::SpecialMembersBeingDeclared |
| LazyDeclPtr clang::Sema::StdBadAlloc |
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
Definition at line 687 of file Sema.h.
Referenced by DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), and getStdBadAlloc().
| ClassTemplateDecl* clang::Sema::StdInitializerList |
The C++ "std::initializer_list" template, which is defined in <initializer_list>.
Definition at line 691 of file Sema.h.
Referenced by BuildStdInitializerList(), and isStdInitializerList().
| LazyDeclPtr clang::Sema::StdNamespace |
The C++ "std" namespace, where the standard library resides.
Definition at line 683 of file Sema.h.
Referenced by ActOnStartNamespaceDef(), getOrCreateStdNamespace(), getStdNamespace(), and isStdInitializerList().
| ObjCMethodDecl* clang::Sema::StringWithUTF8StringMethod |
| SuppressedDiagnosticsMap clang::Sema::SuppressedDiagnostics |
Definition at line 6674 of file Sema.h.
Referenced by FinishTemplateArgumentDeduction().
| TentativeDefinitionsType clang::Sema::TentativeDefinitions |
All the tentative definitions encountered in the TU.
Definition at line 485 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit().
| threadSafety::BeforeSet* clang::Sema::ThreadSafetyDeclCache |
| TranslationUnitKind clang::Sema::TUKind |
The kind of translation unit we are processing.
When we're processing a complete translation unit, Sema will perform end-of-translation-unit semantic tasks (such as creating initializers for tentative definitions in C) once parsing has completed. Modules and precompiled headers perform different kinds of checks.
Definition at line 917 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnModuleInclude(), and isMainFileLoc().
| Scope* clang::Sema::TUScope |
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace.
For example, user-defined classes, built-in "id" type, etc.
Definition at line 680 of file Sema.h.
Referenced by ActOnAtEnd(), ActOnCompatibilityAlias(), ActOnEndOfTranslationUnit(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnMethodDeclaration(), ActOnPragmaRedefineExtname(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartProtocolInterface(), ActOnSuperClassOfClassInterface(), ActOnTypedefedProtocols(), addImplicitTypedef(), buildMemcpyForAssignmentOp(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), DiagnoseDirectIsaAccess(), FindProtocolDeclaration(), HandleMSProperty(), Initialize(), isKnownName(), LookupBuiltin(), LookupObjCInterfaceDeclForLiteral(), LookupProtocol(), and Sema().
| IdentifierSourceLocations clang::Sema::TypoCorrectionFailures |
| unsigned clang::Sema::TyposCorrected |
| llvm::DenseMap<NamedDecl *, SourceLocation> clang::Sema::UndefinedButUsed |
UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.
Definition at line 942 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), checkUndefinedButUsed(), getUndefinedButUsed(), MarkFunctionReferenced(), and clang::MarkVarDeclODRUsed().
| UnparsedDefaultArgInstantiationsMap clang::Sema::UnparsedDefaultArgInstantiations |
A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.
This mapping is a temporary data structure used when parsing nested class templates or nested classes of class templates, where we might end up instantiating an inner class before the default arguments of its methods have been parsed.
Definition at line 934 of file Sema.h.
Referenced by SetParamDefaultArgument(), and SubstParmVarDecl().
| llvm::DenseMap<ParmVarDecl *, SourceLocation> clang::Sema::UnparsedDefaultArgLocs |
Definition at line 938 of file Sema.h.
Referenced by ActOnParamDefaultArgument(), ActOnParamDefaultArgumentError(), ActOnParamUnparsedDefaultArgument(), and CheckExtraCXXDefaultArguments().
| UnusedFileScopedDeclsType clang::Sema::UnusedFileScopedDecls |
The set of file scoped decls seen so far that have not been used and must warn if not used.
Only contains the first declaration.
Definition at line 493 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit().
| llvm::SmallSetVector<const TypedefNameDecl *, 4> clang::Sema::UnusedLocalTypedefNameCandidates |
Set containing all typedefs that are likely unused.
Definition at line 455 of file Sema.h.
Referenced by emitAndClearUnusedLocalTypedefWarnings().
| NamedDeclSetType clang::Sema::UnusedPrivateFields |
Set containing all declared private fields that are not used.
Definition at line 451 of file Sema.h.
Referenced by ActOnCXXMemberDeclarator(), ActOnEndOfTranslationUnit(), and BuildFieldReferenceExpr().
| DeclarationName clang::Sema::VAListTagName |
VAListTagName - The declaration name corresponding to __va_list_tag.
This is used as part of a hack to omit that class from ADL results.
Definition at line 315 of file Sema.h.
Referenced by Initialize().
| ObjCMethodDecl* clang::Sema::ValueWithBytesObjCTypeMethod |
| void* clang::Sema::VisContext |
VisContext - Manages the stack for #pragma GCC visibility.
Definition at line 398 of file Sema.h.
Referenced by AddPushedVisibilityAttribute(), FreeVisContext(), PopPragmaVisibility(), PushPragmaVisibility(), and ~Sema().
| llvm::DenseMap<CXXRecordDecl *, bool> clang::Sema::VTablesUsed |
The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).
Definition at line 5258 of file Sema.h.
Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().
| SmallVector<VTableUse, 16> clang::Sema::VTableUses |
The list of vtables that are required but have not yet been materialized.
Definition at line 5252 of file Sema.h.
Referenced by DefineUsedVTables(), LoadExternalVTableUses(), MarkVTableUsed(), and clang::Sema::SavePendingInstantiationsAndVTableUsesRAII::SavePendingInstantiationsAndVTableUsesRAII().
| SmallVector<MSVtorDispAttr::Mode, 2> clang::Sema::VtorDispModeStack |
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
Possible values are 0, 1, and 2, which mean:
0: Suppress all vtordisps 1: Insert vtordisps in the presence of vbase overrides and non-trivial structors 2: Always insert vtordisps to support RTTI on partially constructed objects
The stack always has at least one element in it.
Definition at line 353 of file Sema.h.
Referenced by ActOnPragmaMSVtorDisp(), AddMsStructLayoutForRecord(), clang::Sema::VtorDispStackRAII::VtorDispStackRAII(), and clang::Sema::VtorDispStackRAII::~VtorDispStackRAII().
| SmallVector<Decl*,2> clang::Sema::WeakTopLevelDecl |
WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls.
I couldn't figure out a clean way to generate these in-line, so we store them here and handle separately – which is a hack. It would be best to refactor this.
Definition at line 673 of file Sema.h.
Referenced by DeclApplyPragmaWeak(), and WeakTopLevelDecls().
| llvm::MapVector<IdentifierInfo *, WeakInfo> clang::Sema::WeakUndeclaredIdentifiers |
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
rare. may alias another identifier, declared or undeclared
Definition at line 656 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), LoadExternalWeakUndeclaredIdentifiers(), and ProcessPragmaWeak().
1.8.6