clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends
clang::Sema Class Reference

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

#include <Sema.h>

Collaboration diagram for clang::Sema:
Collaboration graph
[legend]

List of all members.

Classes

struct  ActiveTemplateInstantiation
 A template instantiation that is currently in progress. More...
class  ArgumentPackSubstitutionIndexRAII
 RAII object used to change the argument pack substitution index within a Sema object. More...
struct  CodeCompleteExpressionData
class  ContextRAII
 A RAII object to temporarily push a declaration context. More...
class  DelayedDiagnostics
struct  ExpressionEvaluationContextRecord
 Data structure used to record current or nested expression evaluation contexts. More...
class  FullExprArg
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...
class  ParsingDeclState
class  ProcessingContextState
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...
class  SpecialMemberOverloadResult

Public Types

enum  ExpressionEvaluationContext { Unevaluated, ConstantEvaluated, PotentiallyEvaluated, PotentiallyEvaluatedIfUsed }
 Describes how the expressions currently being parsed are evaluated at run-time, if at all. More...
enum  NameClassificationKind {
  NC_Unknown, NC_Error, NC_Keyword, NC_Type,
  NC_Expression, NC_NestedNameSpecifier, NC_TypeTemplate, NC_FunctionTemplate
}
 Describes the result of the name lookup and resolution performed by ClassifyName(). More...
enum  CheckConstexprKind { CCK_Declaration, CCK_Instantiation, CCK_NoteNonConstexprInstantiation }
 The kind of constexpr declaration checking we are performing. More...
enum  TagUseKind { TUK_Reference, TUK_Declaration, TUK_Definition, TUK_Friend }
enum  CXXSpecialMember {
  CXXDefaultConstructor, CXXCopyConstructor, CXXMoveConstructor, CXXCopyAssignment,
  CXXMoveAssignment, CXXDestructor, CXXInvalid
}
enum  AssignmentAction {
  AA_Assigning, AA_Passing, AA_Returning, AA_Converting,
  AA_Initializing, AA_Sending, AA_Casting
}
enum  OverloadKind { Ovl_Overload, Ovl_Match, Ovl_NonFunction }
 C++ Overloading. More...
enum  CCEKind { CCEK_CaseValue, CCEK_Enumerator, CCEK_TemplateArg }
 Contexts in which a converted constant expression is required. More...
enum  MethodMatchStrategy { MMS_loose, MMS_strict }
enum  TryCaptureKind { TryCapture_Implicit, TryCapture_ExplicitByVal, TryCapture_ExplicitByRef }
enum  IfExistsResult { IER_Exists, IER_DoesNotExist, IER_Dependent, IER_Error }
 Describes the result of an "if-exists" condition check. More...
enum  AccessResult { AR_accessible, AR_inaccessible, AR_dependent, AR_delayed }
enum  AbstractDiagSelID {
  AbstractNone = -1, AbstractReturnType, AbstractParamType, AbstractVariableType,
  AbstractFieldType, AbstractArrayType
}
enum  TemplateParamListContext {
  TPC_ClassTemplate, TPC_FunctionTemplate, TPC_ClassTemplateMember, TPC_FriendFunctionTemplate,
  TPC_FriendFunctionTemplateDefinition, TPC_TypeAliasTemplate
}
 The context in which we are checking a template parameter list. More...
enum  CheckTemplateArgumentKind { CTAK_Specified, CTAK_Deduced, CTAK_DeducedFromArrayBound }
 Specifies the context in which a particular template argument is being checked. More...
enum  TemplateParameterListEqualKind { TPL_TemplateMatch, TPL_TemplateTemplateParmMatch, TPL_TemplateTemplateArgumentMatch }
 Enumeration describing how template parameter lists are compared for equality. More...
enum  UnexpandedParameterPackContext {
  UPPC_Expression = 0, UPPC_BaseType, UPPC_DeclarationType, UPPC_DataMemberType,
  UPPC_BitFieldWidth, UPPC_StaticAssertExpression, UPPC_FixedUnderlyingType, UPPC_EnumeratorValue,
  UPPC_UsingDeclaration, UPPC_FriendDeclaration, UPPC_DeclarationQualifier, UPPC_Initializer,
  UPPC_DefaultArgument, UPPC_NonTypeTemplateParameterType, UPPC_ExceptionType, UPPC_PartialSpecialization,
  UPPC_IfExists, UPPC_IfNotExists
}
 The context in which an unexpanded parameter pack is being diagnosed. More...
enum  TemplateDeductionResult {
  TDK_Success = 0, TDK_InstantiationDepth, TDK_Incomplete, TDK_Inconsistent,
  TDK_Underqualified, TDK_SubstitutionFailure, TDK_NonDeducedMismatch, TDK_TooManyArguments,
  TDK_TooFewArguments, TDK_InvalidExplicitArguments, TDK_FailedOverloadResolution
}
 Describes the result of template argument deduction. More...
enum  DeduceAutoResult { DAR_Succeeded, DAR_Failed, DAR_FailedAlreadyDiagnosed }
 Result type of DeduceAutoType. More...
enum  ObjCContainerKind {
  OCK_None = -1, OCK_Interface = 0, OCK_Protocol, OCK_Category,
  OCK_ClassExtension, OCK_Implementation, OCK_CategoryImplementation
}
enum  ObjCSpecialMethodKind {
  OSMK_None, OSMK_Alloc, OSMK_New, OSMK_Copy,
  OSMK_RetainingInit, OSMK_NonRetainingInit
}
enum  ObjCMessageKind { ObjCSuperMessage, ObjCInstanceMessage, ObjCClassMessage }
 Describes the kind of message expression indicated by a message send that starts with an identifier. More...
enum  PragmaOptionsAlignKind {
  POAK_Native, POAK_Natural, POAK_Packed, POAK_Power,
  POAK_Mac68k, POAK_Reset
}
enum  PragmaPackKind { PPK_Default, PPK_Show, PPK_Push, PPK_Pop }
enum  PragmaMSStructKind { PMSST_OFF, PMSST_ON }
enum  CheckedConversionKind { CCK_ImplicitConversion, CCK_CStyleCast, CCK_FunctionalCast, CCK_OtherCast }
 The kind of conversion being performed. More...
enum  VariadicCallType {
  VariadicFunction, VariadicBlock, VariadicMethod, VariadicConstructor,
  VariadicDoesNotApply
}
enum  AssignConvertType {
  Compatible, PointerToInt, IntToPointer, FunctionVoidPointer,
  IncompatiblePointer, IncompatiblePointerSign, CompatiblePointerDiscardsQualifiers, IncompatiblePointerDiscardsQualifiers,
  IncompatibleNestedPointerQualifiers, IncompatibleVectors, IntToBlockPointer, IncompatibleBlockPointer,
  IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, Incompatible
}
enum  ReferenceCompareResult { Ref_Incompatible = 0, Ref_Related, Ref_Compatible_With_Added_Qualification, Ref_Compatible }
enum  ARCConversionResult { ACR_okay, ACR_unbridged }
enum  CUDAFunctionTarget { CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice }
typedef OpaquePtr< DeclGroupRefDeclGroupPtrTy
typedef OpaquePtr< TemplateNameTemplateTy
typedef OpaquePtr< QualTypeTypeTy
typedef LazyVector
< TypedefNameDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadExtVectorDecls, 2, 2 > 
ExtVectorDeclsType
typedef llvm::SmallPtrSet
< const CXXRecordDecl *, 8 > 
RecordDeclSetTy
typedef LazyVector< VarDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > 
TentativeDefinitionsType
typedef LazyVector< const
DeclaratorDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > 
UnusedFileScopedDeclsType
typedef LazyVector
< CXXConstructorDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > 
DelegatingCtorDeclsType
typedef void LateTemplateParserCB (void *P, const FunctionDecl *FD)
 Callback to the parser to parse templated functions when needed.
typedef llvm::DenseMap
< ParmVarDecl *, SmallVector
< ParmVarDecl *, 1 > > 
UnparsedDefaultArgInstantiationsMap
typedef std::pair
< ObjCMethodList,
ObjCMethodList
GlobalMethods
typedef llvm::DenseMap
< Selector, GlobalMethods
GlobalMethodPool
typedef llvm::SmallPtrSet
< DeclContext *, 16 > 
AssociatedNamespaceSet
typedef llvm::SmallPtrSet
< CXXRecordDecl *, 16 > 
AssociatedClassSet
typedef llvm::DenseSet
< Selector, llvm::DenseMapInfo
< Selector > > 
SelectorSet
typedef llvm::DenseMap
< Selector, ObjCMethodDecl * > 
ProtocolsMethodsMap
typedef ProcessingContextState ParsingClassState
typedef std::pair
< CXXRecordDecl
*, SourceLocation
VTableUse
 The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred.
typedef LazyVector
< CXXRecordDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadDynamicClasses, 2, 2 > 
DynamicClassesType
typedef llvm::DenseMap
< IdentifierInfo
*, TypoCorrection
UnqualifiedTyposCorrectedMap
typedef std::pair< ValueDecl
*, SourceLocation
PendingImplicitInstantiation
 An entity for which implicit template instantiation is required.
typedef SmallVector
< LateInstantiatedAttribute, 16 > 
LateInstantiatedAttrVec

Public Member Functions

llvm::DenseMap
< DeclarationName, NamedDecl * >
::iterator 
findLocallyScopedExternalDecl (DeclarationName Name)
 Look for a locally scoped external declaration by the given name.
void SetLateTemplateParser (LateTemplateParserCB *LTP, void *P)
void LoadExternalWeakUndeclaredIdentifiers ()
 Load weak undeclared identifiers from the external source.
void ReadMethodPool (Selector Sel)
 Read the contents of the method pool for a given selector from external storage.
bool isSelfExpr (Expr *RExpr)
 Private Helper predicate to check for 'self'.
 Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=0)
 ~Sema ()
void Initialize ()
 Perform initialization that occurs after the parser has been initialized but before it parses anything.
const LangOptionsgetLangOptions () const
OpenCLOptionsgetOpenCLOptions ()
FPOptionsgetFPOptions ()
DiagnosticsEnginegetDiagnostics () const
SourceManagergetSourceManager () const
const TargetAttributesSemagetTargetAttributesSema () const
PreprocessorgetPreprocessor () const
ASTContextgetASTContext () const
ASTConsumergetASTConsumer () const
ASTMutationListenergetASTMutationListener () const
void PrintStats () const
 Print out statistics about the semantic analysis.
SemaDiagnosticBuilder Diag (SourceLocation Loc, unsigned DiagID)
 Emit a diagnostic.
SemaDiagnosticBuilder Diag (SourceLocation Loc, const PartialDiagnostic &PD)
 Emit a partial diagnostic.
PartialDiagnostic PDiag (unsigned DiagID=0)
 Build a partial diagnostic.
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. If one is found, returns true and sets the location to that expansion loc.
const char * getFixItZeroInitializerForType (QualType T) const
 Get a string to suggest for zero-initialization of a type.
ExprResult Owned (Expr *E)
ExprResult Owned (ExprResult R)
StmtResult Owned (Stmt *S)
void ActOnEndOfTranslationUnit ()
void CheckDelegatingCtorCycles ()
ScopegetScopeForContext (DeclContext *Ctx)
 Determines the active Scope associated with the given declaration context.
void PushFunctionScope ()
 Enter a new function scope.
void PushBlockScope (Scope *BlockScope, BlockDecl *Block)
void PushLambdaScope (CXXRecordDecl *Lambda)
void PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=0, const Decl *D=0, const BlockExpr *blkExpr=0)
sema::FunctionScopeInfogetCurFunction () const
bool hasAnyUnrecoverableErrorsInThisFunction () const
 Determine whether any errors occurred within this function/method/ block.
sema::BlockScopeInfogetCurBlock ()
 Retrieve the current block, if any.
sema::LambdaScopeInfogetCurLambda ()
 Retrieve the current lambda expression, if any.
SmallVector< Decl *, 2 > & WeakTopLevelDecls ()
 WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
QualType BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs)
QualType BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVR)
QualType BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a pointer type.
QualType BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
 Build a reference type.
QualType BuildArrayType (QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
 Build an array type.
QualType BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc)
 Build an ext-vector type.
QualType BuildFunctionType (QualType T, QualType *ParamTypes, unsigned NumParamTypes, bool Variadic, unsigned Quals, RefQualifierKind RefQualifier, SourceLocation Loc, DeclarationName Entity, FunctionType::ExtInfo Info)
 Build a function type.
QualType BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
 Build a member pointer type T Class::*.
QualType BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a block pointer type.
QualType BuildParenType (QualType T)
 Build a paren type including T.
QualType BuildAtomicType (QualType T, SourceLocation Loc)
TypeSourceInfoGetTypeForDeclarator (Declarator &D, Scope *S)
TypeSourceInfoGetTypeForDeclaratorCast (Declarator &D, QualType FromTy)
TypeSourceInfoGetTypeSourceInfoForDeclarator (Declarator &D, QualType T, TypeSourceInfo *ReturnTypeInfo)
 Create and instantiate a TypeSourceInfo with type source information.
ParsedType CreateParsedType (QualType T, TypeSourceInfo *TInfo)
 Package the given type and TSI into a ParsedType.
DeclarationNameInfo GetNameForDeclarator (Declarator &D)
DeclarationNameInfo GetNameFromUnqualifiedId (const UnqualifiedId &Name)
 Retrieves the declaration name from a parsed unqualified-id.
bool CheckSpecifiedExceptionType (QualType T, const SourceRange &Range)
bool CheckDistantExceptionSpec (QualType T)
bool CheckEquivalentExceptionSpec (FunctionDecl *Old, FunctionDecl *New)
bool CheckEquivalentExceptionSpec (const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc)
bool CheckEquivalentExceptionSpec (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc, bool *MissingExceptionSpecification=0, bool *MissingEmptyExceptionSpecification=0, bool AllowNoexceptAllMatchWithNoSpec=false, bool IsOperatorNew=false)
bool CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
bool CheckParamExceptionSpec (const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
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. Return the appropriate type.
bool RequireCompleteType (SourceLocation Loc, QualType T, const PartialDiagnostic &PD, std::pair< SourceLocation, PartialDiagnostic > Note)
 Ensure that the type T is a complete type.
bool RequireCompleteType (SourceLocation Loc, QualType T, const PartialDiagnostic &PD)
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
bool RequireCompleteExprType (Expr *E, const PartialDiagnostic &PD, std::pair< SourceLocation, PartialDiagnostic > Note)
 Ensure that the type of the given expression is complete.
bool RequireLiteralType (SourceLocation Loc, QualType T, const PartialDiagnostic &PD, bool AllowIncompleteType=false)
 Ensure that the type T is a literal type.
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.
QualType BuildTypeofExprType (Expr *E, SourceLocation Loc)
QualType BuildDecltypeType (Expr *E, SourceLocation Loc)
QualType BuildUnaryTransformType (QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
DeclGroupPtrTy ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=0)
void DiagnoseUseOfUnimplementedSelectors ()
ParsedType getTypeName (IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=0, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=ParsedType(), bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, IdentifierInfo **CorrectedII=0)
 If the identifier refers to a type name within this scope, return the declaration of that type.
TypeSpecifierType isTagName (IdentifierInfo &II, Scope *S)
bool isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S)
bool DiagnoseUnknownTypeName (const IdentifierInfo &II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType)
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken)
 Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
DeclActOnDeclarator (Scope *S, Declarator &D)
DeclHandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
void RegisterLocallyScopedExternCDecl (NamedDecl *ND, const LookupResult &Previous, Scope *S)
 Register the given locally-scoped external C declaration so that it can be found later for redeclarations.
bool DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info)
void DiagnoseFunctionSpecifiers (Declarator &D)
 Diagnose function specifiers on a declaration of an identifier that does not identify a function.
void CheckShadow (Scope *S, VarDecl *D, const LookupResult &R)
 Diagnose variable or built-in function shadowing. Implements.
void CheckShadow (Scope *S, VarDecl *D)
 Check -Wshadow without the advantage of a previous lookup.
void CheckCastAlign (Expr *Op, QualType T, SourceRange TRange)
void CheckTypedefForVariablyModifiedType (Scope *S, TypedefNameDecl *D)
NamedDeclActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
NamedDeclActOnTypedefNameDecl (Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
NamedDeclActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists)
bool CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
 Perform semantic checking on a newly-created variable declaration.
void CheckCompleteVariableDeclaration (VarDecl *var)
NamedDeclActOnFunctionDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
bool AddOverriddenMethods (CXXRecordDecl *DC, CXXMethodDecl *MD)
bool CheckConstexprFunctionDecl (const FunctionDecl *FD, CheckConstexprKind CCK)
bool CheckConstexprFunctionBody (const FunctionDecl *FD, Stmt *Body, bool IsInstantiation)
void DiagnoseHiddenVirtualMethods (CXXRecordDecl *DC, CXXMethodDecl *MD)
 See if a method overloads virtual methods in a base class without overriding any.
bool CheckFunctionDeclaration (Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsExplicitSpecialization)
 Perform semantic checking of a new function declaration.
void CheckMain (FunctionDecl *FD, const DeclSpec &D)
DeclActOnParamDeclarator (Scope *S, Declarator &D)
ParmVarDeclBuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T)
 Synthesizes a variable for a parameter arising from a typedef.
ParmVarDeclCheckParameter (DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC, StorageClass SCAsWritten)
void ActOnParamDefaultArgument (Decl *param, SourceLocation EqualLoc, Expr *defarg)
void ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
void ActOnParamDefaultArgumentError (Decl *param)
bool SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void CheckSelfReference (Decl *OrigDecl, Expr *E)
 CheckSelfReference - Warns if OrigDecl is used in expression E.
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto)
void ActOnUninitializedDecl (Decl *dcl, bool TypeMayContainAuto)
void ActOnInitializerError (Decl *Dcl)
void ActOnCXXForRangeDecl (Decl *D)
void SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
void SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
void FinalizeDeclaration (Decl *D)
DeclGroupPtrTy FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, Decl **Group, unsigned NumDecls)
DeclGroupPtrTy BuildDeclaratorGroup (Decl **Group, unsigned NumDecls, bool TypeMayContainAuto=true)
void ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void CheckForFunctionRedefinition (FunctionDecl *FD)
DeclActOnStartOfFunctionDef (Scope *S, Declarator &D)
DeclActOnStartOfFunctionDef (Scope *S, Decl *D)
void ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
void computeNRVO (Stmt *Body, sema::FunctionScopeInfo *Scope)
 Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body)
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation)
void ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs)
void DiagnoseUnusedParameters (ParmVarDecl *const *Begin, ParmVarDecl *const *End)
 Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
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.
void DiagnoseInvalidJumps (Stmt *Body)
DeclActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
DeclResult ActOnModuleImport (SourceLocation AtLoc, SourceLocation ImportLoc, ModuleIdPath Path)
 The parser has processed a module import declaration.
PrintingPolicy getPrintingPolicy () const
 Retrieve a suitable printing policy.
void ActOnPopScope (SourceLocation Loc, Scope *S)
 Scope actions.
void ActOnTranslationUnitScope (Scope *S)
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS)
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
DeclBuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record)
DeclBuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
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.
DeclActOnTag (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)
DeclActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, MultiTemplateParamsArg TempParamLists)
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)
DeclActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
FieldDeclHandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, bool HasInit, AccessSpecifier AS)
FieldDeclCheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, bool HasInit, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=0)
 Build a new FieldDecl and check its well-formedness.
bool CheckNontrivialField (FieldDecl *FD)
void DiagnoseNontrivial (const RecordType *Record, CXXSpecialMember mem)
CXXSpecialMember getSpecialMember (const CXXMethodDecl *MD)
 getSpecialMember - get the special member enum for a method.
void ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
DeclActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
void ActOnFields (Scope *S, SourceLocation RecLoc, Decl *TagDecl, llvm::ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
void ActOnTagStartDefinition (Scope *S, Decl *TagDecl)
DeclActOnObjCContainerStartDefinition (Decl *IDecl)
void ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, SourceLocation LBraceLoc)
void ActOnTagFinishDefinition (Scope *S, Decl *TagDecl, SourceLocation RBraceLoc)
void ActOnObjCContainerFinishDefinition ()
void ActOnObjCTemporaryExitContainerContext (DeclContext *DC)
 Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
void ActOnObjCReenterContainerContext (DeclContext *DC)
void ActOnTagDefinitionError (Scope *S, Decl *TagDecl)
EnumConstantDeclCheckEnumConstant (EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
DeclActOnEnumConstant (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, Decl **Elements, unsigned NumElements, Scope *S, AttributeList *Attr)
DeclContextgetContainingDC (DeclContext *DC)
void PushDeclContext (Scope *S, DeclContext *DC)
 Set the current declaration context until it gets popped.
void PopDeclContext ()
void EnterDeclaratorContext (Scope *S, DeclContext *DC)
void ExitDeclaratorContext (Scope *S)
void ActOnReenterFunctionContext (Scope *S, Decl *D)
 Push the parameters of D, which must be a function, into scope.
void ActOnExitFunctionContext ()
DeclContextgetFunctionLevelDeclContext ()
FunctionDeclgetCurFunctionDecl ()
ObjCMethodDeclgetCurMethodDecl ()
NamedDeclgetCurFunctionOrMethodDecl ()
void PushOnScopeChains (NamedDecl *D, Scope *S, bool AddToContext=true)
 Add this decl to the scope shadowed decl chains.
void pushExternalDeclIntoScope (NamedDecl *D, DeclarationName Name)
 Make the given externally-produced declaration visible at the top level scope.
bool isDeclInScope (NamedDecl *&D, DeclContext *Ctx, Scope *S=0, bool ExplicitInstantiationOrSpecialization=false)
TypedefDeclParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
 Subroutines of ActOnDeclarator().
bool isIncompatibleTypedef (TypeDecl *Old, TypedefNameDecl *New)
void mergeDeclAttributes (Decl *New, Decl *Old, bool MergeDeprecation=true)
 mergeDeclAttributes - Copy attributes from the Old decl to the New one.
void MergeTypedefNameDecl (TypedefNameDecl *New, LookupResult &OldDecls)
bool MergeFunctionDecl (FunctionDecl *New, Decl *Old)
bool MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old)
 Completes the merge of two function declarations that are known to be compatible.
void mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old)
void MergeVarDecl (VarDecl *New, LookupResult &OldDecls)
void MergeVarDeclTypes (VarDecl *New, VarDecl *Old)
void MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
 Merge the exception specifications of two variable declarations.
bool MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old)
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.
ImplicitConversionSequence TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
bool IsIntegralPromotion (Expr *From, QualType FromType, QualType ToType)
bool IsFloatingPointPromotion (QualType FromType, QualType ToType)
bool IsComplexPromotion (QualType FromType, QualType ToType)
 Determine if a conversion is a complex promotion.
bool IsPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
bool isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
bool isObjCWritebackConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
 Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.
bool IsBlockPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
bool FunctionArgTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=0)
void HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
CastKind PrepareCastToObjCObjectPointer (ExprResult &E)
bool CheckPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
bool IsMemberPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
bool CheckMemberPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
bool IsQualificationConversion (QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
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.
bool DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType)
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.
bool CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init)
ExprResult PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false)
ExprResult PerformObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
ExprResult PerformContextuallyConvertToBool (Expr *From)
ExprResult PerformContextuallyConvertToObjCPointer (Expr *From)
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
ExprResult ConvertToIntegralOrEnumerationType (SourceLocation Loc, Expr *FromE, const PartialDiagnostic &NotIntDiag, const PartialDiagnostic &IncompleteDiag, const PartialDiagnostic &ExplicitConvDiag, const PartialDiagnostic &ExplicitConvNote, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &AmbigNote, const PartialDiagnostic &ConvDiag, bool AllowScopedEnumerations)
 Attempt to convert the given expression to an integral or enumeration type.
ExprResult PerformObjectMemberConversion (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
 Cast a base object to a member's actual type.
void AddOverloadCandidate (FunctionDecl *Function, DeclAccessPair FoundDecl, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false)
void AddFunctionCandidates (const UnresolvedSetImpl &Functions, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
 Add all of the function declarations in the given function set to the overload canddiate set.
void AddMethodCandidate (DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false)
void AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
void AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=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.
void AddTemplateOverloadCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=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.
void AddConversionCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet)
void AddTemplateConversionCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet)
 Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]).
void AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet)
void AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, SourceRange OpRange=SourceRange())
 Add overload candidates for overloaded operators that are member functions.
void AddBuiltinCandidate (QualType ResultTy, QualType *ParamTys, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
void AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet)
void AddArgumentDependentLookupCandidates (DeclarationName Name, bool Operator, Expr **Args, unsigned NumArgs, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false, bool StdNamespaceIsAssociated=false)
 Add function candidates found via argument-dependent lookup to the set of overloading candidates.
void NoteOverloadCandidate (FunctionDecl *Fn, QualType DestType=QualType())
void NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType())
QualType ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
FunctionDeclResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=0)
FunctionDeclResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=0)
 Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.
bool ResolveAndFixSingleFunctionTemplateSpecialization (ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, const SourceRange &OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
ExprFixOverloadedFunctionReference (Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
ExprResult FixOverloadedFunctionReference (ExprResult, DeclAccessPair FoundDecl, FunctionDecl *Fn)
void AddOverloadedCallCandidates (UnresolvedLookupExpr *ULE, Expr **Args, unsigned NumArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
ExprResult BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true)
ExprResult CreateOverloadedUnaryOp (SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *input)
 Create a unary operation that may resolve to an overloaded operator.
ExprResult CreateOverloadedBinOp (SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS)
 Create a binary operation that may resolve to an overloaded operator.
ExprResult CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, Expr *Idx)
ExprResult BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc)
ExprResult BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc)
ExprResult BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc)
bool CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
bool CheckParmsForFunctionDef (ParmVarDecl **Param, ParmVarDecl **ParamEnd, bool CheckParameterNames)
 Helpers for dealing with blocks and functions.
void CheckCXXDefaultArguments (FunctionDecl *FD)
void CheckExtraCXXDefaultArguments (Declarator &D)
ScopegetNonFieldDeclScope (Scope *S)
ObjCInterfaceDeclgetObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
 Look for an Objective-C class in the translation unit.
NamedDeclLazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
NamedDeclImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S)
void AddKnownFunctionAttributes (FunctionDecl *FD)
 Adds any function attributes that we know a priori based on the declaration of this function.
void ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD, bool NonInheritable=true, bool Inheritable=true)
void ProcessDeclAttributeList (Scope *S, Decl *D, const AttributeList *AL, bool NonInheritable=true, bool Inheritable=true)
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const AttributeList *AttrList)
void checkUnusedDeclAttributes (Declarator &D)
bool CheckRegparmAttr (const AttributeList &attr, unsigned &value)
bool CheckCallingConvAttr (const AttributeList &attr, CallingConv &CC)
bool CheckNoReturnAttr (const AttributeList &attr)
void WarnUndefinedMethod (SourceLocation ImpLoc, ObjCMethodDecl *method, bool &IncompleteImpl, unsigned DiagID)
void WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
void CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
void WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
bool isPropertyReadonly (ObjCPropertyDecl *PropertyDecl, ObjCInterfaceDecl *IDecl)
void CheckProtocolMethodDefs (SourceLocation ImpLoc, ObjCProtocolDecl *PDecl, bool &IncompleteImpl, const SelectorSet &InsMap, const SelectorSet &ClsMap, ObjCContainerDecl *CDecl)
void CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
void ImplMethodsVsClassMethods (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
void DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, const SelectorSet &InsMap)
void DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
void DefaultSynthesizeProperties (Scope *S, Decl *D)
void CollectImmediateProperties (ObjCContainerDecl *CDecl, llvm::DenseMap< IdentifierInfo *, ObjCPropertyDecl * > &PropMap, llvm::DenseMap< IdentifierInfo *, ObjCPropertyDecl * > &SuperPropMap)
ObjCPropertyDeclLookupPropertyDecl (const ObjCContainerDecl *CDecl, IdentifierInfo *II)
DeclHandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, bool *isOverridingProperty, TypeSourceInfo *T, tok::ObjCKeywordKind MethodImplKind)
ObjCPropertyDeclCreatePropertyDecl (Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, TypeSourceInfo *T, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=0)
void AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl)
void DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D)
void DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
bool MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
void MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnExactMatch=false)
void CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP)
void addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
 Add the given method to the list of globally-known methods.
void AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
void AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
void AddAnyMethodToGlobalPool (Decl *D)
ObjCMethodDeclLookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false, bool warn=true)
ObjCMethodDeclLookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false, bool warn=true)
ObjCMethodDeclLookupImplementedMethodInGlobalPool (Selector Sel)
void CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
FullExprArg MakeFullExpr (Expr *Arg)
StmtResult ActOnExprStmt (FullExprArg Expr)
StmtResult ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
StmtResult ActOnCompoundStmt (SourceLocation L, SourceLocation R, MultiStmtArg Elts, bool isStmtExpr)
StmtResult ActOnDeclStmt (DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
void ActOnForEachDeclStmt (DeclGroupPtrTy Decl)
StmtResult ActOnForEachLValueExpr (Expr *E)
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.
StmtResult ActOnDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
StmtResult ActOnLabelStmt (SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, 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 ActOnObjCForCollectionOperand (SourceLocation forLoc, Expr *collection)
StmtResult ActOnObjCForCollectionStmt (SourceLocation ForColLoc, SourceLocation LParenLoc, Stmt *First, Expr *Second, SourceLocation RParenLoc, Stmt *Body)
StmtResult ActOnCXXForRangeStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc)
StmtResult BuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *BeginEndDecl, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc)
 BuildCXXForRangeStmt - Build or instantiate a C++0x for-range statement.
StmtResult FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body)
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 GotoLoc, Scope *CurScope)
const VarDeclgetCopyElisionCandidate (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.
StmtResult ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc, bool MSAsm=false)
VarDeclBuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
 Build a type-check a new Objective-C exception variable declaration.
DeclActOnObjCExceptionDecl (Scope *S, Declarator &D)
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)
VarDeclBuildExceptionDeclaration (Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
 Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.
DeclActOnExceptionDeclarator (Scope *S, Declarator &D)
StmtResult ActOnCXXCatchBlock (SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
StmtResult ActOnCXXTryBlock (SourceLocation TryLoc, Stmt *TryBlock, MultiStmtArg Handlers)
StmtResult ActOnSEHTryBlock (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
StmtResult ActOnSEHExceptBlock (SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
StmtResult ActOnSEHFinallyBlock (SourceLocation Loc, Stmt *Block)
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.
void DiagnoseUnusedExprResult (const Stmt *S)
void DiagnoseUnusedDecl (const NamedDecl *ND)
ParsingDeclState PushParsingDeclaration ()
void PopParsingDeclaration (ParsingDeclState state, Decl *decl)
ParsingClassState PushParsingClass ()
void PopParsingClass (ParsingClassState state)
void EmitDeprecationWarning (NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass=0)
void HandleDelayedDeprecationCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool makeUnavailableInSystemHeader (SourceLocation loc, StringRef message)
bool CanUseDecl (NamedDecl *D)
 Determine whether the use of this declaration is valid, without emitting diagnostics.
bool DiagnoseUseOfDecl (NamedDecl *D, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass=0)
 Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
AvailabilityResult DiagnoseAvailabilityOfDecl (NamedDecl *D, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass)
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.
bool DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
void DiagnoseSentinelCalls (NamedDecl *D, SourceLocation Loc, Expr **Args, unsigned NumArgs)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext)
void PopExpressionEvaluationContext ()
void DiscardCleanupsInEvaluationContext ()
ExprResult TranformToPotentiallyEvaluated (Expr *E)
ExprResult HandleExprEvaluationContextForTypeof (Expr *E)
void MarkAnyDeclReferenced (SourceLocation Loc, Decl *D)
 Perform marking for a reference to an aribitrary declaration. It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building an normal expression which refers to a variable.
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func)
 Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
void MarkVariableReferenced (SourceLocation Loc, VarDecl *Var)
 Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3). Note that this should not be used directly for normal expressions referring to VarDecl.
void MarkBlockDeclRefReferenced (BlockDeclRefExpr *E)
 Perform reference-marking and odr-use handling for a BlockDeclRefExpr.
void MarkDeclRefReferenced (DeclRefExpr *E)
 Perform reference-marking and odr-use handling for a DeclRefExpr.
void MarkMemberReferenced (MemberExpr *E)
 Perform reference-marking and odr-use handling for a MemberExpr.
void UpdateMarkingForLValueToRValue (Expr *E)
void CleanupVarDeclMarking ()
void TryCaptureVar (VarDecl *var, SourceLocation loc, TryCaptureKind Kind=TryCapture_Implicit)
void MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T)
void MarkDeclarationsReferencedInExpr (Expr *E)
 Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".
bool tryToRecoverWithCall (ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=0)
 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.
bool isExprCallable (const Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
 Figure out if an expression could be turned into a call.
bool DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the current evaluation context.
SourceRange getExprRange (Expr *E) const
ExprResult ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=0)
void DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=0, Expr **Args=0, unsigned NumArgs=0)
ExprResult LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
ExprResult ActOnDependentIdExpression (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=0)
ExprResult BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=0)
ExprResult BuildAnonymousStructUnionMemberReference (const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, Expr *baseObjectExpr=0, SourceLocation opLoc=SourceLocation())
ExprResult BuildPossibleImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs)
 Builds an expression which might be an implicit member expression.
ExprResult BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance)
bool UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
ExprResult BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo)
ExprResult BuildDependentDeclRefExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D)
 Complete semantic analysis for a reference to the given declaration.
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult ActOnNumericConstant (const Token &Tok)
ExprResult ActOnCharacterConstant (const Token &Tok)
ExprResult ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E)
ExprResult ActOnParenOrParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val)
ExprResult ActOnStringLiteral (const Token *StringToks, unsigned NumStringToks)
ExprResult ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, MultiTypeArg ArgTypes, MultiExprArg ArgExprs)
ExprResult CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, TypeSourceInfo **Types, Expr **Exprs, unsigned NumAssocs)
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)
ExprResult CreateUnaryExprOrTypeTraitExpr (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
 Build a sizeof or alignof expression given a type operand.
ExprResult CreateUnaryExprOrTypeTraitExpr (Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind)
 Build a sizeof or alignof expression given an expression operand.
ExprResult ActOnUnaryExprOrTypeTraitExpr (SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, const SourceRange &ArgRange)
ExprResult CheckPlaceholderExpr (Expr *E)
bool CheckVecStepExpr (Expr *E)
bool CheckUnaryExprOrTypeTraitOperand (Expr *E, UnaryExprOrTypeTrait ExprKind)
 Check the constrains on expression operands to unary type expression and type traits.
bool CheckUnaryExprOrTypeTraitOperand (QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind)
 Check the constraints on operands to unary expression and type traits.
ExprResult ActOnSizeofParameterPackExpr (Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
 Called when an expression computing the size of a parameter pack is parsed.
ExprResult 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 BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool SuppressQualifierCheck=false)
ExprResult PerformMemberExprBaseConversion (Expr *Base, bool IsArrow)
 Perform conversions on the LHS of a member access expression.
ExprResult LookupMemberExpr (LookupResult &R, ExprResult &Base, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs)
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, bool HasTrailingLParen)
void ActOnDefaultCtorInitializers (Decl *CDtorDecl)
bool ConvertArgumentsForCall (CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc, bool ExecConfig=false)
void CheckStaticArrayArgument (SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
ExprResult ActOnCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=0, bool IsExecConfig=false)
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc, Expr *Config=0, bool IsExecConfig=false)
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)
ExprResult BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
 Build an altivec or OpenCL literal.
ExprResult MaybeConvertParenListExprToParenExpr (Scope *S, Expr *ME)
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)
ExprResult ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
ExprResult ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
 ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
ExprResult ActOnStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
ExprResult BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, OffsetOfComponent *CompPtr, unsigned NumComponents, SourceLocation RParenLoc)
 __builtin_offsetof(type, a.b[123][456].c)
ExprResult ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, OffsetOfComponent *CompPtr, unsigned NumComponents, 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)
void ActOnBlockArguments (Declarator &ParamInfo, Scope *CurScope)
void ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope)
ExprResult ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ExprResult ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_astype(...)
DeclActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, AttributeList *AttrList)
void ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace)
NamespaceDeclgetStdNamespace () const
NamespaceDeclgetOrCreateStdNamespace ()
 Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
CXXRecordDeclgetStdBadAlloc () 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.
QualType BuildStdInitializerList (QualType Element, SourceLocation Loc)
 Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found.
bool isInitListConstructor (const CXXConstructorDecl *Ctor)
 Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
DeclActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, AttributeList *AttrList)
void PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir)
DeclActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
void HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow)
bool CheckUsingShadowDecl (UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls)
UsingShadowDeclBuildUsingShadowDecl (Scope *S, UsingDecl *UD, NamedDecl *Target)
 Builds a shadow declaration corresponding to a 'using' declaration.
bool CheckUsingDeclRedeclaration (SourceLocation UsingLoc, bool isTypeName, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
bool CheckUsingDeclQualifier (SourceLocation UsingLoc, const CXXScopeSpec &SS, SourceLocation NameLoc)
NamedDeclBuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, AttributeList *AttrList, bool IsInstantiation, bool IsTypeName, SourceLocation TypenameLoc)
bool CheckInheritedConstructorUsingDecl (UsingDecl *UD)
 Additional checks for a using declaration referring to a constructor name.
DeclActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, bool HasUsingKeyword, SourceLocation UsingLoc, CXXScopeSpec &SS, UnqualifiedId &Name, AttributeList *AttrList, bool IsTypeName, SourceLocation TypenameLoc)
DeclActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, TypeResult Type)
void AddCXXDirectInitializerToDecl (Decl *Dcl, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc, bool TypeMayContainAuto)
bool InitializeVarWithConstructor (VarDecl *VD, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
void FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
ImplicitExceptionSpecification ComputeDefaultedDefaultCtorExceptionSpec (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defaulted copy constructor of a class will have.
std::pair
< ImplicitExceptionSpecification,
bool > 
ComputeDefaultedCopyCtorExceptionSpecAndConst (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const.
std::pair
< ImplicitExceptionSpecification,
bool > 
ComputeDefaultedCopyAssignmentExceptionSpecAndConst (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defautled copy assignment operator of a class will have, and whether the parameter will be const.
ImplicitExceptionSpecification ComputeDefaultedMoveCtorExceptionSpec (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defaulted move constructor of a class will have.
ImplicitExceptionSpecification ComputeDefaultedMoveAssignmentExceptionSpec (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defaulted move assignment operator of a class will have.
ImplicitExceptionSpecification ComputeDefaultedDtorExceptionSpec (CXXRecordDecl *ClassDecl)
 Determine what sort of exception specification a defaulted destructor of a class will have.
bool ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM)
 Determine if a special member function should have a deleted definition when it is defaulted.
bool ShouldDeleteCopyAssignmentOperator (CXXMethodDecl *MD)
 Determine if a defaulted copy assignment operator ought to be deleted.
bool ShouldDeleteMoveAssignmentOperator (CXXMethodDecl *MD)
 Determine if a defaulted move assignment operator ought to be deleted.
bool ShouldDeleteDestructor (CXXDestructorDecl *DD)
 Determine if a defaulted destructor ought to be deleted.
CXXConstructorDeclDeclareImplicitDefaultConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit default constructor for the given class.
void DefineImplicitDefaultConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXDestructorDeclDeclareImplicitDestructor (CXXRecordDecl *ClassDecl)
 Declare the implicit destructor for the given class.
void DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
void AdjustDestructorExceptionSpec (CXXRecordDecl *ClassDecl, CXXDestructorDecl *Destructor)
 Build an exception spec for destructors that don't have one.
void DeclareInheritedConstructors (CXXRecordDecl *ClassDecl)
 Declare all inherited constructors for the given class.
CXXConstructorDeclDeclareImplicitCopyConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit copy constructor for the given class.
void DefineImplicitCopyConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXConstructorDeclDeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit move constructor for the given class.
void DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXMethodDeclDeclareImplicitCopyAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit copy assignment operator for the given class.
void DefineImplicitCopyAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared copy assignment operator.
CXXMethodDeclDeclareImplicitMoveAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit move assignment operator for the given class.
void DefineImplicitMoveAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared move assignment operator.
void ForceDeclarationOfImplicitMembers (CXXRecordDecl *Class)
 Force the declaration of any implicitly-declared members of this class.
ExprResult MaybeBindToTemporary (Expr *E)
bool CompleteConstructorCall (CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, ASTOwningVector< Expr * > &ConvertedArgs)
 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.
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.
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.
ExprResult BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a C++ typeid expression with an expression operand.
ExprResult ActOnCXXTypeid (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXTypeid - Parse typeid( something ).
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with a type operand.
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with an expression operand.
ExprResult ActOnCXXUuidof (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXUuidof - Parse __uuidof( something ).
ExprResult ActOnCXXThis (SourceLocation loc)
QualType getCurrentThisType ()
 Try to retrieve the type of the 'this' pointer.
void CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false)
 Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.
ExprResult ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnCXXBoolLiteral - Parse {true,false} literals.
ExprResult ActOnCXXNullPtrLiteral (SourceLocation Loc)
 ActOnCXXNullPtrLiteral - Parse 'nullptr'.
ExprResult ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr)
 ActOnCXXThrow - Parse throw expressions.
ExprResult BuildCXXThrow (SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
ExprResult CheckCXXThrowOperand (SourceLocation ThrowLoc, Expr *E, bool IsThrownVarInScope)
 CheckCXXThrowOperand - Validate the operand of a throw.
ExprResult ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
ExprResult BuildCXXTypeConstructExpr (TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
ExprResult ActOnCXXNew (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, SourceLocation ConstructorLParen, MultiExprArg ConstructorArgs, SourceLocation ConstructorRParen)
 ActOnCXXNew - Parsed a C++ 'new' expression.
ExprResult BuildCXXNew (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Expr *ArraySize, SourceLocation ConstructorLParen, MultiExprArg ConstructorArgs, SourceLocation ConstructorRParen, bool TypeMayContainAuto=true)
bool CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R)
bool FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, bool UseGlobal, QualType AllocType, bool IsArray, Expr **PlaceArgs, unsigned NumPlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete)
bool FindAllocationOverload (SourceLocation StartLoc, SourceRange Range, DeclarationName Name, Expr **Args, unsigned NumArgs, DeclContext *Ctx, bool AllowMissing, FunctionDecl *&Operator, bool Diagnose=true)
void DeclareGlobalNewDelete ()
void DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, QualType Argument, bool addMallocAttr=false)
bool FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
ExprResult ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
 ActOnCXXDelete - Parsed a C++ 'delete' expression.
DeclResult ActOnCXXConditionDeclaration (Scope *S, Declarator &D)
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.
ExprResult ActOnNoexceptExpr (SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
ExprResult BuildCXXNoexceptExpr (SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
ExprResult ActOnUnaryTypeTrait (UnaryTypeTrait OTT, SourceLocation KWLoc, ParsedType Ty, SourceLocation RParen)
ExprResult BuildUnaryTypeTrait (UnaryTypeTrait OTT, SourceLocation KWLoc, TypeSourceInfo *T, SourceLocation RParen)
ExprResult ActOnBinaryTypeTrait (BinaryTypeTrait OTT, SourceLocation KWLoc, ParsedType LhsTy, ParsedType RhsTy, SourceLocation RParen)
ExprResult BuildBinaryTypeTrait (BinaryTypeTrait BTT, SourceLocation KWLoc, TypeSourceInfo *LhsT, TypeSourceInfo *RhsT, SourceLocation RParen)
ExprResult ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ExprResult BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
ExprResult ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
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 DiagnoseDtorReference (SourceLocation NameLoc, Expr *MemExpr)
ExprResult BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType, bool HasTrailingLParen)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName, bool HasTrailingLParen)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS, bool HasTrailingLParen)
ExprMaybeCreateExprWithCleanups (Expr *SubExpr)
StmtMaybeCreateStmtWithCleanups (Stmt *SubStmt)
ExprResult MaybeCreateExprWithCleanups (ExprResult SubExpr)
ExprResult ActOnFinishFullExpr (Expr *Expr)
StmtResult ActOnFinishFullStmt (Stmt *Stmt)
bool RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC)
 Require that the context specified by SS be complete.
DeclContextcomputeDeclContext (QualType T)
 Compute the DeclContext that is associated with the given type.
DeclContextcomputeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false)
 Compute the DeclContext that is associated with the given scope specifier.
bool isDependentScopeSpecifier (const CXXScopeSpec &SS)
CXXRecordDeclgetCurrentInstantiationOf (NestedNameSpecifier *NNS)
 If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).
bool isUnknownSpecialization (const CXXScopeSpec &SS)
bool ActOnCXXGlobalScopeSpecifier (Scope *S, SourceLocation CCLoc, CXXScopeSpec &SS)
 The parser has parsed a global nested-name-specifier '::'.
bool isAcceptableNestedNameSpecifier (NamedDecl *SD)
 Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.
NamedDeclFindFirstQualifierInScope (Scope *S, NestedNameSpecifier *NNS)
 If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup.
bool 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)
 Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
bool ActOnCXXNestedNameSpecifier (Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, ParsedType ObjectType, bool EnteringContext, CXXScopeSpec &SS)
 The parser has parsed a nested-name-specifier 'identifier::'.
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)
bool ActOnCXXNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, 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 >::'.
void * SaveNestedNameSpecifierAnnotation (CXXScopeSpec &SS)
 Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier.
void RestoreNestedNameSpecifierAnnotation (void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
 Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
bool ShouldEnterDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
bool ActOnCXXEnterDeclaratorScope (Scope *S, CXXScopeSpec &SS)
void ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
void ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl)
void ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl)
void ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
void ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope)
ExprResult ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
ExprResult ParseObjCStringLiteral (SourceLocation *AtLocs, Expr **Strings, unsigned NumStrings)
ExprResult BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
ExprResult BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXMethodDecl *Method, bool HadMultipleCandidates)
ExprResult ParseObjCEncodeExpression (SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
ExprResult ParseObjCSelectorExpression (Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc)
ExprResult ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation RParenLoc)
DeclActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, SourceLocation LangLoc, StringRef Lang, SourceLocation LBraceLoc)
DeclActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
bool isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=0)
bool ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, AttributeList *Attrs=0)
 ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
DeclActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, bool HasDeferredInit)
void ActOnCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using parentheses syntax.
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using braced-init-list syntax.
MemInitResult BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, const MultiInitializer &Init, SourceLocation EllipsisLoc)
 Handle a C++ member initializer.
MemInitResult BuildMemberInitializer (ValueDecl *Member, const MultiInitializer &Args, SourceLocation IdLoc)
MemInitResult BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, const MultiInitializer &Args, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
MemInitResult BuildDelegatingInitializer (TypeSourceInfo *TInfo, const MultiInitializer &Args, CXXRecordDecl *ClassDecl)
bool SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
bool SetCtorInitializers (CXXConstructorDecl *Constructor, CXXCtorInitializer **Initializers, unsigned NumInitializers, bool AnyErrors)
void SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation)
void MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record)
void LoadExternalVTableUses ()
 Load any externally-stored vtable uses.
void MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
 Note that the vtable for the given class was used at the given location.
void MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD)
bool DefineUsedVTables ()
 Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.
void AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl)
void ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, CXXCtorInitializer **MemInits, unsigned NumMemInits, bool AnyErrors)
 ActOnMemInitializers - Handle the member initializers for a constructor.
void CheckCompletedCXXClass (CXXRecordDecl *Record)
 Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc.
void ActOnFinishCXXMemberSpecification (Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
void ActOnReenterTemplateScope (Scope *S, Decl *Template)
void ActOnReenterDeclaratorTemplateScope (Scope *S, DeclaratorDecl *D)
void ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
void ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param)
void ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
void ActOnFinishDelayedMemberInitializers (Decl *Record)
void MarkAsLateParsedTemplate (FunctionDecl *FD, bool Flag=true)
bool IsInsideALocalClassWithinATemplateFunction ()
DeclActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
FriendDeclCheckFriendTypeDecl (SourceLocation Loc, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
 Perform semantic analysis of the given friend type declaration.
DeclActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
DeclActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
QualType CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
void CheckConstructor (CXXConstructorDecl *Constructor)
QualType CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
bool CheckDestructor (CXXDestructorDecl *Destructor)
void CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC)
DeclActOnConversionDeclarator (CXXConversionDecl *Conversion)
void CheckExplicitlyDefaultedMethods (CXXRecordDecl *Record)
void CheckExplicitlyDefaultedDefaultConstructor (CXXConstructorDecl *Ctor)
void CheckExplicitlyDefaultedCopyConstructor (CXXConstructorDecl *Ctor)
void CheckExplicitlyDefaultedCopyAssignment (CXXMethodDecl *Method)
void CheckExplicitlyDefaultedMoveConstructor (CXXConstructorDecl *Ctor)
void CheckExplicitlyDefaultedMoveAssignment (CXXMethodDecl *Method)
void CheckExplicitlyDefaultedDestructor (CXXDestructorDecl *Dtor)
CXXBaseSpecifierCheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
 ActOnBaseSpecifier - Parsed a base specifier.
BaseResult ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
bool AttachBaseSpecifiers (CXXRecordDecl *Class, CXXBaseSpecifier **Bases, unsigned NumBases)
 Performs the actual work of attaching the given base class specifiers to a C++ class.
void ActOnBaseSpecifiers (Decl *ClassDecl, CXXBaseSpecifier **Bases, unsigned NumBases)
bool IsDerivedFrom (QualType Derived, QualType Base)
 Determine whether the type Derived is a C++ class that is derived from the type Base.
bool IsDerivedFrom (QualType Derived, QualType Base, CXXBasePaths &Paths)
 Determine whether the type Derived is a C++ class that is derived from the type Base.
void BuildBasePathArray (const CXXBasePaths &Paths, CXXCastPath &BasePath)
bool BasePathInvolvesVirtualBase (const CXXCastPath &BasePath)
 Determine whether the given base path includes a virtual base class.
bool CheckDerivedToBaseConversion (QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=0, bool IgnoreAccess=false)
bool CheckDerivedToBaseConversion (QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbigiousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath)
std::string getAmbiguousPathsDisplayString (CXXBasePaths &Paths)
 Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.
bool CheckOverridingFunctionReturnType (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange)
 Mark the given method pure.
void CheckOverrideControl (const Decl *D)
 CheckOverrideControl - Check C++0x override control semantics.
bool CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
AccessResult CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
AccessResult CheckUnresolvedLookupAccess (UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
AccessResult CheckAllocationAccess (SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
 Checks access to an overloaded operator new or delete.
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, bool IsCopyBindingRefToTemp=false)
 Checks access to a constructor.
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, AccessSpecifier Access, PartialDiagnostic PD)
 Checks access to a constructor.
AccessResult CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag)
AccessResult CheckDirectMemberAccess (SourceLocation Loc, NamedDecl *D, const PartialDiagnostic &PDiag)
AccessResult CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl)
AccessResult CheckAddressOfMemberAccess (Expr *OvlExpr, DeclAccessPair FoundDecl)
AccessResult CheckBaseClassAccess (SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
void CheckLookupAccess (const LookupResult &R)
 Checks access to all the declarations in the given result set.
bool IsSimplyAccessible (NamedDecl *decl, DeclContext *Ctx)
void HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
void PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
void HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
void ActOnStartSuppressingAccessChecks ()
void ActOnStopSuppressingAccessChecks ()
bool RequireNonAbstractType (SourceLocation Loc, QualType T, const PartialDiagnostic &PD)
void DiagnoseAbstractType (const CXXRecordDecl *RD)
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, AbstractDiagSelID SelID=AbstractNone)
bool CheckOverloadedOperatorDeclaration (FunctionDecl *FnDecl)
bool CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl)
void FilterAcceptableTemplateNames (LookupResult &R)
bool hasAnyAcceptableTemplateNames (LookupResult &R)
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)
TemplateDeclAdjustDeclIfTemplate (Decl *&Decl)
DeclActOnTypeParameter (Scope *S, bool Typename, bool Ellipsis, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg)
QualType CheckNonTypeTemplateParameterType (QualType T, SourceLocation Loc)
 Check that the type of a non-type template parameter is well-formed.
DeclActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
DeclActOnTemplateTemplateParameter (Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
TemplateParameterListActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, Decl **Params, unsigned NumParams, SourceLocation RAngleLoc)
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.
TemplateParameterListMatchTemplateParametersToScopeSpecifier (SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateParameterList **ParamLists, unsigned NumParamLists, 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.
DeclResult CheckClassTemplate (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists)
void translateTemplateArguments (const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
 Translates template arguments as provided by the parser into template arguments used by semantic analysis.
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>.
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.
DeclResult ActOnClassTemplateSpecialization (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, AttributeList *Attr, MultiTemplateParamsArg TemplateParameterLists)
DeclActOnTemplateDeclarator (Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
DeclActOnStartOfFunctionTemplateDef (Scope *FnBodyScope, 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.
bool 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:
bool CheckFunctionTemplateSpecialization (FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous)
 Perform semantic analysis for the given function template specialization.
bool CheckMemberSpecialization (NamedDecl *Member, LookupResult &Previous)
 Perform semantic analysis for the given non-template member specialization.
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)
 If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument.
bool CheckTemplateArgument (NamedDecl *Param, const 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.
bool CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted, bool *ExpansionIntoFixedList=0)
 Check that the given template arguments can be be provided to the given template, converting the arguments along the way.
bool CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, const TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
bool CheckTemplateArgument (TemplateTypeParmDecl *Param, TypeSourceInfo *Arg)
 Check a template argument against its corresponding template type parameter.
bool CheckTemplateArgumentPointerToMember (Expr *Arg, TemplateArgument &Converted)
 Checks whether the given template argument is a pointer to member constant according to C++ [temp.arg.nontype]p1.
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.
bool CheckTemplateArgument (TemplateTemplateParmDecl *Param, const TemplateArgumentLoc &Arg)
 Check a template argument against its corresponding template template parameter.
ExprResult BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
 Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration.
ExprResult BuildExpressionFromIntegralTemplateArgument (const TemplateArgument &Arg, SourceLocation Loc)
 Construct a new expression that refers to the given integral template argument with the given source-location information.
bool TemplateParameterListsAreEqual (TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
 Determine whether the given template parameter lists are equivalent.
bool CheckTemplateDeclScope (Scope *S, TemplateParameterList *TemplateParams)
 Check whether a template can be declared within this scope.
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
 Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateLoc, TemplateTy Template, 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>".
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".
TypeSourceInfoRebuildTypeInCurrentInstantiation (TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
 Rebuilds a type within the context of the current instantiation.
bool RebuildNestedNameSpecifierInCurrentInstantiation (CXXScopeSpec &SS)
ExprResult RebuildExprInCurrentInstantiation (Expr *E)
bool RebuildTemplateParamsInCurrentInstantiation (TemplateParameterList *Params)
 Rebuild the template parameters now that we know we're in a current instantiation.
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgumentList &Args)
 Produces a formatted string that describes the binding of template parameters to template arguments.
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgument *Args, unsigned NumArgs)
void DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, const SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Diagnose unexpanded parameter packs.
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
 If the given type contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression)
 If the given expression contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (const CXXScopeSpec &SS, UnexpandedParameterPackContext UPPC)
 If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (const DeclarationNameInfo &NameInfo, UnexpandedParameterPackContext UPPC)
 If the given name contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TemplateName Template, UnexpandedParameterPackContext UPPC)
 If the given template name contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (TemplateArgumentLoc Arg, UnexpandedParameterPackContext UPPC)
 If the given template argument contains an unexpanded parameter pack, diagnose the error.
void collectUnexpandedParameterPacks (TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
void collectUnexpandedParameterPacks (TemplateArgumentLoc Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
void collectUnexpandedParameterPacks (QualType T, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
void collectUnexpandedParameterPacks (TypeLoc TL, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
void collectUnexpandedParameterPacks (CXXScopeSpec &SS, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given nested-name-specifier.
void collectUnexpandedParameterPacks (const DeclarationNameInfo &NameInfo, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given name.
ParsedTemplateArgument ActOnPackExpansion (const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
 Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
TypeResult ActOnPackExpansion (ParsedType Type, SourceLocation EllipsisLoc)
 Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.
TypeSourceInfoCheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, llvm::Optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
QualType CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, llvm::Optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
ExprResult ActOnPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
ExprResult CheckPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, llvm::Optional< unsigned > NumExpansions)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
bool CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, llvm::ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, llvm::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.
unsigned getNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
 Determine the number of arguments in the given pack expansion type.
bool containsUnexpandedParameterPacks (Declarator &D)
 Determine whether the given declarator contains any unexpanded parameter packs.
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].
TemplateDeductionResult SubstituteExplicitTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
 Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit].
TemplateDeductionResult FinishTemplateArgumentDeduction (FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=0)
 Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, Expr **Args, unsigned NumArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction from a function call (C++ [temp.deduct.call]).
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).
DeduceAutoResult DeduceAutoType (TypeSourceInfo *AutoType, Expr *&Initializer, TypeSourceInfo *&Result)
 Deduce the type for an auto type-specifier (C++0x [dcl.spec.auto]p6)
void DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init)
FunctionTemplateDeclgetMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments)
 Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
UnresolvedSetIterator getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments, 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.
ClassTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
 Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).
void MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
 Mark the template parameters can be deduced by the given template argument list.
void MarkDeducedTemplateParameters (FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
MultiLevelTemplateArgumentList getTemplateInstantiationArgs (NamedDecl *D, const TemplateArgumentList *Innermost=0, bool RelativeToPrimary=false, const FunctionDecl *Pattern=0)
 Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
void PrintInstantiationStack ()
 Prints the current instantiation stack through a series of notes.
llvm::Optional
< sema::TemplateDeductionInfo * > 
isSFINAEContext () const
 Determines whether we are currently in a context where template argument substitution failures are not considered errors.
void PerformPendingInstantiations (bool LocalOnly=false)
 Performs template instantiation for all implicit template instantiations we have seen until this point.
TypeSourceInfoSubstType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 Perform substitution on the type T with a given set of template arguments.
QualType SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 Deprecated form of the above.
TypeSourceInfoSubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
TypeSourceInfoSubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
ParmVarDeclSubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, llvm::Optional< unsigned > NumExpansions, bool ExpectParameterPack)
bool SubstParmTypes (SourceLocation Loc, ParmVarDecl **Params, unsigned NumParams, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams=0)
 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.
ExprResult SubstExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
bool SubstExprs (Expr **Exprs, unsigned NumExprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
 Substitute the given template arguments into a list of expressions, expanding pack expansions if required.
StmtResult SubstStmt (Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclSubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
bool SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Perform substitution on the base class specifiers of the given class template specialization.
bool InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
 Instantiate the definition of a class from a given pattern.
void InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=0, LocalInstantiationScope *OuterMostScope=0)
bool InstantiateClassTemplateSpecialization (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
void InstantiateClassMembers (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.
void InstantiateClassTemplateSpecializationMembers (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
 Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclarationNameInfo SubstDeclarationNameInfo (const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
 Do template substitution on declaration name info.
TemplateName SubstTemplateName (NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
bool Subst (const TemplateArgumentLoc *Args, unsigned NumArgs, TemplateArgumentListInfo &Result, const MultiLevelTemplateArgumentList &TemplateArgs)
void InstantiateFunctionDefinition (SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false)
 Instantiate the definition of the given function from its template.
void InstantiateStaticDataMemberDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
 Instantiate the definition of the given variable from its template.
void InstantiateMemInitializers (CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
bool InstantiateInitializer (Expr *Init, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation &LParenLoc, ASTOwningVector< Expr * > &NewArgs, SourceLocation &RParenLoc)
 Instantiate an initializer, breaking it into separate initialization arguments.
NamedDeclFindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs)
 Find the instantiation of the given declaration within the current instantiation.
DeclContextFindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
 Finds the instantiation of the given declaration context within the current instantiation.
ObjCContainerKind getObjCContainerKind () const
DeclActOnStartClassInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
DeclActOnCompatiblityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
bool CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
DeclActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
DeclActOnStartCategoryInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc)
DeclActOnStartClassImplementation (SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc)
DeclActOnStartCategoryImplementation (SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc)
DeclGroupPtrTy ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, unsigned NumElts)
 ActOnForwardClassDeclaration -.
DeclGroupPtrTy ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, const IdentifierLocPair *IdentList, unsigned NumElts, AttributeList *attrList)
void FindProtocolDeclaration (bool WarnOnDeclarations, const IdentifierLocPair *ProtocolId, unsigned NumProtocols, SmallVectorImpl< Decl * > &Protocols)
void CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes)
void ProcessPropertyDecl (ObjCPropertyDecl *property, ObjCContainerDecl *DC, ObjCPropertyDecl *redeclaredProperty=0, ObjCContainerDecl *lexicalDC=0)
void DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name)
void ComparePropertiesInBaseAndSuper (ObjCInterfaceDecl *IDecl)
void CompareMethodParamsInBaseAndSuper (Decl *IDecl, ObjCMethodDecl *MethodDecl, bool IsInstance)
void CompareProperties (Decl *CDecl, Decl *MergeProtocols)
void DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
void MatchOneProtocolPropertiesInClass (Decl *CDecl, ObjCProtocolDecl *PDecl)
DeclActOnAtEnd (Scope *S, SourceRange AtEnd, Decl **allMethods=0, unsigned allNum=0, Decl **allProperties=0, unsigned pNum=0, DeclGroupPtrTy *allTUVars=0, unsigned tuvNum=0)
DeclActOnProperty (Scope *S, SourceLocation AtLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, bool *OverridingProperty, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=0)
DeclActOnPropertyImplDecl (Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc)
DeclActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
ObjCMethodDeclLookupPrivateClassMethod (Selector Sel, ObjCInterfaceDecl *CDecl)
ObjCMethodDeclLookupPrivateInstanceMethod (Selector Sel, ObjCInterfaceDecl *ClassDecl)
ObjCMethodDeclLookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
ObjCMethodDeclLookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
 LookupMethodInType - Look up a method in an ObjCObjectType.
bool inferObjCARCLifetime (ValueDecl *decl)
ExprResult HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
ExprResult ActOnClassPropertyRefExpr (IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
ObjCMethodDecltryCaptureObjCSelf (SourceLocation Loc)
 Try to capture an implicit reference to 'self'.
ObjCMessageKind getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
ExprResult ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C class message expression.
ExprResult BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C instance message expression.
ExprResult BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
ExprResult ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
bool checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
void CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden, bool IsImplementation)
 Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
bool CheckObjCMethodOverrides (ObjCMethodDecl *NewMethod, DeclContext *DC)
 Check whether the given method overrides any methods in its class, calling CheckObjCMethodOverride for each overridden method.
void ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc, SourceLocation KindLoc)
 ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
void ActOnPragmaPack (PragmaPackKind Kind, IdentifierInfo *Name, Expr *Alignment, SourceLocation PragmaLoc, SourceLocation LParenLoc, SourceLocation RParenLoc)
 ActOnPragmaPack - Called on well formed #pragma pack(...).
void ActOnPragmaMSStruct (PragmaMSStructKind Kind)
 ActOnPragmaMSStruct - Called on well formed #pragms ms_struct [on|off].
void ActOnPragmaUnused (const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
 ActOnPragmaUnused - Called on well-formed '#pragma unused'.
void ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc)
 ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
NamedDeclDeclClonePragmaWeak (NamedDecl *ND, IdentifierInfo *II, SourceLocation Loc)
void DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, WeakInfo &W)
void ActOnPragmaWeakID (IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
 ActOnPragmaWeakID - Called on well formed #pragma weak ident.
void ActOnPragmaWeakAlias (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
 ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
void ActOnPragmaFPContract (tok::OnOffSwitch OOS)
void AddAlignmentAttributesForRecord (RecordDecl *RD)
void AddMsStructLayoutForRecord (RecordDecl *RD)
 AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
void FreePackedContext ()
 FreePackedContext - Deallocate and null out PackContext.
void PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc)
void AddPushedVisibilityAttribute (Decl *RD)
void PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc)
void FreeVisContext ()
 FreeVisContext - Deallocate and null out VisContext.
void AddCFAuditedAttribute (Decl *D)
void AddAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E)
 AddAlignedAttr - Adds an aligned attribute to a particular declaration.
void AddAlignedAttr (SourceRange AttrRange, Decl *D, TypeSourceInfo *T)
ExprResult ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=0, CheckedConversionKind CCK=CCK_ImplicitConversion)
ExprResult IgnoredValueConversions (Expr *E)
ExprResult UsualUnaryConversions (Expr *E)
ExprResult DefaultFunctionArrayConversion (Expr *E)
 DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
ExprResult DefaultFunctionArrayLvalueConversion (Expr *E)
ExprResult DefaultLvalueConversion (Expr *E)
ExprResult DefaultArgumentPromotion (Expr *E)
bool GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstProtoArg, Expr **Args, unsigned NumArgs, SmallVector< Expr *, 8 > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply)
ExprResult DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
QualType UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, bool IsCompAssign=false)
bool DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=0)
AssignConvertType CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType)
AssignConvertType CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind)
AssignConvertType CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true)
AssignConvertType CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS)
bool IsStringLiteralToNonConstPointerConversion (Expr *From, QualType ToType)
bool CheckExceptionSpecCompatibility (Expr *From, QualType ToType)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
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)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK)
QualType InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
 type checking binary operators (subroutines of CreateBuiltinBinOp).
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, QualType *CompLHSTy=0)
QualType CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=0)
QualType CheckShiftOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, bool IsCompAssign=false)
QualType CheckCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned OpaqueOpc, bool isRelational)
QualType CheckBitwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
QualType CheckLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned 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.
ExprResult checkPseudoObjectAssignment (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
ExprResult checkPseudoObjectRValue (Expr *E)
ExprrecreateSyntacticForm (PseudoObjectExpr *E)
QualType CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
QualType CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
 Check the operands of ?: under C++ semantics.
QualType FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool *NonStandardCompositeType=0)
 Find a merged pointer type and convert the two expressions to it.
QualType FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool *NonStandardCompositeType=0)
QualType FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
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. Returns true if a diagnostic is emitted.
QualType CheckVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
 type checking for vector binary operators.
QualType GetSignedVectorType (QualType V)
QualType CheckVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool isRelational)
QualType CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
bool CheckForConstantInitializer (Expr *e, QualType t)
 type checking declaration initializers (C99 6.7.8)
ReferenceCompareResult CompareReferenceRelationship (SourceLocation Loc, QualType T1, QualType T2, bool &DerivedToBase, bool &ObjCConversion, bool &ObjCLifetimeConversion)
ExprResult checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
ExprResult forceUnknownAnyToType (Expr *E, QualType ToType)
 Force an expression with unknown-type to an expression of the given type.
bool CheckVectorCast (SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
ExprResult CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
ExprResult BuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
ARCConversionResult CheckObjCARCConversion (SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK)
 Checks for invalid conversions and casts between retainable pointers and other pointer kinds.
ExprstripARCUnbridgedCast (Expr *e)
void diagnoseARCUnbridgedCast (Expr *e)
bool CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType)
void checkRetainCycles (ObjCMessageExpr *msg)
 Check a message send to see if it's likely to cause a retain cycle.
void checkRetainCycles (Expr *receiver, Expr *argument)
 Check a property assign to see if it's likely to cause a retain cycle.
bool checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS)
void checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
bool CheckMessageArgumentTypes (QualType ReceiverType, Expr **Args, unsigned NumArgs, Selector Sel, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, QualType &ReturnType, ExprValueKind &VK)
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.
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.
ExprResult CheckBooleanCondition (Expr *E, SourceLocation Loc)
ExprResult ActOnBooleanCondition (Scope *S, SourceLocation Loc, Expr *SubExpr)
void DiagnoseAssignmentAsCondition (Expr *E)
void DiagnoseEqualityWithExtraParens (ParenExpr *ParenE)
 Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.
ExprResult CheckCXXBooleanCondition (Expr *CondExpr)
 CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
void ConvertIntegerToTypeWarnOnOverflow (llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
bool CheckObjCDeclScope (Decl *D)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, PartialDiagnostic Diag, bool AllowFold, PartialDiagnostic FoldDiag)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, PartialDiagnostic Diag, bool AllowFold=true)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=0)
ExprResult VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, Expr *BitWidth, bool *ZeroWidth=0)
CUDAFunctionTarget IdentifyCUDATarget (const FunctionDecl *D)
 IdentifyCUDATarget - Determine the CUDA compilation target for this function.
bool CheckCUDATarget (CUDAFunctionTarget CallerTarget, CUDAFunctionTarget CalleeTarget)
bool CheckCUDATarget (const FunctionDecl *Caller, const FunctionDecl *Callee)
SourceLocation getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const
ExprResult SemaBuiltinShuffleVector (CallExpr *TheCall)
 SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
ScopegetCurScope () const
 Retrieve the parser's current scope.
DeclgetObjCDeclContext () const
DeclContextgetCurLexicalContext () const
AvailabilityResult getCurContextAvailability () const

Static Public Member Functions

static QualType GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=0)
static PrintingPolicy getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP)
 Retrieve a suitable printing policy.
static ScopegetScopeForDeclContext (Scope *S, DeclContext *DC)
static void MarkDeducedTemplateParameters (ASTContext &Ctx, FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
 Marks all of the template parameters that will be deduced by a call to the given function template.
static CastKind ScalarTypeToBooleanCastKind (QualType ScalarTy)

Public Attributes

OpenCLOptions OpenCLFeatures
FPOptions FPFeatures
const LangOptionsLangOpts
PreprocessorPP
ASTContextContext
ASTConsumerConsumer
DiagnosticsEngineDiags
SourceManagerSourceMgr
bool CollectStats
 Flag indicating whether or not to collect detailed statistics.
ExternalSemaSourceExternalSource
 Source of additional semantic information.
CodeCompleteConsumerCodeCompleter
 Code-completion consumer.
DeclContextCurContext
 CurContext - This is the current declaration context of parsing.
DeclContextOriginalLexicalContext
 Generally null except when we temporarily switch decl contexts, like in.
DeclarationName VAListTagName
void * PackContext
bool MSStructPragmaOn
void * VisContext
 VisContext - Manages the stack for #pragma GCC visibility.
bool ExprNeedsCleanups
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
llvm::SmallPtrSet< Expr *, 8 > MaybeODRUseExprs
SmallVector
< sema::FunctionScopeInfo *, 4 > 
FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
ExtVectorDeclsType ExtVectorDecls
llvm::SmallPtrSet< NamedDecl *, 4 > HiddenDefinitions
 The set of types for which we have already complained about the definitions being hidden.
OwningPtr< CXXFieldCollectorFieldCollector
 FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
OwningPtr< RecordDeclSetTyPureVirtualClassDiagSet
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
llvm::DenseMap
< DeclarationName, NamedDecl * > 
LocallyScopedExternalDecls
 A mapping from external names to the most recent locally-scoped external declaration with that name.
TentativeDefinitionsType TentativeDefinitions
 All the tentative definitions encountered in the TU.
UnusedFileScopedDeclsType 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.
DelegatingCtorDeclsType DelegatingCtorDecls
 All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.
SmallVector< std::pair< const
CXXDestructorDecl *, const
CXXDestructorDecl * >, 2 > 
DelayedDestructorExceptionSpecChecks
 All the overriding destructors seen during a class definition (there could be multiple due to nested classes) that had their exception spec checks delayed, plus the overridden destructor.
LateTemplateParserCBLateTemplateParser
void * OpaqueParser
class
clang::Sema::DelayedDiagnostics 
DelayedDiagnostics
llvm::DenseMap< IdentifierInfo
*, WeakInfo
WeakUndeclaredIdentifiers
SmallVector< Decl *, 2 > WeakTopLevelDecl
IdentifierResolver IdResolver
ScopeTUScope
LazyDeclPtr StdNamespace
 The C++ "std" namespace, where the standard library resides.
LazyDeclPtr StdBadAlloc
 The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
ClassTemplateDeclStdInitializerList
 The C++ "std::initializer_list" template, which is defined in <initializer_list>.
RecordDeclCXXTypeInfoDecl
 The C++ "type_info" declaration, which is defined in <typeinfo>.
RecordDeclMSVCGuidDecl
 The MSVC "_GUID" struct, which is defined in MSVC header files.
bool GlobalNewDeleteDeclared
bool ObjCShouldCallSuperDealloc
bool ObjCShouldCallSuperFinalize
SmallVector
< ExpressionEvaluationContextRecord, 8 > 
ExprEvalContexts
 A stack of expression evaluation contexts.
llvm::FoldingSet
< SpecialMemberOverloadResult
SpecialMemberCache
 A cache of special member function overload resolution results for C++ records.
TranslationUnitKind TUKind
 The kind of translation unit we are processing.
llvm::BumpPtrAllocator BumpAlloc
unsigned NumSFINAEErrors
 The number of SFINAE diagnostics that have been trapped.
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
 A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.
llvm::DenseMap< ParmVarDecl
*, SourceLocation
UnparsedDefaultArgLocs
llvm::DenseMap< NamedDecl
*, SourceLocation
UndefinedInternals
GlobalMethodPool MethodPool
llvm::DenseMap< Selector,
SourceLocation
ReferencedSelectors
SmallVector< VTableUse, 16 > VTableUses
 The list of vtables that are required but have not yet been materialized.
llvm::DenseMap< CXXRecordDecl
*, bool > 
VTablesUsed
 The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).
DynamicClassesType DynamicClasses
 A list of all of the dynamic classes in this translation unit.
bool SuppressAccessChecking
 A flag to suppress access checking.
bool AccessCheckingSFINAE
 When true, access checking violations are treated as SFINAE failures rather than hard errors.
SmallVector
< ActiveTemplateInstantiation, 16 > 
ActiveTemplateInstantiations
 List of active template instantiations.
bool InNonInstantiationSFINAEContext
 Whether we are in a SFINAE context that is not associated with template instantiation.
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.
ActiveTemplateInstantiation LastTemplateInstantiationErrorContext
 The last template from which a template instantiation error or warning was produced.
int ArgumentPackSubstitutionIndex
 The current index into pack expansion arguments that will be used for substitution of parameter packs.
SmallVector< CallExpr *, 8 > CallsUndergoingInstantiation
 The stack of calls expression undergoing template instantiation.
llvm::DenseMap< Decl
*, SmallVector
< PartialDiagnosticAt, 1 > > 
SuppressedDiagnostics
 For each declaration that involved template argument deduction, the set of diagnostics that were suppressed during that template argument deduction.
LocalInstantiationScopeCurrentInstantiationScope
 The current instantiation scope used to store local variables.
unsigned TyposCorrected
 The number of typos corrected by CorrectTypo.
UnqualifiedTyposCorrectedMap UnqualifiedTyposCorrected
 A cache containing the results of typo correction for unqualified name lookup.
sema::AnalysisBasedWarnings AnalysisWarnings
 Worker object for performing CFG-based warnings.
std::deque
< PendingImplicitInstantiation
PendingInstantiations
 The queue of implicit template instantiations that are required but have not yet been performed.
std::deque
< PendingImplicitInstantiation
PendingLocalImplicitInstantiations
 The queue of implicit template instantiations that are required and must be performed within the current local scope.

Friends

class ArgumentPackSubstitutionRAII
class Parser
class InitializationSequence
class ASTReader
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, 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. a reference). More...
NamedDeclLookupSingleName (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.
bool LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
 Perform unqualified name lookup starting from a given scope.
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
 Perform qualified name lookup into a given context.
bool LookupParsedName (LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
 Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.
ObjCProtocolDeclLookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
 Find the protocol with the given name, if any.
void LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions)
LabelDeclLookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
DeclContextLookupResult LookupConstructors (CXXRecordDecl *Class)
 Look up the constructors for the given class.
CXXConstructorDeclLookupDefaultConstructor (CXXRecordDecl *Class)
 Look up the default constructor for the given class.
CXXConstructorDeclLookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals, bool *ConstParam=0)
 Look up the copying constructor for the given class.
CXXMethodDeclLookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals, bool *ConstParam=0)
 Look up the copying assignment operator for the given class.
CXXConstructorDeclLookupMovingConstructor (CXXRecordDecl *Class)
 Look up the moving constructor for the given class.
CXXMethodDeclLookupMovingAssignment (CXXRecordDecl *Class, bool RValueThis, unsigned ThisQuals)
 Look up the moving assignment operator for the given class.
CXXDestructorDeclLookupDestructor (CXXRecordDecl *Class)
 Look for the destructor of the given class.
void ArgumentDependentLookup (DeclarationName Name, bool Operator, Expr **Args, unsigned NumArgs, ADLResult &Functions, bool StdNamespaceIsAssociated=false)
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, CorrectionCandidateCallback &CCC, DeclContext *MemberContext=0, bool EnteringContext=false, const ObjCObjectPointerType *OPT=0)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
void FindAssociatedClassesAndNamespaces (Expr **Args, unsigned NumArgs, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
 Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
void FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool ExplicitInstantiationOrSpecialization)
bool DiagnoseAmbiguousLookup (LookupResult &Result)
 Produce a diagnostic describing the ambiguity that resulted from name lookup.

Code completion

enum  ParserCompletionContext {
  PCC_Namespace, PCC_Class, PCC_ObjCInterface, PCC_ObjCImplementation,
  PCC_ObjCInstanceVariableList, PCC_Template, PCC_MemberTemplate, PCC_Expression,
  PCC_Statement, PCC_ForInit, PCC_Condition, PCC_RecoveryInFunction,
  PCC_Type, PCC_ParenthesizedExpression, PCC_LocalDeclarationSpecifiers
}
 Describes the context in which code completion occurs. More...
void CodeCompleteModuleImport (SourceLocation ImportLoc, ModuleIdPath Path)
void CodeCompleteOrdinaryName (Scope *S, ParserCompletionContext CompletionContext)
void CodeCompleteDeclSpec (Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
void CodeCompleteExpression (Scope *S, const CodeCompleteExpressionData &Data)
 Perform code-completion in an expression context when we know what type we're looking for.
void CodeCompleteMemberReferenceExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool IsArrow)
void CodeCompletePostfixExpression (Scope *S, ExprResult LHS)
void CodeCompleteTag (Scope *S, unsigned TagSpec)
void CodeCompleteTypeQualifiers (DeclSpec &DS)
void CodeCompleteCase (Scope *S)
void CodeCompleteCall (Scope *S, Expr *Fn, Expr **Args, unsigned NumArgs)
void CodeCompleteInitializer (Scope *S, Decl *D)
void CodeCompleteReturn (Scope *S)
void CodeCompleteAfterIf (Scope *S)
void CodeCompleteAssignmentRHS (Scope *S, Expr *LHS)
void CodeCompleteQualifiedId (Scope *S, CXXScopeSpec &SS, bool EnteringContext)
void CodeCompleteUsing (Scope *S)
void CodeCompleteUsingDirective (Scope *S)
void CodeCompleteNamespaceDecl (Scope *S)
void CodeCompleteNamespaceAliasDecl (Scope *S)
void CodeCompleteOperatorName (Scope *S)
void CodeCompleteConstructorInitializer (Decl *Constructor, CXXCtorInitializer **Initializers, unsigned NumInitializers)
void CodeCompleteObjCAtDirective (Scope *S)
void CodeCompleteObjCAtVisibility (Scope *S)
void CodeCompleteObjCAtStatement (Scope *S)
void CodeCompleteObjCAtExpression (Scope *S)
void CodeCompleteObjCPropertyFlags (Scope *S, ObjCDeclSpec &ODS)
void CodeCompleteObjCPropertyGetter (Scope *S)
void CodeCompleteObjCPropertySetter (Scope *S)
void CodeCompleteObjCPassingType (Scope *S, ObjCDeclSpec &DS, bool IsParameter)
void CodeCompleteObjCMessageReceiver (Scope *S)
void CodeCompleteObjCSuperMessage (Scope *S, SourceLocation SuperLoc, IdentifierInfo **SelIdents, unsigned NumSelIdents, bool AtArgumentExpression)
void CodeCompleteObjCClassMessage (Scope *S, ParsedType Receiver, IdentifierInfo **SelIdents, unsigned NumSelIdents, bool AtArgumentExpression, bool IsSuper=false)
void CodeCompleteObjCInstanceMessage (Scope *S, Expr *Receiver, IdentifierInfo **SelIdents, unsigned NumSelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=0)
void CodeCompleteObjCForCollection (Scope *S, DeclGroupPtrTy IterationVar)
void CodeCompleteObjCSelector (Scope *S, IdentifierInfo **SelIdents, unsigned NumSelIdents)
void CodeCompleteObjCProtocolReferences (IdentifierLocPair *Protocols, unsigned NumProtocols)
void CodeCompleteObjCProtocolDecl (Scope *S)
void CodeCompleteObjCInterfaceDecl (Scope *S)
void CodeCompleteObjCSuperclass (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCImplementationDecl (Scope *S)
void CodeCompleteObjCInterfaceCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCImplementationCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCPropertyDefinition (Scope *S)
void CodeCompleteObjCPropertySynthesizeIvar (Scope *S, IdentifierInfo *PropertyName)
void CodeCompleteObjCMethodDecl (Scope *S, bool IsInstanceMethod, ParsedType ReturnType)
void CodeCompleteObjCMethodDeclSelector (Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, IdentifierInfo **SelIdents, unsigned NumSelIdents)
void CodeCompletePreprocessorDirective (bool InConditional)
void CodeCompleteInPreprocessorConditionalExclusion (Scope *S)
void CodeCompletePreprocessorMacroName (bool IsDefinition)
void CodeCompletePreprocessorExpression ()
void CodeCompletePreprocessorMacroArgument (Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
void CodeCompleteNaturalLanguage ()
void GatherGlobalCodeCompletions (CodeCompletionAllocator &Allocator, SmallVectorImpl< CodeCompletionResult > &Results)

Detailed Description

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

Definition at line 179 of file Sema.h.


Member Typedef Documentation

typedef llvm::SmallPtrSet<CXXRecordDecl *, 16> clang::Sema::AssociatedClassSet

Definition at line 1458 of file Sema.h.

typedef llvm::SmallPtrSet<DeclContext *, 16> clang::Sema::AssociatedNamespaceSet

Definition at line 1457 of file Sema.h.

Definition at line 184 of file Sema.h.

typedef LazyVector<CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2> clang::Sema::DelegatingCtorDeclsType

Definition at line 323 of file Sema.h.

typedef LazyVector<CXXRecordDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDynamicClasses, 2, 2> clang::Sema::DynamicClassesType

Definition at line 3628 of file Sema.h.

typedef LazyVector<TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2> clang::Sema::ExtVectorDeclsType

Definition at line 248 of file Sema.h.

Definition at line 646 of file Sema.h.

Definition at line 645 of file Sema.h.

Definition at line 5209 of file Sema.h.

typedef void clang::Sema::LateTemplateParserCB(void *P, const FunctionDecl *FD)

Callback to the parser to parse templated functions when needed.

Definition at line 337 of file Sema.h.

Definition at line 2226 of file Sema.h.

An entity for which implicit template instantiation is required.

The source location associated with the declaration is the first place in the source code where the declaration was "used". It is not necessarily the point of instantiation (which will be either before or after the namespace-scope declaration that triggered this implicit instantiation), However, it is the location that diagnostics should generally refer to, because users will need to know what code triggered the instantiation.

Definition at line 5116 of file Sema.h.

Definition at line 1851 of file Sema.h.

typedef llvm::SmallPtrSet<const CXXRecordDecl*, 8> clang::Sema::RecordDeclSetTy

Definition at line 264 of file Sema.h.

typedef llvm::DenseSet<Selector, llvm::DenseMapInfo<Selector> > clang::Sema::SelectorSet

Definition at line 1850 of file Sema.h.

Definition at line 185 of file Sema.h.

typedef LazyVector<VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2> clang::Sema::TentativeDefinitionsType

Definition at line 308 of file Sema.h.

Definition at line 186 of file Sema.h.

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

Definition at line 626 of file Sema.h.

Definition at line 5095 of file Sema.h.

typedef LazyVector<const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2> clang::Sema::UnusedFileScopedDeclsType

Definition at line 315 of file Sema.h.

The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred.

Definition at line 3611 of file Sema.h.


Member Enumeration Documentation

Enumerator:
AbstractNone 
AbstractReturnType 
AbstractParamType 
AbstractVariableType 
AbstractFieldType 
AbstractArrayType 

Definition at line 3845 of file Sema.h.

Enumerator:
AR_accessible 
AR_inaccessible 
AR_dependent 
AR_delayed 

Definition at line 3778 of file Sema.h.

Enumerator:
ACR_okay 
ACR_unbridged 

Definition at line 6031 of file Sema.h.

AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed. These checks are done for simple assignments, as well as initialization, return from function, argument passing, etc. The query is phrased in terms of a source and destination type.

Enumerator:
Compatible 

Compatible - the types are compatible according to the standard.

PointerToInt 

PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.

IntToPointer 

IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.

FunctionVoidPointer 

FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard doesn't allow, but we accept as an extension.

IncompatiblePointer 

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

IncompatiblePointerSign 

IncompatiblePointer - The assignment is between two pointers types which point to integers which have a different sign, but are otherwise identical. This is a subset of the above, but broken out because it's by far the most common case of incompatible pointers.

CompatiblePointerDiscardsQualifiers 

CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an extension.

IncompatiblePointerDiscardsQualifiers 

IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be discarded, like address spaces.

IncompatibleNestedPointerQualifiers 

IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types, and the qualifiers other than the first two levels differ e.g. char ** -> const char **, but we accept them as an extension.

IncompatibleVectors 

IncompatibleVectors - The assignment is between two vector types that have the same size, which we accept as an extension.

IntToBlockPointer 

IntToBlockPointer - The assignment converts an int to a block pointer. We disallow this.

IncompatibleBlockPointer 

IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible.

IncompatibleObjCQualifiedId 

IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that is incompatible with it). For example, "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.

IncompatibleObjCWeakRef 

IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.

Incompatible 

Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.

Definition at line 5769 of file Sema.h.

Enumerator:
AA_Assigning 
AA_Passing 
AA_Returning 
AA_Converting 
AA_Initializing 
AA_Sending 
AA_Casting 

Definition at line 1327 of file Sema.h.

Contexts in which a converted constant expression is required.

Enumerator:
CCEK_CaseValue 

Expression in a case label.

CCEK_Enumerator 

Enumerator value with fixed underlying type.

CCEK_TemplateArg 

Value of a non-type template parameter.

Definition at line 1431 of file Sema.h.

The kind of constexpr declaration checking we are performing.

The kind affects which diagnostics (if any) are emitted if the function does not satisfy the requirements of a constexpr function declaration.

Enumerator:
CCK_Declaration 

Check a constexpr function declaration, and produce errors if it does not satisfy the requirements.

CCK_Instantiation 

Check a constexpr function template instantiation.

CCK_NoteNonConstexprInstantiation 

Produce notes explaining why an instantiation was not constexpr.

Definition at line 1007 of file Sema.h.

The kind of conversion being performed.

Enumerator:
CCK_ImplicitConversion 

An implicit conversion.

CCK_CStyleCast 

A C-style cast.

CCK_FunctionalCast 

A functional-style cast.

CCK_OtherCast 

A cast other than a C-style cast.

Definition at line 5679 of file Sema.h.

Specifies the context in which a particular template argument is being checked.

Enumerator:
CTAK_Specified 

The template argument was specified in the code or was instantiated with some deduced template arguments.

CTAK_Deduced 

The template argument was deduced via template argument deduction.

CTAK_DeducedFromArrayBound 

The template argument was deduced from an array bound via template argument deduction.

Definition at line 4095 of file Sema.h.

Enumerator:
CFT_Device 
CFT_Global 
CFT_Host 
CFT_HostDevice 

Definition at line 6139 of file Sema.h.

Enumerator:
CXXDefaultConstructor 
CXXCopyConstructor 
CXXMoveConstructor 
CXXCopyAssignment 
CXXMoveAssignment 
CXXDestructor 
CXXInvalid 

Definition at line 1183 of file Sema.h.

Result type of DeduceAutoType.

Enumerator:
DAR_Succeeded 
DAR_Failed 
DAR_FailedAlreadyDiagnosed 

Definition at line 4703 of file Sema.h.

Describes how the expressions currently being parsed are evaluated at run-time, if at all.

Enumerator:
Unevaluated 

The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7), such as the subexpression of sizeof, where the type of the expression may be significant but no code will be generated to evaluate the value of the expression at run time.

ConstantEvaluated 

The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at compile-time (like the values of cases in a switch statment).

PotentiallyEvaluated 

The current expression is potentially evaluated at run time, which means that code may be generated to evaluate the value of the expression at run time.

PotentiallyEvaluatedIfUsed 

The current expression is potentially evaluated, but any declarations referenced inside that expression are only used if in fact the current expression is used.

This value is used when parsing default function arguments, for which we would like to provide diagnostics (e.g., passing non-POD arguments through varargs) but do not want to mark declarations as "referenced" until the default argument is used.

Definition at line 519 of file Sema.h.

Describes the result of an "if-exists" condition check.

Enumerator:
IER_Exists 

The symbol exists.

IER_DoesNotExist 

The symbol does not exist.

IER_Dependent 

The name is a dependent name, so the results will differ from one instantiation to the next.

IER_Error 

An error occurred.

Definition at line 2620 of file Sema.h.

Describes the kind of name lookup to perform.

Enumerator:
LookupOrdinaryName 

Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc.) in C and most kinds of names (functions, variables, members, types, etc.) in C++.

LookupTagName 

Tag name lookup, which finds the names of enums, classes, structs, and unions.

LookupLabel 

Label name lookup.

LookupMemberName 

Member name lookup, which finds the names of class/struct/union members.

LookupOperatorName 

Look up of an operator name (e.g., operator+) for use with operator overloading. This lookup is similar to ordinary name lookup, but will ignore any declarations that are class members.

LookupNestedNameSpecifierName 

Look up of a name that precedes the '::' scope resolution operator in C++. This lookup completely ignores operator, object, function, and enumerator names (C++ [basic.lookup.qual]p1).

LookupNamespaceName 

Look up a namespace name within a C++ using directive or namespace alias definition, ignoring non-namespace names (C++ [basic.lookup.udir]p1).

LookupUsingDeclName 

Look up all declarations in a scope with the given name, including resolved using declarations. This is appropriate for checking redeclarations for a using declaration.

LookupRedeclarationWithLinkage 

Look up an ordinary name that is going to be redeclared as a name with linkage. This lookup ignores any declarations that are outside of the current scope unless they have linkage. See C99 6.2.2p4-5 and C++ [basic.link]p6.

LookupObjCProtocolName 

Look up the name of an Objective-C protocol.

LookupObjCImplicitSelfParam 

Look up implicit 'self' parameter of an objective-c method.

LookupAnyName 

Look up any declaration with any name.

Definition at line 1658 of file Sema.h.

Enumerator:
MMS_loose 
MMS_strict 

Definition at line 1941 of file Sema.h.

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_FunctionTemplate 

Definition at line 872 of file Sema.h.

Enumerator:
OCK_None 
OCK_Interface 
OCK_Protocol 
OCK_Category 
OCK_ClassExtension 
OCK_Implementation 
OCK_CategoryImplementation 

Definition at line 5272 of file Sema.h.

Describes the kind of message expression indicated by a message send that starts with an identifier.

Enumerator:
ObjCSuperMessage 

The message is sent to 'super'.

ObjCInstanceMessage 

The message is an instance message.

ObjCClassMessage 

The message is a class message, and the identifier is a type name.

Definition at line 5475 of file Sema.h.

Enumerator:
OSMK_None 
OSMK_Alloc 
OSMK_New 
OSMK_Copy 
OSMK_RetainingInit 
OSMK_NonRetainingInit 

Definition at line 5405 of file Sema.h.

C++ Overloading.

Enumerator:
Ovl_Overload 

This is a legitimate overload: the existing declarations are functions or function templates with different signatures.

Ovl_Match 

This is not an overload because the signature exactly matches an existing declaration.

Ovl_NonFunction 

This is not an overload because the lookup results contain a non-function.

Definition at line 1338 of file Sema.h.

Describes the context in which code completion occurs.

Enumerator:
PCC_Namespace 

Code completion occurs at top-level or namespace context.

PCC_Class 

Code completion occurs within a class, struct, or union.

PCC_ObjCInterface 

Code completion occurs within an Objective-C interface, protocol, or category.

PCC_ObjCImplementation 

Code completion occurs within an Objective-C implementation or category implementation.

PCC_ObjCInstanceVariableList 

Code completion occurs within the list of instance variables in an Objective-C interface, protocol, category, or implementation.

PCC_Template 

Code completion occurs following one or more template headers.

PCC_MemberTemplate 

Code completion occurs following one or more template headers within a class.

PCC_Expression 

Code completion occurs within an expression.

PCC_Statement 

Code completion occurs within a statement, which may also be an expression or a declaration.

PCC_ForInit 

Code completion occurs at the beginning of the initialization statement (or expression) in a for loop.

PCC_Condition 

Code completion occurs within the condition of an if, while, switch, or for statement.

PCC_RecoveryInFunction 

Code completion occurs within the body of a function on a recovery path, where we do not have a specific handle on our position in the grammar.

PCC_Type 

Code completion occurs where only a type is permitted.

PCC_ParenthesizedExpression 

Code completion occurs in a parenthesized expression, which might also be a type cast.

PCC_LocalDeclarationSpecifiers 

Code completion occurs within a sequence of declaration specifiers within a function, method, or block.

Definition at line 6159 of file Sema.h.

Enumerator:
PMSST_OFF 
PMSST_ON 

Definition at line 5598 of file Sema.h.

Enumerator:
POAK_Native 
POAK_Natural 
POAK_Packed 
POAK_Power 
POAK_Mac68k 
POAK_Reset 

Definition at line 5577 of file Sema.h.

Enumerator:
PPK_Default 
PPK_Show 
PPK_Push 
PPK_Pop 

Definition at line 5591 of file Sema.h.

Specifies whether (or how) name lookup is being performed for a redeclaration (vs. a reference).

Enumerator:
NotForRedeclaration 

The lookup is a reference to this name that is not for the purpose of redeclaring the name.

ForRedeclaration 

The lookup results will be used for redeclaration of a name, if an entity by that name already exists.

Definition at line 1702 of file Sema.h.

ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine their compatibility for the purposes of initialization by reference (C++ [dcl.init.ref]p4).

Enumerator:
Ref_Incompatible 

Ref_Incompatible - The two types are incompatible, so direct reference binding is not possible.

Ref_Related 

Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T2) are either the same or T1 is a base class of T2.

Ref_Compatible_With_Added_Qualification 

Ref_Compatible_With_Added_Qualification - The two types are reference-compatible with added qualification, meaning that they are reference-compatible and the qualifiers on T1 (cv1) are greater than the qualifiers on T2 (cv2).

Ref_Compatible 

Ref_Compatible - The two types are reference-compatible and have equivalent qualifiers (cv1 == cv2).

Definition at line 5979 of file Sema.h.

Enumerator:
TUK_Reference 
TUK_Declaration 
TUK_Definition 
TUK_Friend 

Definition at line 1133 of file Sema.h.

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.

Enumerator:
TDK_Success 

Template argument deduction was successful.

TDK_InstantiationDepth 

Template argument deduction exceeded the maximum template instantiation depth (which has already been diagnosed).

TDK_Incomplete 

Template argument deduction did not deduce a value for every template parameter.

TDK_Inconsistent 

Template argument deduction produced inconsistent deduced values for the given template parameter.

TDK_Underqualified 

Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type that would otherwise be deduced, e.g., we tried to deduce T in "const T" but were given a non-const "X".

TDK_SubstitutionFailure 

Substitution of the deduced template argument values resulted in an error.

TDK_NonDeducedMismatch 

Substitution of the deduced template argument values into a non-deduced context produced a type or value that produces a type that does not match the original template arguments provided.

TDK_TooManyArguments 

When performing template argument deduction for a function template, there were too many call arguments.

TDK_TooFewArguments 

When performing template argument deduction for a function template, there were too few call arguments.

TDK_InvalidExplicitArguments 

The explicitly-specified template arguments were not valid template arguments for the given template.

TDK_FailedOverloadResolution 

The arguments included an overloaded function name that could not be resolved to a suitable function.

Definition at line 4602 of file Sema.h.

Enumeration describing how template parameter lists are compared for equality.

Enumerator:
TPL_TemplateMatch 

We are matching the template parameter lists of two templates that might be redeclarations.

 template<typename T> struct X;
 template<typename T> struct X;
TPL_TemplateTemplateParmMatch 

We are matching the template parameter lists of two template template parameters as part of matching the template parameter lists of two templates that might be redeclarations.

 template<template<int I> class TT> struct X;
 template<template<int Value> class Other> struct X;
TPL_TemplateTemplateArgumentMatch 

We are matching the template parameter lists of a template template argument against the template parameter lists of a template template parameter.

 template<template<int Value> class Metafun> struct X;
 template<int Value> struct integer_c;
 X<integer_c> xic;

Definition at line 4176 of file Sema.h.

The context in which we are checking a template parameter list.

Enumerator:
TPC_ClassTemplate 
TPC_FunctionTemplate 
TPC_ClassTemplateMember 
TPC_FriendFunctionTemplate 
TPC_FriendFunctionTemplateDefinition 
TPC_TypeAliasTemplate 

Definition at line 3934 of file Sema.h.

Enumerator:
TryCapture_Implicit 
TryCapture_ExplicitByVal 
TryCapture_ExplicitByRef 

Definition at line 2284 of file Sema.h.

The context in which an unexpanded parameter pack is being diagnosed.

Note that the values of this enumeration line up with the first argument to the err_unexpanded_parameter_pack diagnostic.

Enumerator:
UPPC_Expression 

An arbitrary expression.

UPPC_BaseType 

The base type of a class type.

UPPC_DeclarationType 

The type of an arbitrary declaration.

UPPC_DataMemberType 

The type of a data member.

UPPC_BitFieldWidth 

The size of a bit-field.

UPPC_StaticAssertExpression 

The expression in a static assertion.

UPPC_FixedUnderlyingType 

The fixed underlying type of an enumeration.

UPPC_EnumeratorValue 

The enumerator value.

UPPC_UsingDeclaration 

A using declaration.

UPPC_FriendDeclaration 

A friend declaration.

UPPC_DeclarationQualifier 

A declaration qualifier.

UPPC_Initializer 

An initializer.

UPPC_DefaultArgument 

A default argument.

UPPC_NonTypeTemplateParameterType 

The type of a non-type template parameter.

UPPC_ExceptionType 

The type of an exception.

UPPC_PartialSpecialization 

Partial specialization.

UPPC_IfExists 

Microsoft __if_exists.

UPPC_IfNotExists 

Microsoft __if_not_exists.

Definition at line 4286 of file Sema.h.

Enumerator:
VariadicFunction 
VariadicBlock 
VariadicMethod 
VariadicConstructor 
VariadicDoesNotApply 

Definition at line 5733 of file Sema.h.


Constructor & Destructor Documentation

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

Member Function Documentation

bool Sema::ActOnAccessSpecifier ( AccessSpecifier  Access,
SourceLocation  ASLoc,
SourceLocation  ColonLoc,
AttributeList Attrs = 0 
)

ActOnAccessSpecifier - Parsed an access specifier followed by a colon.

Definition at line 1406 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 8239 of file SemaExpr.cpp.

References clang::Decl::setUsed().

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

Definition at line 6764 of file SemaDeclCXX.cpp.

References 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::ASTMultiPtr< PtrTy >::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(), 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::SourceLocation::isValid(), clang::UnqualifiedId::Kind, LookupName(), LookupOrdinaryName, PushOnScopeChains(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDeclaration(), clang::ASTMultiPtr< PtrTy >::size(), clang::UnqualifiedId::StartLocation, TemplateParameterListsAreEqual(), clang::Scope::TemplateParamScope, TPC_TypeAliasTemplate, TPL_TemplateMatch, and UPPC_DeclarationType.

ExprResult Sema::ActOnArraySubscriptExpr ( Scope S,
Expr Base,
SourceLocation  LLoc,
Expr Idx,
SourceLocation  RLoc 
)
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 3241 of file SemaExprCXX.cpp.

StmtResult Sema::ActOnAsmStmt ( SourceLocation  AsmLoc,
bool  IsSimple,
bool  IsVolatile,
unsigned  NumOutputs,
unsigned  NumInputs,
IdentifierInfo **  Names,
MultiExprArg  Constraints,
MultiExprArg  Exprs,
Expr AsmString,
MultiExprArg  Clobbers,
SourceLocation  RParenLoc,
bool  MSAsm = false 
)
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 3556 of file SemaExpr.cpp.

References Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::OK_Ordinary, and clang::VK_RValue.

Decl * Sema::ActOnAtEnd ( Scope S,
SourceRange  AtEnd,
Decl **  allMethods = 0,
unsigned  allNum = 0,
Decl **  allProperties = 0,
unsigned  pNum = 0,
DeclGroupPtrTy allTUVars = 0,
unsigned  tuvNum = 0 
)

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

The following allows us to typecheck messages to "Class".

Definition at line 2183 of file SemaDeclObjC.cpp.

References ActOnObjCContainerFinishDefinition(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AtomicPropertySetterGetterRules(), clang::DeclGroupRef::begin(), CompareMethodParamsInBaseAndSuper(), CompareProperties(), ComparePropertiesInBaseAndSuper(), Consumer, Context, CurContext, Diag(), DiagnoseClassExtensionDupMethods(), DiagnoseDuplicateIvars(), DiagnoseOwningPropertyGetterSynthesis(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclGroupRef::end(), clang::OpaquePtr< PtrTy >::getAsVal(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ObjCCategoryDecl::getNextClassCategory(), clang::ObjCCategoryDecl::getNextClassExtension(), getObjCContainerKind(), clang::ObjCMethodDecl::getSelector(), clang::ObjCPropertyDecl::getSetterName(), clang::ASTContext::getSourceManager(), clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(), ImplMethodsVsClassMethods(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceManager::isInSystemHeader(), clang::ObjCPropertyDecl::isReadOnly(), clang::SourceRange::isValid(), LangOpts, MatchTwoMethodDeclarations(), OCK_None, ProcessPropertyDecl(), clang::ObjCMethodDecl::setAsRedeclaration(), clang::Decl::setInvalidDecl(), and SetIvarInitializers().

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

References AdjustDeclIfTemplate(), CheckBaseSpecifier(), DiagnoseUnexpandedParameterPack(), clang::SourceRange::getBegin(), GetTypeFromParser(), clang::SourceLocation::isInvalid(), and UPPC_BaseType.

void Sema::ActOnBaseSpecifiers ( Decl ClassDecl,
CXXBaseSpecifier **  Bases,
unsigned  NumBases 
)

ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes.

Definition at line 1198 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), and AttachBaseSpecifiers().

ExprResult Sema::ActOnBinaryTypeTrait ( BinaryTypeTrait  OTT,
SourceLocation  KWLoc,
ParsedType  LhsTy,
ParsedType  RhsTy,
SourceLocation  RParen 
)

ActOnBinaryTypeTrait - Parsed one of the bianry type trait support pseudo-functions.

Definition at line 3095 of file SemaExprCXX.cpp.

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

Definition at line 7902 of file SemaExpr.cpp.

References ConvertTokenKindToBinaryOpcode(), and DiagnoseBinOpPrecedence().

void Sema::ActOnBlockArguments ( Declarator ParamInfo,
Scope CurScope 
)
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 8710 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 8573 of file SemaExpr.cpp.

References clang::BlockDecl::Create().

ExprResult Sema::ActOnBlockStmtExpr ( SourceLocation  CaretLoc,
Stmt Body,
Scope CurScope 
)
ExprResult Sema::ActOnBooleanCondition ( Scope S,
SourceLocation  Loc,
Expr SubExpr 
)

Definition at line 10189 of file SemaExpr.cpp.

References CheckBooleanCondition(), and clang::ExprError().

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

Definition at line 1637 of file SemaStmt.cpp.

References Diag(), clang::Scope::getBreakParent(), and clang::StmtError().

ExprResult Sema::ActOnBuiltinOffsetOf ( Scope S,
SourceLocation  BuiltinLoc,
SourceLocation  TypeLoc,
ParsedType  ParsedArgTy,
OffsetOfComponent CompPtr,
unsigned  NumComponents,
SourceLocation  RParenLoc 
)

Definition at line 8510 of file SemaExpr.cpp.

References clang::ExprError(), and clang::QualType::isNull().

ExprResult Sema::ActOnCallExpr ( Scope S,
Expr Fn,
SourceLocation  LParenLoc,
MultiExprArg  ArgExprs,
SourceLocation  RParenLoc,
Expr ExecConfig = 0,
bool  IsExecConfig = false 
)
StmtResult Sema::ActOnCapScopeReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp 
)
StmtResult Sema::ActOnCaseStmt ( SourceLocation  CaseLoc,
Expr LHSVal,
SourceLocation  DotDotDotLoc,
Expr RHSVal,
SourceLocation  ColonLoc 
)
void Sema::ActOnCaseStmtBody ( Stmt CaseStmt,
Stmt SubStmt 
)

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

Definition at line 298 of file SemaStmt.cpp.

References clang::CaseStmt::setSubStmt().

ExprResult Sema::ActOnCastExpr ( Scope S,
SourceLocation  LParenLoc,
Declarator D,
ParsedType Ty,
SourceLocation  RParenLoc,
Expr CastExpr 
)
ExprResult Sema::ActOnCharacterConstant ( const Token Tok)
ExprResult Sema::ActOnChooseExpr ( SourceLocation  BuiltinLoc,
Expr CondExpr,
Expr LHSExpr,
Expr RHSExpr,
SourceLocation  RPLoc 
)
ExprResult Sema::ActOnClassMessage ( Scope S,
ParsedType  Receiver,
Selector  Sel,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  Args 
)
ExprResult Sema::ActOnClassPropertyRefExpr ( IdentifierInfo receiverName,
IdentifierInfo propertyName,
SourceLocation  receiverNameLoc,
SourceLocation  propertyNameLoc 
)
DeclResult Sema::ActOnClassTemplateSpecialization ( Scope S,
unsigned  TagSpec,
TagUseKind  TUK,
SourceLocation  KWLoc,
SourceLocation  ModulePrivateLoc,
CXXScopeSpec SS,
TemplateTy  Template,
SourceLocation  TemplateNameLoc,
SourceLocation  LAngleLoc,
ASTTemplateArgsPtr  TemplateArgs,
SourceLocation  RAngleLoc,
AttributeList Attr,
MultiTemplateParamsArg  TemplateParameterLists 
)

Definition at line 4902 of file SemaTemplate.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::AS_none, clang::AS_public, CheckClassTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), clang::FriendDecl::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::ASTMultiPtr< PtrTy >::get(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::TemplateName::getAsTemplateDecl(), clang::OpaquePtr< PtrTy >::getAsVal(), clang::NamedDecl::getDeclName(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::TemplateParameterList::getRAngleLoc(), clang::ClassTemplatePartialSpecializationDecl::getSequenceNumber(), clang::TemplateArgumentLoc::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSpecializationKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::TemplateParameterList::getTemplateLoc(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::TemplateName::isDependent(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), MarkUsedTemplateParameters(), Param, clang::ASTMultiPtr< PtrTy >::release(), clang::ASTTemplateArgsPtr::release(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization(), SetNestedNameSpecifier(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::ClassTemplateSpecializationDecl::setSpecializationKind(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::TagDecl::setTemplateParameterListsInfo(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::TemplateParameterList::size(), clang::ASTMultiPtr< PtrTy >::size(), clang::TemplateArgumentListInfo::size(), clang::TagDecl::startDefinition(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::TTK_Enum.

Decl * Sema::ActOnCompatiblityAlias ( SourceLocation  AtLoc,
IdentifierInfo AliasName,
SourceLocation  AliasLocation,
IdentifierInfo ClassName,
SourceLocation  ClassLocation 
)

ActOnCompatiblityAlias - this action is called after complete parsing of declaration. It sets up the alias relationships.

Definition at line 504 of file SemaDeclObjC.cpp.

References CheckObjCDeclScope(), Context, clang::ObjCCompatibleAliasDecl::Create(), CurContext, Diag(), ForRedeclaration, clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), LookupOrdinaryName, LookupSingleName(), PushOnScopeChains(), and TUScope.

ExprResult Sema::ActOnCompoundLiteral ( SourceLocation  LParenLoc,
ParsedType  Ty,
SourceLocation  RParenLoc,
Expr InitExpr 
)

Definition at line 3758 of file SemaExpr.cpp.

StmtResult Sema::ActOnCompoundStmt ( SourceLocation  L,
SourceLocation  R,
MultiStmtArg  Elts,
bool  isStmtExpr 
)
ExprResult Sema::ActOnConditionalOp ( SourceLocation  QuestionLoc,
SourceLocation  ColonLoc,
Expr CondExpr,
Expr LHSExpr,
Expr RHSExpr 
)
StmtResult Sema::ActOnContinueStmt ( SourceLocation  ContinueLoc,
Scope CurScope 
)

Definition at line 1626 of file SemaStmt.cpp.

References Diag(), clang::Scope::getContinueParent(), and clang::StmtError().

Decl * Sema::ActOnConversionDeclarator ( CXXConversionDecl Conversion)
ExprResult Sema::ActOnCUDAExecConfigExpr ( Scope S,
SourceLocation  LLLLoc,
MultiExprArg  ExecConfig,
SourceLocation  GGGLoc 
)
ExprResult Sema::ActOnCXXBoolLiteral ( SourceLocation  OpLoc,
tok::TokenKind  Kind 
)

ActOnCXXBoolLiteral - Parse {true,false} literals.

Definition at line 489 of file SemaExprCXX.cpp.

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

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 10750 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 
)
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 910 of file SemaCXXScopeSpec.cpp.

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

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

ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'. After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a static data member of class X, names should be looked up in the scope of class X.

ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the out-of-line declaration 'Dcl'. 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 10727 of file SemaDeclCXX.cpp.

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

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

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

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

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

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

void Sema::ActOnCXXForRangeDecl ( Decl D)
StmtResult Sema::ActOnCXXForRangeStmt ( SourceLocation  ForLoc,
SourceLocation  LParenLoc,
Stmt First,
SourceLocation  ColonLoc,
Expr Range,
SourceLocation  RParenLoc 
)

ActOnCXXForRangeStmt - Check and build a C++0x for-range statement.

C++0x [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 1326 of file SemaStmt.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getLocStart(), clang::DeclStmt::getSingleDecl(), clang::DeclStmt::getStartLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclStmt::isSingleDecl(), and clang::StmtError().

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

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

Parameters:
SThe scope in which this nested-name-specifier occurs.
CCLocThe location of the '::'.
SSThe nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier.
Returns:
true if an error occurred, false otherwise.

Definition at line 251 of file SemaCXXScopeSpec.cpp.

References Context, and clang::CXXScopeSpec::MakeGlobal().

void Sema::ActOnCXXInClassMemberInitializer ( Decl D,
SourceLocation  EqualLoc,
Expr InitExpr 
)
Decl * Sema::ActOnCXXMemberDeclarator ( Scope S,
AccessSpecifier  AS,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists,
Expr BW,
const VirtSpecifiers VS,
bool  HasDeferredInit 
)

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 'HasDeferredInit' is true if an initializer is present but parsing it has been deferred.

Definition at line 1460 of file SemaDeclCXX.cpp.

References clang::Decl::addAttr(), CheckOverrideControl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearStorageClassSpecs(), computeDeclContext(), Context, clang::FixItHint::CreateRemoval(), CurContext, Diag(), clang::DeclContext::Equals(), FieldCollector, clang::ASTMultiPtr< PtrTy >::get(), clang::DeclarationName::getAsIdentifierInfo(), clang::SourceRange::getBegin(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::VirtSpecifiers::getFinalLoc(), clang::Declarator::getIdentifierLoc(), clang::VirtSpecifiers::getLastLocation(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocStart(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::VirtSpecifiers::getOverrideLoc(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::Stmt::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclSpec::getThreadSpecLoc(), HandleDeclarator(), HandleField(), clang::DeclarationName::Identifier, clang::Declarator::isDeclarationOfFunction(), clang::VirtSpecifiers::isFinalSpecified(), clang::DeclSpec::isFriendSpecified(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::VirtSpecifiers::isOverrideSpecified(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::CXXMethodDecl::isVirtual(), clang::move(), clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::TemplateParameterList::size(), and clang::ASTMultiPtr< PtrTy >::size().

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(), getLangOptions(), clang::Expr::getType(), GetTypeForDeclaratorCast(), clang::Declarator::isInvalidType(), and clang::move().

bool Sema::ActOnCXXNestedNameSpecifier ( Scope S,
IdentifierInfo Identifier,
SourceLocation  IdentifierLoc,
SourceLocation  CCLoc,
ParsedType  ObjectType,
bool  EnteringContext,
CXXScopeSpec SS 
)

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

Parameters:
SThe scope in which this nested-name-specifier occurs.
IdentifierThe identifier preceding the '::'.
IdentifierLocThe location of the identifier.
CCLocThe location of the '::'.
ObjectTypeThe type of the object, if we're parsing nested-name-specifier in a member access expression.
EnteringContextWhether we're entering the context nominated by this nested-name-specifier.
SSThe nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type).
Returns:
true if an error occurred, false otherwise.

Definition at line 681 of file SemaCXXScopeSpec.cpp.

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

bool Sema::ActOnCXXNestedNameSpecifier ( Scope S,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
TemplateTy  Template,
SourceLocation  TemplateNameLoc,
SourceLocation  LAngleLoc,
ASTTemplateArgsPtr  TemplateArgs,
SourceLocation  RAngleLoc,
SourceLocation  CCLoc,
bool  EnteringContext 
)

The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'.

Parameters:
SThe scope in which this nested-name-specifier occurs.
SSThe nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type).
TemplateKWLocthe location of the 'template' keyword, if any.
TemplateNameThe template name.
TemplateNameLocThe location of the template name.
LAngleLocThe location of the opening angle bracket ('<').
TemplateArgsThe template arguments.
RAngleLocThe location of the closing angle bracket ('>').
CCLocThe location of the '::'.
EnteringContextWhether we're entering the context of the nested-name-specifier.
Returns:
true if an error occurred, false otherwise.

Definition at line 741 of file SemaCXXScopeSpec.cpp.

References CheckTemplateIdType(), Context, Diag(), clang::ETK_None, clang::CXXScopeSpec::Extend(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::SourceRange::getBegin(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeLocInContext(), clang::CXXScopeSpec::getWithLocInContext(), 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 
)
ExprResult Sema::ActOnCXXNew ( SourceLocation  StartLoc,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
Declarator D,
SourceLocation  ConstructorLParen,
MultiExprArg  ConstructorArgs,
SourceLocation  ConstructorRParen 
)
ExprResult Sema::ActOnCXXNullPtrLiteral ( SourceLocation  Loc)

ActOnCXXNullPtrLiteral - Parse 'nullptr'.

Definition at line 498 of file SemaExprCXX.cpp.

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

References Diag(), and clang::QualType::isNull().

Referenced by DefineImplicitCopyAssignment(), and DefineImplicitMoveAssignment().

ExprResult Sema::ActOnCXXThrow ( Scope S,
SourceLocation  OpLoc,
Expr expr 
)
StmtResult Sema::ActOnCXXTryBlock ( SourceLocation  TryLoc,
Stmt TryBlock,
MultiStmtArg  RawHandlers 
)
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 729 of file SemaExprCXX.cpp.

References clang::ExprError().

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

References Diag(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), 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 455 of file SemaExprCXX.cpp.

References Diag(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and clang::QualType::isNull().

Decl * Sema::ActOnDeclarator ( Scope S,
Declarator D 
)
StmtResult Sema::ActOnDeclStmt ( DeclGroupPtrTy  Decl,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
void Sema::ActOnDefaultCtorInitializers ( Decl CDtorDecl)

Definition at line 3351 of file SemaDeclCXX.cpp.

References SetCtorInitializers().

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

Definition at line 306 of file SemaStmt.cpp.

References Diag().

void Sema::ActOnDefs ( Scope S,
Decl TagD,
SourceLocation  DeclStart,
IdentifierInfo ClassName,
SmallVectorImpl< Decl * > &  Decls 
)
void Sema::ActOnDelayedCXXMethodParameter ( Scope S,
Decl ParamD 
)

ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration. We're (re-)introducing the given function parameter into scope for use in parsing later parts of the method declaration. For example, we could see an ActOnParamDefaultArgument event for this parameter.

Definition at line 5152 of file SemaDeclCXX.cpp.

References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::hasUnparsedDefaultArg(), IdResolver, Param, and clang::ParmVarDecl::setDefaultArg().

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

References 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 
)
TypeResult Sema::ActOnDependentTag ( Scope S,
unsigned  TagSpec,
TagUseKind  TUK,
const CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  TagLoc,
SourceLocation  NameLoc 
)
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 2285 of file SemaTemplate.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::SourceRange::getBegin(), clang::UnqualifiedId::getKind(), 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::UnqualifiedId::OperatorFunctionId, clang::TNK_Dependent_template_name, and clang::TNK_Non_template.

ExprResult Sema::ActOnDesignatedInitializer ( Designation Desig,
SourceLocation  Loc,
bool  GNUSyntax,
ExprResult  Init 
)
StmtResult Sema::ActOnDoStmt ( SourceLocation  DoLoc,
Stmt Body,
SourceLocation  WhileLoc,
SourceLocation  CondLParen,
Expr Cond,
SourceLocation  CondRParen 
)
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 417 of file Sema.cpp.

References clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), CheckDelegatingCtorCycles(), checkUndefinedInternals(), clang::ASTConsumer::CompleteTentativeDefinition(), Consumer, Context, DefineUsedVTables(), Diag(), DiagnoseUseOfUnimplementedSelectors(), Diags, DynamicClasses, clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::erase(), ExternalSource, clang::VarDecl::getActingDefinition(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getConstantArrayType(), clang::Preprocessor::getCurrentModule(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::DiagnosticsEngine::getDiagnosticLevel(), clang::Preprocessor::getHeaderSearchInfo(), clang::ASTContext::getKeyFunction(), clang::Decl::getLocation(), clang::HeaderSearch::getModuleMap(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::DiagnosticsEngine::Ignored, clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::Decl::isReferenced(), clang::LazyVector< const DeclaratorDecl *, ExternalSemaSource,&ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 >::iterator, clang::LazyVector< CXXRecordDecl *, ExternalSemaSource,&ExternalSemaSource::ReadDynamicClasses, 2, 2 >::iterator, clang::LazyVector< VarDecl *, ExternalSemaSource,&ExternalSemaSource::ReadTentativeDefinitions, 2, 2 >::iterator, LangOpts, LoadExternalWeakUndeclaredIdentifiers(), MarkVTableUsed(), clang::ArrayType::Normal, ParsingInitForAutoVars, PerformPendingInstantiations(), PP, RequireCompleteType(), clang::ModuleMap::resolveExports(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldRemoveFromUnused(), clang::Module::submodule_begin(), clang::Module::submodule_end(), TentativeDefinitions, clang::TU_Complete, clang::TU_Module, clang::TU_Prefix, TUKind, TUScope, UnusedFileScopedDecls, and WeakUndeclaredIdentifiers.

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

void Sema::ActOnEnumBody ( SourceLocation  EnumLoc,
SourceLocation  LBraceLoc,
SourceLocation  RBraceLoc,
Decl EnumDecl,
Decl **  Elements,
unsigned  NumElements,
Scope S,
AttributeList Attr 
)
Decl * Sema::ActOnEnumConstant ( Scope S,
Decl EnumDecl,
Decl LastEnumConstant,
SourceLocation  IdLoc,
IdentifierInfo Id,
AttributeList Attrs,
SourceLocation  EqualLoc,
Expr Val 
)
Decl * Sema::ActOnExceptionDeclarator ( Scope S,
Declarator D 
)
void clang::Sema::ActOnExitFunctionContext ( ) [inline]

Definition at line 1267 of file Sema.h.

References PopDeclContext().

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 
)
DeclResult Sema::ActOnExplicitInstantiation ( Scope S,
SourceLocation  ExternLoc,
SourceLocation  TemplateLoc,
unsigned  TagSpec,
SourceLocation  KWLoc,
CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  NameLoc,
AttributeList Attr 
)
DeclResult Sema::ActOnExplicitInstantiation ( Scope S,
SourceLocation  ExternLoc,
SourceLocation  TemplateLoc,
Declarator D 
)

Definition at line 6295 of file SemaTemplate.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), CheckExplicitInstantiationScope(), clang::UnresolvedSetImpl::clear(), clang::DeclSpec::ClearStorageClassSpecs(), clang::FixItHint::CreateRemoval(), clang::Scope::DeclScope, DeduceTemplateArguments(), Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::LookupResult::getAsSingle(), clang::DeclSpec::getAttributes(), clang::SourceRange::getBegin(), 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::VarDecl::getMemberSpecializationInfo(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), clang::Scope::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::VarDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), HasExplicitTemplateArgs, clang::UnqualifiedId::IK_TemplateId, clang::LookupResult::isAmbiguous(), clang::DeclSpec::isConstexprSpecified(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::Declarator::isInvalidType(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, P, clang::TemplateIdAnnotation::RAngleLoc, ScopeSpecifierHasTemplateId(), clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::UnqualifiedId::TemplateId, clang::Scope::TemplateParamScope, clang::TPOC_Other, 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 3331 of file SemaExprCXX.cpp.

References clang::ExprError(), and clang::move().

StmtResult Sema::ActOnExprStmt ( FullExprArg  Expr)

Definition at line 35 of file SemaStmt.cpp.

References clang::Sema::FullExprArg::get(), and clang::StmtError().

Decl * Sema::ActOnField ( Scope S,
Decl TagD,
SourceLocation  DeclStart,
Declarator D,
Expr BitfieldWidth 
)

ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it.

Definition at line 8546 of file SemaDecl.cpp.

References clang::AS_public.

void Sema::ActOnFields ( Scope S,
SourceLocation  RecLoc,
Decl TagDecl,
llvm::ArrayRef< Decl * >  Fields,
SourceLocation  LBrac,
SourceLocation  RBrac,
AttributeList AttrList 
)

A field cannot be an Objective-c object

Definition at line 9162 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::UnresolvedSetImpl::begin(), clang::RecordDecl::completeDefinition(), clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), clang::UnresolvedSetImpl::end(), clang::ExternalLinkage, clang::Type::getAs(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getFirstClassExtension(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getLocation(), clang::ObjCCategoryDecl::getNextClassExtension(), clang::QualType::getObjCLifetime(), clang::CXXMethodDecl::getParent(), clang::TagDecl::getTagKind(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::RecordDecl::hasObjectMember(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::Type::isDependentType(), clang::TagDecl::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), clang::QualType::isObjCGCStrong(), clang::Type::isObjCObjectType(), clang::DeclContext::isRecord(), clang::TagDecl::isUnion(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_ExplicitNone, clang::UnresolvedSetImpl::setAccess(), clang::RecordDecl::setHasFlexibleArrayMember(), clang::RecordDecl::setHasObjectMember(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), and clang::ValueDecl::setType().

Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().

Decl * Sema::ActOnFileScopeAsmDecl ( Expr expr,
SourceLocation  AsmLoc,
SourceLocation  RParenLoc 
)
void Sema::ActOnFinishCXXMemberSpecification ( Scope S,
SourceLocation  RLoc,
Decl TagDecl,
SourceLocation  LBrac,
SourceLocation  RBrac,
AttributeList AttrList 
)
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 7332 of file SemaDecl.cpp.

References clang::ParsedAttributes::getList().

void Sema::ActOnFinishDelayedCXXMethodDeclaration ( Scope S,
Decl MethodD 
)

ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method. The method declaration is now considered finished. There may be a separate ActOnStartOfFunctionDef action later (not necessarily immediately!) for this method, if it was also defined inside the class body.

Definition at line 5174 of file SemaDeclCXX.cpp.

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

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

Definition at line 5131 of file SemaDeclCXX.cpp.

References PopDeclContext().

void Sema::ActOnFinishDelayedMemberInitializers ( Decl Record)
ExprResult Sema::ActOnFinishFullExpr ( Expr Expr)
StmtResult Sema::ActOnFinishFullStmt ( Stmt Stmt)

Definition at line 4812 of file SemaExprCXX.cpp.

References clang::StmtError().

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

Definition at line 7193 of file SemaDecl.cpp.

References clang::move().

Referenced by InstantiateFunctionDefinition().

Decl * Sema::ActOnFinishFunctionBody ( Decl Decl,
Stmt Body,
bool  IsInstantiation 
)
void Sema::ActOnFinishKNRParamDeclarations ( Scope S,
Declarator D,
SourceLocation  LocAfterDecls 
)
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 9726 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 5767 of file SemaDeclCXX.cpp.

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

StmtResult Sema::ActOnFinishSwitchStmt ( SourceLocation  SwitchLoc,
Stmt Switch,
Stmt Body 
)
void Sema::ActOnForEachDeclStmt ( DeclGroupPtrTy  Decl)
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 1059 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 
)
Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration ( SourceLocation  Loc,
IdentifierInfo **  IdentList,
SourceLocation IdentLocs,
unsigned  NumElts 
)
Sema::DeclGroupPtrTy Sema::ActOnForwardProtocolDeclaration ( SourceLocation  AtProtoclLoc,
const IdentifierLocPair IdentList,
unsigned  NumElts,
AttributeList attrList 
)
Decl * Sema::ActOnFriendFunctionDecl ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParams 
)

Definition at line 10212 of file SemaDeclCXX.cpp.

References ActOnFunctionDeclarator(), clang::DeclContext::addDecl(), clang::AS_public, clang::CXXScopeSpec::clear(), computeDeclContext(), Context, 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, clang::SourceRange::getBegin(), clang::DeclarationNameInfo::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOptions(), clang::Decl::getLexicalDeclContext(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), getScopeForDeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::LookupResult::Filter::hasNext(), clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_ConversionFunctionId, clang::UnqualifiedId::IK_DestructorName, clang::UnqualifiedId::IK_TemplateId, clang::DeclContext::InEnclosingNamespaceSetOf(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDefinition(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::move(), clang::LookupResult::Filter::next(), 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 10143 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckFriendTypeDecl(), Context, clang::FriendTemplateDecl::Create(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), clang::SourceRange::getBegin(), clang::DeclSpec::getFriendSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::MemberContext, clang::ASTMultiPtr< PtrTy >::release(), clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::ASTMultiPtr< PtrTy >::size(), and UPPC_FriendDeclaration.

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

Definition at line 4790 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::DeclaratorChunk::FunctionTypeInfo::ArgInfo, clang::AS_public, clang::prec::Comma, clang::frontend::CPlusPlus, clang::FunctionTemplateDecl::Create(), clang::ClassScopeFunctionSpecializationDecl::Create(), clang::FixItHint::CreateInsertion(), CreateNewFunctionDecl(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::DeclarationName::CXXDestructorName, Diag(), DiagnoseInvalidRedeclaration(), clang::DeclaratorChunk::EndLoc, clang::EST_None, clang::ExternalLinkage, clang::FDK_Declaration, clang::FDK_Defaulted, clang::FDK_Definition, clang::FDK_Deleted, clang::LookupResult::FoundOverloaded, clang::DeclaratorChunk::Fun, clang::ASTMultiPtr< PtrTy >::get(), clang::Decl::getAccess(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::Declarator::getAsmLabel(), clang::SourceRange::getBegin(), clang::Declarator::getCommaLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::DeclSpec::getExplicitSpecLoc(), clang::LookupResult::getFoundDecl(), clang::Declarator::getFunctionDefinitionKind(), getFunctionStorageClass(), clang::Declarator::getFunctionTypeInfo(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::UnqualifiedId::getKind(), clang::NamedDecl::getLinkage(), clang::Decl::getLocation(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getName(), clang::DeclarationName::getNameKind(), clang::FunctionDecl::getNumParams(), clang::Declarator::getNumTypeObjects(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionTemplateDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getResultKind(), clang::FunctionDecl::getResultType(), clang::FunctionType::getResultType(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::Declarator::getSourceRange(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecAsWritten(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::Declarator::getTypeObject(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::DeclSpec::getVirtualSpecLoc(), clang::Decl::hasAttr(), clang::Declarator::hasAttributes(), clang::CXXRecordDecl::hasDefinition(), HasExplicitTemplateArgs, clang::NamedDecl::hasLinkage(), clang::CXXRecordDecl::hasUserProvidedDefaultConstructor(), clang::Decl::IDNS_Ordinary, clang::UnqualifiedId::IK_TemplateId, clang::FunctionDecl::isConstexpr(), clang::DeclSpec::isConstexprSpecified(), clang::FunctionDecl::isDefined(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::CXXRecordDecl::isEmpty(), clang::DeclSpec::isExplicitSpecified(), clang::FunctionDecl::isExternC(), clang::Declarator::isFirstDeclarator(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionType(), clang::Decl::isInIdentifierNamespace(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::FunctionDecl::isMain(), clang::DeclSpec::isModulePrivateSpecified(), clang::FunctionDecl::isOverloadedOperator(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::DeclSpec::isThreadSpecified(), clang::DeclContext::isTranslationUnit(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, clang::DeclSpec::isVirtualSpecified(), clang::TemplateIdAnnotation::LAngleLoc, clang::DeclaratorChunk::Loc, clang::TemplateIdAnnotation::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumArgs, Param, clang::TemplateIdAnnotation::RAngleLoc, clang::ASTMultiPtr< PtrTy >::release(), S, clang::SC_None, clang::SC_Static, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Decl::setDeclContext(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setDeletedAsWritten(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::FunctionDecl::setRangeEnd(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::Declarator::setRedeclaration(), clang::ParmVarDecl::setScopeInfo(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::Decl::setTopLevelDeclInObjCContainer(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), clang::ASTMultiPtr< PtrTy >::size(), clang::TemplateArgumentListInfo::size(), clang::UnqualifiedId::TemplateId, and clang::FunctionProtoType::ExtProtoInfo::Variadic.

Referenced by ActOnFriendFunctionDecl(), and DiagnoseInvalidRedeclaration().

ExprResult Sema::ActOnGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
Expr ControllingExpr,
MultiTypeArg  ArgTypes,
MultiExprArg  ArgExprs 
)
ExprResult Sema::ActOnGNUNullExpr ( SourceLocation  TokenLoc)

Definition at line 8914 of file SemaExpr.cpp.

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

Definition at line 1594 of file SemaStmt.cpp.

References clang::Decl::setUsed().

ExprResult Sema::ActOnIdExpression ( Scope S,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
bool  HasTrailingLParen,
bool  IsAddressOfOperand,
CorrectionCandidateCallback CCC = 0 
)
StmtResult Sema::ActOnIfStmt ( SourceLocation  IfLoc,
FullExprArg  CondVal,
Decl CondVar,
Stmt ThenVal,
SourceLocation  ElseLoc,
Stmt ElseVal 
)

Definition at line 340 of file SemaStmt.cpp.

References Diag(), clang::Sema::FullExprArg::release(), and clang::StmtError().

StmtResult Sema::ActOnIndirectGotoStmt ( SourceLocation  GotoLoc,
SourceLocation  StarLoc,
Expr DestExp 
)
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 6282 of file SemaDecl.cpp.

References clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().

ExprResult Sema::ActOnInitList ( SourceLocation  LBraceLoc,
MultiExprArg  InitArgList,
SourceLocation  RBraceLoc 
)
ExprResult Sema::ActOnInstanceMessage ( Scope S,
Expr Receiver,
Selector  Sel,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  Args 
)
Decl * Sema::ActOnIvar ( Scope S,
SourceLocation  DeclStart,
Declarator D,
Expr BitfieldWidth,
tok::ObjCKeywordKind  Visibility 
)
StmtResult Sema::ActOnLabelStmt ( SourceLocation  IdentLoc,
LabelDecl TheDecl,
SourceLocation  ColonLoc,
Stmt SubStmt 
)
void Sema::ActOnLambdaError ( SourceLocation  StartLoc,
Scope CurScope 
)

ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda.

Definition at line 5110 of file SemaExprCXX.cpp.

ExprResult Sema::ActOnLambdaExpr ( SourceLocation  StartLoc,
Stmt Body,
Scope CurScope 
)
void Sema::ActOnLastBitfield ( SourceLocation  DeclStart,
SmallVectorImpl< Decl * > &  AllIvarDecls 
)
ExprResult Sema::ActOnMemberAccessExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
Decl ObjCImpDecl,
bool  HasTrailingLParen 
)

The main callback when the parser finds something like expression . [nested-name-specifier] identifier expression -> [nested-name-specifier] identifier where 'identifier' encompasses a fairly broad spectrum of possibilities, including destructor and operator references.

Parameters:
OpKindeither tok::arrow or tok::period
HasTrailingLParenwhether the next token is '(', which is used to diagnose mis-uses of special members that can only be called
ObjCImpDeclthe current ObjC decl; this is an ugly hack around the fact that ObjC aren't properly put in the context chain

Definition at line 1419 of file SemaExprMember.cpp.

References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::UnqualifiedId::getKind(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Expr::getType(), clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_DestructorName, clang::DeclarationName::isDependentName(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isSet(), clang::move(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

MemInitResult Sema::ActOnMemInitializer ( Decl ConstructorD,
Scope S,
CXXScopeSpec SS,
IdentifierInfo MemberOrBase,
ParsedType  TemplateTypeTy,
const DeclSpec DS,
SourceLocation  IdLoc,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
SourceLocation  RParenLoc,
SourceLocation  EllipsisLoc 
)

Handle a C++ member initializer using parentheses syntax.

Definition at line 1757 of file SemaDeclCXX.cpp.

References BuildMemInitializer().

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

References BuildMemInitializer().

void Sema::ActOnMemInitializers ( Decl ConstructorDecl,
SourceLocation  ColonLoc,
CXXCtorInitializer **  MemInits,
unsigned  NumMemInits,
bool  AnyErrors 
)
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 2613 of file SemaDeclObjC.cpp.

References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), CheckARCMethodDecl(), CheckConflictingOverridingMethod(), CheckParameter(), CheckRelatedResultTypeCompatibility(), containsInvalidMethodImplAttribute(), Context, clang::ObjCMethodDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, CvtQTToAstBitMask(), Diag(), ForRedeclaration, clang::ASTContext::getAdjustedParameterType(), clang::Decl::getAttrs(), clang::TypeLoc::getBeginLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOptions(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getNumArgs(), clang::ObjCDeclSpec::getObjCDeclQualifier(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getSelector(), getSourceManager(), clang::ValueDecl::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::ObjCMethodDecl::hasRelatedResultType(), IdResolver, clang::ObjCMethodDecl::isClassMethod(), clang::Scope::isDeclScope(), clang::ObjCMethodDecl::isInstanceMethod(), clang::DeclContext::isObjCContainer(), clang::LookupResult::isSingleResult(), LangOpts, LookupName(), LookupOrdinaryName, mergeObjCMethodDecls(), 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_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, Param, clang::DeclaratorChunk::ParamInfo::Param, ProcessDeclAttributeList(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::Decl::setDeclContext(), clang::Decl::setInvalidDecl(), clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCMethodScopeInfo(), clang::ObjCMethodDecl::SetRelatedResultType(), and TUScope.

DeclResult Sema::ActOnModuleImport ( SourceLocation  AtLoc,
SourceLocation  ImportLoc,
ModuleIdPath  Path 
)

The parser has processed a module import declaration.

Parameters:
AtLocThe location of the '@' symbol, if any.
ImportLocThe location of the 'import' keyword.
PathThe module access path.

Definition at line 10044 of file SemaDecl.cpp.

References clang::DeclContext::addDecl(), clang::Module::AllVisible, Context, clang::ImportDecl::Create(), clang::Preprocessor::getModuleLoader(), clang::ASTContext::getTranslationUnitDecl(), clang::SourceLocation::isValid(), clang::ModuleLoader::loadModule(), clang::Module::Parent, and PP.

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

Definition at line 2569 of file SemaStmt.cpp.

References clang::CXXScopeSpec::getWithLocInContext().

Decl * Sema::ActOnNamespaceAliasDef ( Scope CurScope,
SourceLocation  NamespaceLoc,
SourceLocation  AliasLoc,
IdentifierInfo Alias,
CXXScopeSpec SS,
SourceLocation  IdentLoc,
IdentifierInfo Ident 
)
ExprResult Sema::ActOnNoexceptExpr ( SourceLocation  KeyLoc,
SourceLocation  LParen,
Expr Operand,
SourceLocation  RParen 
)

Definition at line 4730 of file SemaExprCXX.cpp.

Decl * Sema::ActOnNonTypeTemplateParameter ( Scope S,
Declarator D,
unsigned  Depth,
unsigned  Position,
SourceLocation  EqualLoc,
Expr DefaultArg 
)
StmtResult Sema::ActOnNullStmt ( SourceLocation  SemiLoc,
bool  HasLeadingEmptyMacro = false 
)

Definition at line 49 of file SemaStmt.cpp.

ExprResult Sema::ActOnNumericConstant ( const Token Tok)
StmtResult Sema::ActOnObjCAtCatchStmt ( SourceLocation  AtLoc,
SourceLocation  RParen,
Decl Parm,
Stmt Body 
)

Definition at line 2309 of file SemaStmt.cpp.

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

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

Definition at line 2320 of file SemaStmt.cpp.

ExprResult Sema::ActOnObjCAtSynchronizedOperand ( SourceLocation  atLoc,
Expr operand 
)
StmtResult Sema::ActOnObjCAtSynchronizedStmt ( SourceLocation  AtLoc,
Expr SynchExpr,
Stmt SynchBody 
)

Definition at line 2402 of file SemaStmt.cpp.

StmtResult Sema::ActOnObjCAtThrowStmt ( SourceLocation  AtLoc,
Expr Throw,
Scope CurScope 
)
StmtResult Sema::ActOnObjCAtTryStmt ( SourceLocation  AtLoc,
Stmt Try,
MultiStmtArg  Catch,
Stmt Finally 
)
StmtResult Sema::ActOnObjCAutoreleasePoolStmt ( SourceLocation  AtLoc,
Stmt Body 
)

Definition at line 2421 of file SemaStmt.cpp.

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

Definition at line 8440 of file SemaDecl.cpp.

Referenced by ActOnAtEnd().

Decl * Sema::ActOnObjCContainerStartDefinition ( Decl IDecl)
Decl * Sema::ActOnObjCExceptionDecl ( Scope S,
Declarator D 
)
ExprResult Sema::ActOnObjCForCollectionOperand ( SourceLocation  forLoc,
Expr collection 
)
StmtResult Sema::ActOnObjCForCollectionStmt ( SourceLocation  ForColLoc,
SourceLocation  LParenLoc,
Stmt First,
Expr Second,
SourceLocation  RParenLoc,
Stmt Body 
)
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 3166 of file SemaType.cpp.

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

void Sema::ActOnObjCReenterContainerContext ( DeclContext DC)

Definition at line 8451 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

See also:
ActOnObjCReenterContainerContext

Definition at line 8445 of file SemaDecl.cpp.

ParsedTemplateArgument Sema::ActOnPackExpansion ( const ParsedTemplateArgument Arg,
SourceLocation  EllipsisLoc 
)
TypeResult Sema::ActOnPackExpansion ( ParsedType  Type,
SourceLocation  EllipsisLoc 
)

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

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

Definition at line 393 of file SemaTemplateVariadic.cpp.

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

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

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

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

Definition at line 446 of file SemaTemplateVariadic.cpp.

References CheckPackExpansion().

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

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

Definition at line 6720 of file SemaDecl.cpp.

References clang::Scope::AddDecl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearStorageClassSpecs(), clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::SourceRange::getBegin(), 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::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getMutableDeclSpec(), clang::Scope::getNextFunctionPrototypeIndex(), clang::CXXScopeSpec::getRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadSpecLoc(), clang::TypeSourceInfo::getType(), clang::Decl::hasAttr(), clang::Declarator::hasName(), clang::DeclSpec::isConstexprSpecified(), clang::Scope::isDeclScope(), clang::Scope::isFunctionPrototypeScope(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::DeclSpec::isThreadSpecified(), 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 262 of file SemaDeclCXX.cpp.

References clang::frontend::CPlusPlus, Diag(), DiagnoseUnexpandedParameterPack(), getLangOptions(), clang::Stmt::getSourceRange(), Param, clang::Decl::setInvalidDecl(), SetParamDefaultArgument(), UnparsedDefaultArgLocs, and UPPC_DefaultArgument.

void Sema::ActOnParamDefaultArgumentError ( Decl param)

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

Definition at line 313 of file SemaDeclCXX.cpp.

References Param, clang::Decl::setInvalidDecl(), and UnparsedDefaultArgLocs.

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

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

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

Definition at line 2581 of file SemaExpr.cpp.

ExprResult Sema::ActOnParenOrParenListExpr ( SourceLocation  L,
SourceLocation  R,
MultiExprArg  Val 
)
void Sema::ActOnPopScope ( SourceLocation  Loc,
Scope S 
)
ExprResult Sema::ActOnPostfixUnaryOp ( Scope S,
SourceLocation  OpLoc,
tok::TokenKind  Kind,
Expr Input 
)

Definition at line 2904 of file SemaExpr.cpp.

References clang::UO_PostDec, and clang::UO_PostInc.

void Sema::ActOnPragmaFPContract ( tok::OnOffSwitch  OOS)

ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT

Definition at line 372 of file SemaAttr.cpp.

References clang::FPOptions::fp_contract, FPFeatures, getLangOptions(), clang::tok::OOS_DEFAULT, clang::tok::OOS_OFF, and clang::tok::OOS_ON.

Referenced by clang::PragmaFPContractHandler::HandlePragma().

void Sema::ActOnPragmaMSStruct ( PragmaMSStructKind  Kind)

ActOnPragmaMSStruct - Called on well formed #pragms ms_struct [on|off].

Definition at line 269 of file SemaAttr.cpp.

References MSStructPragmaOn, and PMSST_ON.

Referenced by clang::PragmaMSStructHandler::HandlePragma().

void Sema::ActOnPragmaOptionsAlign ( PragmaOptionsAlignKind  Kind,
SourceLocation  PragmaLoc,
SourceLocation  KindLoc 
)

ActOnPragmaOptionsAlign - Called on well formed #pragma options align.

Definition at line 138 of file SemaAttr.cpp.

References Context, Diag(), clang::Preprocessor::getTargetInfo(), clang::TargetInfo::hasAlignMac68kSupport(), PackContext, POAK_Mac68k, POAK_Native, POAK_Natural, POAK_Packed, POAK_Power, POAK_Reset, and PP.

Referenced by ParseAlignPragma().

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

Referenced by clang::PragmaPackHandler::HandlePragma().

void Sema::ActOnPragmaUnused ( const Token Identifier,
Scope curScope,
SourceLocation  PragmaLoc 
)

ActOnPragmaUnused - Called on well-formed '#pragma unused'.

Definition at line 273 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, Diag(), clang::Token::getIdentifierInfo(), clang::Token::getLocation(), clang::Decl::isUsed(), LookupOrdinaryName, LookupParsedName(), and NULL.

void Sema::ActOnPragmaVisibility ( const IdentifierInfo VisType,
SourceLocation  PragmaLoc 
)

ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .

Definition at line 348 of file SemaAttr.cpp.

References Diag(), clang::IdentifierInfo::getName(), clang::IdentifierInfo::isStr(), 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 10087 of file SemaDecl.cpp.

References DeclApplyPragmaWeak(), clang::Decl::hasAttr(), LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.

Referenced by clang::PragmaWeakHandler::HandlePragma().

void Sema::ActOnPragmaWeakID ( IdentifierInfo WeakName,
SourceLocation  PragmaLoc,
SourceLocation  WeakNameLoc 
)

ActOnPragmaWeakID - Called on well formed #pragma weak ident.

Definition at line 10073 of file SemaDecl.cpp.

References clang::Decl::addAttr(), Context, LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.

Referenced by clang::PragmaWeakHandler::HandlePragma().

ExprResult Sema::ActOnPredefinedExpr ( SourceLocation  Loc,
tok::TokenKind  Kind 
)
Decl * Sema::ActOnProperty ( Scope S,
SourceLocation  AtLoc,
FieldDeclarator FD,
ObjCDeclSpec ODS,
Selector  GetterSel,
Selector  SetterSel,
bool *  OverridingProperty,
tok::ObjCKeywordKind  MethodImplKind,
DeclContext lexicalDC = 0 
)
Decl * Sema::ActOnPropertyImplDecl ( Scope S,
SourceLocation  AtLoc,
SourceLocation  PropertyLoc,
bool  Synthesize,
IdentifierInfo PropertyId,
IdentifierInfo PropertyIvar,
SourceLocation  PropertyIvarLoc 
)

ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as or .

Definition at line 567 of file SemaObjCProperty.cpp.

References clang::DeclContext::addDecl(), clang::Qualifiers::addObjCLifetime(), clang::ObjCImplDecl::addPropertyImplementation(), clang::BO_Assign, BuildBinOp(), clang::ASTContext::canAssignObjCInterfaces(), checkARCPropertyImpl(), CheckAssignmentConstraints(), Compatible, Context, clang::frontend::CPlusPlus, clang::ObjCIvarDecl::Create(), clang::ObjCPropertyImplDecl::Create(), CurContext, clang::declaresSameEntity(), Diag(), clang::ObjCPropertyImplDecl::Dynamic, clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::ASTContext::getCanonicalType(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::ObjCCategoryImplDecl::getIdentifier(), getImpliedARCOwnership(), getLangOptions(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), 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::InitializedEntity::InitializeResult(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::DeclContext::makeDeclVisibleInContext(), MaybeCreateExprWithCleanups(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_Weak, Owned(), P, Param, PerformCopyInitialization(), clang::ObjCIvarDecl::Private, clang::ObjCPropertyImplDecl::setGetterCXXConstructor(), setImpliedPropertyAttributeForReadOnlyProperty(), clang::Decl::setInvalidDecl(), clang::ObjCPropertyImplDecl::setSetterCXXAssignment(), clang::ObjCPropertyImplDecl::Synthesize, clang::ActionResult< PtrTy, CompressInvalid >::takeAs(), 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,
bool  HasTrailingLParen 
)
ExprResult Sema::ActOnPseudoDestructorExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
SourceLocation  TildeLoc,
const DeclSpec DS,
bool  HasTrailingLParen 
)
void Sema::ActOnReenterDeclaratorTemplateScope ( Scope S,
DeclaratorDecl D 
)
void Sema::ActOnReenterFunctionContext ( Scope S,
Decl D 
)

Push the parameters of D, which must be a function, into scope.

Definition at line 865 of file SemaDecl.cpp.

References clang::Scope::AddDecl(), clang::NamedDecl::getIdentifier(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), P, and Param.

void Sema::ActOnReenterTemplateScope ( Scope S,
Decl Template 
)
StmtResult Sema::ActOnReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp 
)
StmtResult Sema::ActOnSEHExceptBlock ( SourceLocation  Loc,
Expr FilterExpr,
Stmt Block 
)
StmtResult Sema::ActOnSEHFinallyBlock ( SourceLocation  Loc,
Stmt Block 
)

Definition at line 2551 of file SemaStmt.cpp.

References clang::SEHFinallyStmt::Create().

StmtResult Sema::ActOnSEHTryBlock ( bool  IsCXXTry,
SourceLocation  TryLoc,
Stmt TryBlock,
Stmt Handler 
)

Definition at line 2524 of file SemaStmt.cpp.

References clang::SEHTryStmt::Create().

ExprResult Sema::ActOnSizeofParameterPackExpr ( Scope S,
SourceLocation  OpLoc,
IdentifierInfo Name,
SourceLocation  NameLoc,
SourceLocation  RParenLoc 
)

Called when an expression computing the size of a parameter pack is parsed.

 template<typename ...Types> struct count {
   static const unsigned value = sizeof...(Types);
 };
Parameters:
OpLocThe location of the "sizeof" keyword.
NameThe name of the parameter pack whose size will be determined.
NameLocThe source location of the name of the parameter pack.
RParenLocThe location of the closing parentheses.

Definition at line 735 of file SemaTemplateVariadic.cpp.

References clang::LookupResult::Ambiguous, Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), Diag(), DiagnoseAmbiguousLookup(), clang::ExprError(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getFoundDecl(), getLangOptions(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getResultKind(), clang::ASTContext::getSizeType(), clang::Decl::isParameterPack(), LookupName(), LookupOrdinaryName, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, and S.

Decl * Sema::ActOnStartCategoryImplementation ( SourceLocation  AtCatImplLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo CatName,
SourceLocation  CatLoc 
)
Decl * Sema::ActOnStartCategoryInterface ( SourceLocation  AtInterfaceLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo CategoryName,
SourceLocation  CategoryLoc,
Decl *const *  ProtoRefs,
unsigned  NumProtoRefs,
const SourceLocation ProtoLocs,
SourceLocation  EndProtoLoc 
)
Decl * Sema::ActOnStartClassImplementation ( SourceLocation  AtClassImplLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo SuperClassname,
SourceLocation  SuperClassLoc 
)
Decl * Sema::ActOnStartClassInterface ( SourceLocation  AtInterfaceLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo SuperName,
SourceLocation  SuperLoc,
Decl *const *  ProtoRefs,
unsigned  NumProtoRefs,
const SourceLocation ProtoLocs,
SourceLocation  EndProtoLoc,
AttributeList AttrList 
)
void Sema::ActOnStartCXXMemberDeclarations ( Scope S,
Decl TagDecl,
SourceLocation  FinalLoc,
SourceLocation  LBraceLoc 
)
ExprResult Sema::ActOnStartCXXMemberReference ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
ParsedType ObjectType,
bool &  MayBePseudoDestructor 
)
void Sema::ActOnStartDelayedCXXMethodDeclaration ( Scope S,
Decl MethodD 
)

ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments. This action should enter the scope of the given Method declaration as if we had just parsed the qualified method name. However, it should not bring the parameters into scope; that will be performed by ActOnDelayedCXXMethodParameter.

Definition at line 5144 of file SemaDeclCXX.cpp.

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

Definition at line 5124 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), and PushDeclContext().

Decl * Sema::ActOnStartLinkageSpecification ( Scope S,
SourceLocation  ExternLoc,
SourceLocation  LangLoc,
StringRef  Lang,
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', LangLoc is the location of the language string literal, which is provided by Lang/StrSize. LBraceLoc, if valid, provides the location of the '{' brace. Otherwise, this linkage specification does not have any braces.

Definition at line 9699 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), Context, clang::LinkageSpecDecl::Create(), CurContext, Diag(), 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 
)
Decl * Sema::ActOnStartOfFunctionDef ( Scope S,
Declarator D 
)
Decl * Sema::ActOnStartOfFunctionDef ( Scope S,
Decl D 
)
Decl * Sema::ActOnStartOfFunctionTemplateDef ( Scope FnBodyScope,
MultiTemplateParamsArg  TemplateParameterLists,
Declarator D 
)
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 4878 of file SemaExprCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, clang::LambdaIntroducer::Captures, clang::Qualifiers::Const, clang::CXXRecordDecl::Create(), clang::CXXMethodDecl::Create(), clang::LambdaIntroducer::Default, Diag(), clang::LookupResult::empty(), clang::sema::LambdaScopeInfo::ExplicitParams, clang::sema::LambdaScopeInfo::finishedExplicitCaptures(), clang::LookupResult::getAsSingle(), clang::SourceRange::getBegin(), clang::sema::CapturingScopeInfo::getCapture(), clang::sema::CapturingScopeInfo::getCXXThisCapture(), clang::SourceRange::getEnd(), clang::Declarator::getFunctionTypeInfo(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::Declarator::getNumTypeObjects(), clang::FunctionDecl::getParamDecl(), clang::FunctionTypeLoc::getParams(), clang::DeclContext::getParent(), clang::FunctionType::getResultType(), clang::Declarator::getSourceRange(), clang::TypeSourceInfo::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::VarDecl::hasLocalStorage(), clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::LookupResult::isAmbiguous(), clang::sema::CapturingScopeInfo::isCaptured(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::DeclContext::isFileContext(), clang::Declarator::isFunctionDeclarator(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, clang::sema::LambdaScopeInfo::Mutable, Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::LambdaIntroducer::Range, clang::sema::CapturingScopeInfo::ReturnType, clang::SC_None, clang::Decl::setAccess(), clang::CXXRecordDecl::setLambda(), clang::Decl::setLexicalDeclContext(), clang::ParmVarDecl::setOwningFunction(), clang::FunctionDecl::setParams(), clang::TagDecl::startDefinition(), clang::DeclSpec::TQ_const, clang::TTK_Class, clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

void Sema::ActOnStartOfObjCMethodDef ( Scope FnBodyScope,
Decl D 
)
StmtResult Sema::ActOnStartOfSwitchStmt ( SourceLocation  SwitchLoc,
Expr Cond,
Decl CondVar 
)
Decl * Sema::ActOnStartProtocolInterface ( SourceLocation  AtProtoInterfaceLoc,
IdentifierInfo ProtocolName,
SourceLocation  ProtocolLoc,
Decl *const *  ProtoRefNames,
unsigned  NumProtoRefs,
const SourceLocation ProtoLocs,
SourceLocation  EndProtoLoc,
AttributeList AttrList 
)
void Sema::ActOnStartSuppressingAccessChecks ( )

Definition at line 1711 of file SemaAccess.cpp.

Decl * Sema::ActOnStaticAssertDeclaration ( SourceLocation  StaticAssertLoc,
Expr AssertExpr,
Expr AssertMessageExpr,
SourceLocation  RParenLoc 
)
ExprResult Sema::ActOnStmtExpr ( SourceLocation  LPLoc,
Stmt SubStmt,
SourceLocation  RPLoc 
)
void Sema::ActOnStopSuppressingAccessChecks ( )

Definition at line 1717 of file SemaAccess.cpp.

ExprResult Sema::ActOnStringLiteral ( const Token StringToks,
unsigned  NumStringToks 
)

ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g. "foo" "bar" L"baz").

ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g. "foo" "bar" L"baz"). The result string has to handle string concatenation ([C99 5.1.1.2, translation phase #6]), so it may come from multiple tokens. However, the common case is that StringToks points to one string.

Definition at line 1127 of file SemaExpr.cpp.

References clang::QualType::addConst(), clang::StringLiteral::Ascii, clang::StringLiteral::Create(), clang::ExprError(), clang::Token::getLocation(), clang::StringLiteralParser::GetNumStringChars(), clang::StringLiteralParser::GetString(), clang::StringLiteralParser::hadError, clang::StringLiteralParser::isPascal(), clang::StringLiteralParser::isUTF16(), clang::StringLiteralParser::isUTF32(), clang::StringLiteralParser::isUTF8(), clang::StringLiteralParser::isWide(), clang::ArrayType::Normal, clang::StringLiteralParser::Pascal, clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.

ExprResult Sema::ActOnSuperMessage ( Scope S,
SourceLocation  SuperLoc,
Selector  Sel,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  Args 
)
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 
)

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

Definition at line 7672 of file SemaDecl.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::begin(), clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::Scope::DeclScope, Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTMultiPtr< PtrTy >::get(), clang::Decl::getAccess(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::TagDecl::getDefinition(), clang::DeclContext::getEnclosingNamespaceContext(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::EnumDecl::getIntegerType(), clang::Decl::getLocation(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeWithKeyword::getTagTypeKindName(), getTemplateSpecializationKind(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::isAmbiguous(), clang::TagType::isBeingDefined(), clang::Scope::isClassScope(), clang::CXXScopeSpec::isEmpty(), clang::EnumDecl::isFixed(), clang::LookupResult::isForRedeclaration(), clang::DeclContext::isFunctionOrMethod(), clang::Scope::isFunctionPrototypeScope(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isObjCContainer(), clang::DeclContext::isRecord(), clang::EnumDecl::isScoped(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTranslationUnit(), clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), clang::ASTMultiPtr< PtrTy >::release(), clang::LookupResult::resolveKind(), clang::Decl::setAccess(), 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::ASTMultiPtr< PtrTy >::size(), clang::TagDecl::startDefinition(), clang::TSK_ExplicitSpecialization, clang::TTK_Enum, and clang::LookupResult::wasNotFoundInCurrentInstantiation().

Referenced by ActOnTemplatedFriendTag().

void Sema::ActOnTagDefinitionError ( Scope S,
Decl TagDecl 
)

ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.

Definition at line 8456 of file SemaDecl.cpp.

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

References clang::TagDecl::setRBraceLoc().

void Sema::ActOnTagStartDefinition ( Scope S,
Decl TagDecl 
)

ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e.g., for an enumeration, class, struct, or union).

Definition at line 8371 of file SemaDecl.cpp.

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

Parameters:
TUK

Definition at line 2115 of file SemaTemplate.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::OpaquePtr< PtrTy >::getAsVal(), 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(), clang::QualType::isNull(), 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(), and clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc().

Decl * Sema::ActOnTemplateDeclarator ( Scope S,
MultiTemplateParamsArg  TemplateParameterLists,
Declarator D 
)

Definition at line 5315 of file SemaTemplate.cpp.

References clang::move().

Decl * Sema::ActOnTemplatedFriendTag ( Scope S,
SourceLocation  FriendLoc,
unsigned  TagSpec,
SourceLocation  TagLoc,
CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  NameLoc,
AttributeList Attr,
MultiTemplateParamsArg  TempParamLists 
)
TypeResult Sema::ActOnTemplateIdType ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
TemplateTy  Template,
SourceLocation  TemplateLoc,
SourceLocation  LAngleLoc,
ASTTemplateArgsPtr  TemplateArgs,
SourceLocation  RAngleLoc,
bool  IsCtorOrDtorName = false 
)
TemplateParameterList * Sema::ActOnTemplateParameterList ( unsigned  Depth,
SourceLocation  ExportLoc,
SourceLocation  TemplateLoc,
SourceLocation  LAngleLoc,
Decl **  Params,
unsigned  NumParams,
SourceLocation  RAngleLoc 
)

ActOnTemplateParameterList - Builds a TemplateParameterList that contains the template parameters in Params/NumParams.

Definition at line 807 of file SemaTemplate.cpp.

References 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 
)
void Sema::ActOnTranslationUnitScope ( Scope S)

Definition at line 75 of file Sema.cpp.

References S.

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

NamedDecl * Sema::ActOnTypedefDeclarator ( Scope S,
Declarator D,
DeclContext DC,
TypeSourceInfo TInfo,
LookupResult Previous 
)
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 3710 of file SemaDecl.cpp.

References clang::LookupResult::empty(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getRedeclContext(), clang::Decl::isInvalidDecl(), and clang::DeclContext::isTranslationUnit().

Referenced by ActOnAliasDeclaration().

TypeResult Sema::ActOnTypeName ( Scope S,
Declarator D 
)
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".

Parameters:
SThe scope in which this typename type occurs.
TypenameLocthe location of the 'typename' keyword
SSthe nested-name-specifier following the typename (e.g., 'T::').
IIthe identifier we're retrieving (e.g., 'type' in the example).
IdLocthe location of the identifier.

Definition at line 6599 of file SemaTemplate.cpp.

References clang::FixItHint::CreateRemoval(), 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().

TypeResult Sema::ActOnTypenameType ( Scope S,
SourceLocation  TypenameLoc,
const CXXScopeSpec SS,
SourceLocation  TemplateLoc,
TemplateTy  Template,
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>".

Parameters:
SThe scope in which this typename type occurs.
TypenameLocthe location of the 'typename' keyword
SSthe nested-name-specifier following the typename (e.g., 'T::').
TemplateLocthe location of the 'template' keyword, if any.
TemplateNameThe template name.
TemplateNameLocThe location of the template name.
LAngleLocThe location of the opening angle bracket ('<').
TemplateArgsThe template arguments.
RAngleLocThe location of the closing angle bracket ('>').

Definition at line 6635 of file SemaTemplate.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::ETK_Typename, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::CXXScopeSpec::getScopeRep(), clang::Scope::getTemplateParamParent(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), 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,
bool  Ellipsis,
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 531 of file SemaTemplate.cpp.

References clang::Scope::AddDecl(), clang::AS_public, clang::TemplateTypeParmDecl::Create(), Diag(), clang::Decl::isTemplateParameter(), clang::Scope::isTemplateParamScope(), Param, clang::Decl::setAccess(), clang::TemplateTypeParmDecl::setDefaultArgument(), and clang::Decl::setInvalidDecl().

ExprResult Sema::ActOnUnaryExprOrTypeTraitExpr ( SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind,
bool  IsType,
void *  TyOrEx,
const 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 2850 of file SemaExpr.cpp.

References clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and clang::move().

ExprResult Sema::ActOnUnaryOp ( Scope S,
SourceLocation  OpLoc,
tok::TokenKind  Op,
Expr Input 
)

Definition at line 8233 of file SemaExpr.cpp.

References ConvertTokenKindToUnaryOpcode().

ExprResult Sema::ActOnUnaryTypeTrait ( UnaryTypeTrait  OTT,
SourceLocation  KWLoc,
ParsedType  Ty,
SourceLocation  RParen 
)

ActOnUnaryTypeTrait - Parsed one of the unary type trait support pseudo-functions.

Definition at line 2646 of file SemaExprCXX.cpp.

void Sema::ActOnUninitializedDecl ( Decl dcl,
bool  TypeMayContainAuto 
)
Decl * Sema::ActOnUsingDeclaration ( Scope CurScope,
AccessSpecifier  AS,
bool  HasUsingKeyword,
SourceLocation  UsingLoc,
CXXScopeSpec SS,
UnqualifiedId Name,
AttributeList AttrList,
bool  IsTypeName,
SourceLocation  TypenameLoc 
)
Decl * Sema::ActOnUsingDirective ( Scope CurScope,
SourceLocation  UsingLoc,
SourceLocation  NamespcLoc,
CXXScopeSpec SS,
SourceLocation  IdentLoc,
IdentifierInfo NamespcName,
AttributeList AttrList 
)
ExprResult Sema::ActOnVAArg ( SourceLocation  BuiltinLoc,
Expr E,
ParsedType  Ty,
SourceLocation  RPLoc 
)

Definition at line 8831 of file SemaExpr.cpp.

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

Definition at line 3849 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::VarDecl::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::LookupResult::empty(), clang::ExternalLinkage, clang::ASTMultiPtr< PtrTy >::get(), clang::QualType::getAddressSpace(), clang::DeclarationName::getAsIdentifierInfo(), clang::Declarator::getAsmLabel(), clang::SourceRange::getBegin(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VarDecl::getDefinition(), clang::Scope::getFnParent(), clang::LookupResult::getFoundDecl(), clang::Declarator::getIdentifierLoc(), clang::NamedDecl::getLinkage(), clang::Decl::getLocation(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecAsWritten(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::DeclSpec::getThreadSpecLoc(), clang::TypeSourceInfo::getType(), clang::DeclSpec::getTypeSpecType(), clang::Declarator::hasAttributes(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::DeclSpec::isConstexprSpecified(), clang::VarDecl::isExternC(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::DeclSpec::isThreadSpecified(), clang::LangAS::opencl_local, clang::ASTMultiPtr< PtrTy >::release(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_OpenCLWorkGroupLocal, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_typedef, clang::VarDecl::setConstexpr(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setLexicalDeclContext(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Declarator::setRedeclaration(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::VarDecl::setThreadSpecified(), clang::ASTMultiPtr< PtrTy >::size(), StorageClassSpecToVarDeclStorageClass(), and clang::DeclSpec::TST_auto.

StmtResult Sema::ActOnWhileStmt ( SourceLocation  WhileLoc,
FullExprArg  Cond,
Decl CondVar,
Stmt Body 
)

Definition at line 969 of file SemaStmt.cpp.

References clang::Sema::FullExprArg::release(), and clang::StmtError().

void Sema::AddAlignedAttr ( SourceRange  AttrRange,
Decl D,
Expr E 
)
void Sema::AddAlignedAttr ( SourceRange  AttrRange,
Decl D,
TypeSourceInfo T 
)

Definition at line 2622 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr().

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 114 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, and PackContext.

void Sema::AddAnyMethodToGlobalPool ( Decl D)

AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.

Definition at line 253 of file SemaDeclObjC.cpp.

References AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), and clang::ObjCMethodDecl::isInstanceMethod().

void clang::Sema::AddArgumentDependentLookupCandidates ( DeclarationName  Name,
bool  Operator,
Expr **  Args,
unsigned  NumArgs,
TemplateArgumentListInfo ExplicitTemplateArgs,
OverloadCandidateSet CandidateSet,
bool  PartialOverloading = false,
bool  StdNamespaceIsAssociated = 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 7327 of file SemaOverload.cpp.

References clang::AS_none, clang::ADLResult::begin(), clang::OverloadCandidateSet::begin(), clang::ADLResult::end(), clang::OverloadCandidateSet::end(), and clang::ADLResult::erase().

void clang::Sema::AddBuiltinCandidate ( QualType  ResultTy,
QualType ParamTys,
Expr **  Args,
unsigned  NumArgs,
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 5720 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::OverloadCandidate::BuiltinTypes, clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidate::IsSurrogate, NumArgs, clang::ovl_fail_bad_conversion, clang::OverloadCandidate::ParamTypes, clang::OverloadCandidate::ResultTy, clang::TryContextuallyConvertToBool(), clang::TryCopyInitialization(), and clang::OverloadCandidate::Viable.

Referenced by clang::AddBuiltinAssignmentOperatorCandidates().

void clang::Sema::AddBuiltinOperatorCandidates ( OverloadedOperatorKind  Op,
SourceLocation  OpLoc,
Expr **  Args,
unsigned  NumArgs,
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 7138 of file SemaOverload.cpp.

References clang::Qualifiers::addConst(), CandidateTypes, clang::CollectVRQualifiers(), NumArgs, clang::OO_None, and VisibleTypeConversionsQuals.

Referenced by 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 300 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::Preprocessor::getPragmaARCCFCodeAuditedLoc(), clang::Decl::hasAttr(), clang::SourceLocation::isValid(), and PP.

void clang::Sema::AddConversionCandidate ( CXXConversionDecl Conversion,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
Expr From,
QualType  ToType,
OverloadCandidateSet CandidateSet 
)

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 5383 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::CK_FunctionToPointerDecay, clang::Expr::Classify(), clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FinalConversion, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::QualType::getCanonicalType(), clang::GetConversionRank(), clang::CXXConversionDecl::getConversionType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Stmt::getLocStart(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getPrimaryTemplate(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ICK_Lvalue_To_Rvalue, clang::ICR_Exact_Match, clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_final_conversion, clang::ovl_fail_final_conversion_not_exact, clang::ovl_fail_trivial_conversion, clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setAsIdentityConversion(), clang::StandardConversionSequence::setFromType(), clang::TryCopyInitialization(), clang::TryObjectArgumentInitialization(), clang::OverloadCandidate::Viable, clang::VK_LValue, and clang::VK_RValue.

Referenced by clang::FindConversionForRefInit(), clang::IsUserDefinedConversion(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

void Sema::AddCXXDirectInitializerToDecl ( Decl RealDecl,
SourceLocation  LParenLoc,
MultiExprArg  Exprs,
SourceLocation  RParenLoc,
bool  TypeMayContainAuto 
)
void clang::Sema::AddFactoryMethodToGlobalPool ( ObjCMethodDecl Method,
bool  impl = false 
) [inline]

AddFactoryMethodToGlobalPool - Same as above, but for factory methods.

Definition at line 1993 of file Sema.h.

Referenced by ActOnAtEnd(), and AddAnyMethodToGlobalPool().

void clang::Sema::AddFunctionCandidates ( const UnresolvedSetImpl Functions,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
void Sema::AddImplicitlyDeclaredMembersToClass ( CXXRecordDecl ClassDecl)
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 5986 of file SemaDecl.cpp.

References clang::frontend::CPlusPlus, clang::frontend::CPlusPlus0x, clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirect(), clang::FixItHint::CreateInsertion(), Diag(), clang::VarDecl::getAnyInitializer(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::Decl::getLocStart(), clang::QualType::getNonReferenceType(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::Stmt::getSourceRange(), clang::VarDecl::getStorageClass(), clang::VarDecl::getStorageClassAsWritten(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::IntegerLiteral::getValue(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::InitializedEntity::InitializeVariable(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::Expr::isEvaluatable(), clang::VarDecl::isFileVarDecl(), clang::Expr::isIntegerConstantExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), clang::Expr::isValueDependent(), clang::QualType::isVolatileQualified(), clang::SC_Extern, clang::SC_OpenCLWorkGroupLocal, clang::SC_Static, clang::VarDecl::setConstexpr(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), clang::Expr::setType(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), and clang::ActionResult< PtrTy, CompressInvalid >::takeAs().

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

void clang::Sema::AddInstanceMethodToGlobalPool ( ObjCMethodDecl Method,
bool  impl = false 
) [inline]

AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool. This allows us to efficiently associate a selector with a method declaraation for purposes of typechecking messages sent to "id" (where the class of the object is unknown).

Definition at line 1988 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 7431 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::frontend::CPlusPlus, clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), clang::IdentifierInfo::isStr(), clang::DeclContext::isTranslationUnit(), and clang::LinkageSpecDecl::lang_c.

void clang::Sema::AddMemberOperatorCandidates ( OverloadedOperatorKind  Op,
SourceLocation  OpLoc,
Expr **  Args,
unsigned  NumArgs,
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 5671 of file SemaOverload.cpp.

References clang::LookupResult::begin(), CandidateSet, clang::Expr::Classify(), clang::LookupResult::end(), clang::Expr::getType(), and clang::LookupResult::suppressDiagnostics().

void clang::Sema::AddMethodCandidate ( DeclAccessPair  FoundDecl,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
Expr **  Args,
unsigned  NumArgs,
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 5144 of file SemaOverload.cpp.

References AddMethodTemplateCandidate(), clang::DeclAccessPair::getDecl(), and clang::Decl::getDeclContext().

Referenced by AddFunctionCandidates(), and AddOverloadCandidate().

void clang::Sema::AddMethodCandidate ( CXXMethodDecl Method,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
void clang::Sema::AddMethodTemplateCandidate ( FunctionTemplateDecl MethodTmpl,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
TemplateArgumentListInfo ExplicitTemplateArgs,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
void Sema::addMethodToGlobalList ( ObjCMethodList List,
ObjCMethodDecl Method 
)
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, and MSStructPragmaOn.

void clang::Sema::AddOverloadCandidate ( FunctionDecl Function,
DeclAccessPair  FoundDecl,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false,
bool  PartialOverloading = 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 4982 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), AddMethodCandidate(), Args, CandidateSet, CheckCUDATarget(), Context, clang::OverloadCandidate::Conversions, CurContext, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::FunctionProtoType::getArgType(), clang::FunctionDecl::getDescribedFunctionTemplate(), getLangOptions(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumArgs(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), IsDerivedFrom(), clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::FunctionType::isVariadic(), clang::Expr::Classification::makeSimpleLValue(), NumArgs, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_target, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ImplicitConversionSequence::setEllipsis(), clang::TryCopyInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.

Referenced by AddFunctionCandidates(), clang::AddOverloadedCallCandidate(), clang::IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), ResolveConstructorOverload(), TryListConstructionSpecialCases(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

void clang::Sema::AddOverloadedCallCandidates ( UnresolvedLookupExpr ULE,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  PartialOverloading = false 
)
bool Sema::AddOverriddenMethods ( CXXRecordDecl DC,
CXXMethodDecl MD 
)
void Sema::AddPushedVisibilityAttribute ( Decl RD)

AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.

Definition at line 315 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, NoVisibility, and VisContext.

void clang::Sema::AddSurrogateCandidate ( CXXConversionDecl Conversion,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
const FunctionProtoType Proto,
Expr Object,
Expr **  Args,
unsigned  NumArgs,
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 5565 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::UserDefinedConversionSequence::After, clang::UserDefinedConversionSequence::Before, clang::Expr::Classify(), clang::UserDefinedConversionSequence::ConversionFunction, clang::OverloadCandidate::Conversions, clang::UserDefinedConversionSequence::EllipsisConversion, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::UserDefinedConversionSequence::FoundConversionFunction, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::FunctionProtoType::getArgType(), clang::FunctionProtoType::getNumArgs(), clang::Expr::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::FunctionType::isVariadic(), NumArgs, clang::ovl_fail_bad_conversion, 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, clang::TryCopyInitialization(), clang::TryObjectArgumentInitialization(), clang::ImplicitConversionSequence::UserDefined, and clang::OverloadCandidate::Viable.

void clang::Sema::AddTemplateConversionCandidate ( FunctionTemplateDecl FunctionTemplate,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
Expr From,
QualType  ToType,
OverloadCandidateSet CandidateSet 
)
void clang::Sema::AddTemplateOverloadCandidate ( FunctionTemplateDecl FunctionTemplate,
DeclAccessPair  FoundDecl,
TemplateArgumentListInfo ExplicitTemplateArgs,
Expr **  Args,
unsigned  NumArgs,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
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 459 of file SemaTemplate.cpp.

Referenced by ActOnBaseSpecifier(), ActOnBaseSpecifiers(), ActOnFinishCXXMemberSpecification(), ActOnFinishDelayedCXXMethodDeclaration(), ActOnFinishDelayedMemberInitializers(), ActOnMemInitializers(), ActOnStartDelayedMemberDeclarations(), BuildMemInitializer(), and SetDeclDeleted().

void Sema::AdjustDestructorExceptionSpec ( CXXRecordDecl ClassDecl,
CXXDestructorDecl Destructor 
)
void Sema::ArgumentDependentLookup ( DeclarationName  Name,
bool  Operator,
Expr **  Args,
unsigned  NumArgs,
ADLResult Functions,
bool  StdNamespaceIsAssociated = false 
)
void Sema::AtomicPropertySetterGetterRules ( ObjCImplDecl IMPDecl,
ObjCContainerDecl IDecl 
)
bool Sema::AttachBaseSpecifiers ( CXXRecordDecl Class,
CXXBaseSpecifier **  Bases,
unsigned  NumBases 
)
bool Sema::BasePathInvolvesVirtualBase ( const CXXCastPath BasePath)

Determine whether the given base path includes a virtual base class.

Definition at line 1277 of file SemaDeclCXX.cpp.

Referenced by ImpCastExprToType(), and clang::InitializationSequence::Perform().

Decl * Sema::BuildAnonymousStructOrUnion ( Scope S,
DeclSpec DS,
AccessSpecifier  AS,
RecordDecl Record 
)

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

References clang::DeclContext::addDecl(), clang::AS_none, clang::AS_protected, clang::AS_public, clang::DeclSpec::ClearTypeQualifiers(), clang::frontend::CPlusPlus, clang::VarDecl::Create(), clang::FieldDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), clang::SourceRange::getBegin(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecAsWritten(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVolatileSpecLoc(), InjectAnonymousStructOrUnionMembers(), clang::DeclContext::isRecord(), clang::TagDecl::isUnion(), clang::Declarator::MemberContext, clang::SC_None, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::RecordDecl::setAnonymousStructOrUnion(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::DeclSpec::SetStorageClassSpec(), StorageClassSpecToVarDeclStorageClass(), clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, and clang::DeclSpec::TQ_volatile.

ExprResult Sema::BuildAnonymousStructUnionMemberReference ( const CXXScopeSpec SS,
SourceLocation  nameLoc,
IndirectFieldDecl indirectField,
Expr baseObjectExpr = 0,
SourceLocation  opLoc = SourceLocation() 
)
QualType Sema::BuildArrayType ( QualType  T,
ArrayType::ArraySizeModifier  ASM,
Expr ArraySize,
unsigned  Quals,
SourceRange  Brackets,
DeclarationName  Entity 
)

Build an array type.

Parameters:
TThe type of each element in the array.
ASMC99 array size modifier (e.g., '*', 'static').
ArraySizeExpression describing the size of the array.
LocThe location of the entity whose type involves this array type or, if there is no such entity, the location of the type that will have array type.
EntityThe name of the entity that involves the array type, if known.
Returns:
A suitable array type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 1207 of file SemaType.cpp.

References clang::frontend::C99, CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus0x, DefaultLvalueConversion(), Diag(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getIncompleteArrayType(), getLangOptions(), clang::Stmt::getLocStart(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPrintableNameForEntity(), clang::ASTContext::getSizeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getVariableArrayType(), clang::Expr::hasPlaceholderType(), isArraySizeVLA(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isPODType(), clang::Expr::isRValue(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::ArrayType::Normal, RequireCompleteType(), RequireNonAbstractType(), clang::ArrayType::Star, clang::ArrayType::Static, and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildArrayTypeTrait ( ArrayTypeTrait  ATT,
SourceLocation  KWLoc,
TypeSourceInfo TSInfo,
Expr DimExpr,
SourceLocation  RParen 
)

Definition at line 3308 of file SemaExprCXX.cpp.

References EvaluateArrayTypeTrait(), and clang::TypeSourceInfo::getType().

QualType Sema::BuildAtomicType ( QualType  T,
SourceLocation  Loc 
)
MemInitResult Sema::BuildBaseInitializer ( QualType  BaseType,
TypeSourceInfo BaseTInfo,
const MultiInitializer Args,
CXXRecordDecl ClassDecl,
SourceLocation  EllipsisLoc 
)
void Sema::BuildBasePathArray ( const CXXBasePaths Paths,
CXXCastPath BasePath 
)
ExprResult Sema::BuildBinaryTypeTrait ( BinaryTypeTrait  BTT,
SourceLocation  KWLoc,
TypeSourceInfo LhsT,
TypeSourceInfo RhsT,
SourceLocation  RParen 
)
ExprResult Sema::BuildBinOp ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHSExpr,
Expr RHSExpr 
)
QualType Sema::BuildBlockPointerType ( QualType  T,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a block pointer type.

Parameters:
TThe type to which we'll be building a block pointer.
CVRThe cvr-qualifiers to be applied to the block pointer type.
LocThe location of the entity whose type involves this block pointer type or, if there is no such entity, the location of the type that will have block pointer type.
EntityThe name of the entity that involves the block pointer type, if known.
Returns:
A suitable block pointer type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 1568 of file SemaType.cpp.

References Context, Diag(), and clang::ASTContext::getBlockPointerType().

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildBuiltinOffsetOf ( SourceLocation  BuiltinLoc,
TypeSourceInfo TInfo,
OffsetOfComponent CompPtr,
unsigned  NumComponents,
SourceLocation  RParenLoc 
)
ExprResult clang::Sema::BuildCallToMemberFunction ( Scope S,
Expr MemExprE,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
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 10100 of file SemaOverload.cpp.

References Args, clang::AS_public, clang::BO_PtrMemD, clang::BO_PtrMemI, CandidateSet, clang::Type::castAs(), clang::checkArgPlaceholdersForOverload(), clang::Expr::Classify(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), Diag(), clang::ExprError(), clang::Qualifiers::getAsString(), clang::MemberExpr::getBase(), clang::UnresolvedMemberExpr::getBase(), clang::UnresolvedMemberExpr::getBaseType(), clang::FunctionType::getCallResultType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::MemberExpr::getFoundDecl(), clang::Stmt::getLocStart(), clang::Decl::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::OverloadExpr::getQualifier(), clang::MemberExpr::getQualifier(), clang::FunctionDecl::getResultType(), clang::FunctionType::getResultType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::FunctionProtoType::getTypeQuals(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::UnresolvedMemberExpr::isArrow(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionDecl::isPure(), clang::CXXMethodDecl::isStatic(), NumArgs, clang::OCD_AllCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::removeObjCGCAttr(), clang::MemberExpr::setBase(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by BuildSingleCopyAssign().

ExprResult clang::Sema::BuildCallToObjectOfClassType ( Scope S,
Expr Obj,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
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 10333 of file SemaOverload.cpp.

References Arg, Args, clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), CandidateSet, clang::checkArgPlaceholdersForOverload(), clang::checkPlaceholderForOverload(), clang::CK_UserDefinedConversion, clang::Expr::Classify(), clang::CreateFunctionRefExpr(), Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::CXXConversionDecl::getConversionType(), clang::Decl::getDeclContext(), clang::Stmt::getLocStart(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumArgs(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getResultType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::move(), NumArgs, clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::LookupResult::suppressDiagnostics(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ActionResult< PtrTy, CompressInvalid >::takeAs(), 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.

Parameters:
ReceiverTypeInfoType source information that describes the receiver of this message. This may be NULL, in which case we are sending to the superclass and SuperLoc must be a valid source location.
ReceiverTypeThe type of the object receiving the message. When ReceiverTypeInfo is non-NULL, this is the same type as that refers to. For a superclass send, this is the type of the superclass.
SuperLocThe location of the "super" keyword in a superclass message.
SelThe selector to which the message is being sent.
MethodThe method that this class message is invoking, if already known.
LBracLocThe location of the opening square bracket ']'.
RBracThe location of the closing square bracket ']'.
ArgsThe message arguments.

Definition at line 1049 of file SemaExprObjC.cpp.

References Args, CheckMessageArgumentTypes(), Context, clang::frontend::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), Diag(), DiagnoseUseOfDecl(), clang::ExprError(), clang::SourceRange::getBegin(), clang::NamedDecl::getDeclName(), clang::ObjCObjectType::getInterface(), getLangOptions(), clang::Decl::getLocation(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getResultType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::lookupClassMethod(), LookupFactoryMethodInGlobalPool(), LookupPrivateClassMethod(), MaybeBindToTemporary(), NumArgs, Owned(), PDiag(), clang::ASTMultiPtr< PtrTy >::release(), RequireCompleteType(), clang::ASTMultiPtr< PtrTy >::size(), 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 
)
ExprResult Sema::BuildCompoundLiteralExpr ( SourceLocation  LParenLoc,
TypeSourceInfo TInfo,
SourceLocation  RParenLoc,
Expr LiteralExpr 
)
ExprResult Sema::BuildCStyleCastExpr ( SourceLocation  LParenLoc,
TypeSourceInfo Ty,
SourceLocation  RParenLoc,
Expr Op 
)
ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
CXXConstructorDecl Constructor,
MultiExprArg  Exprs,
bool  HadMultipleCandidates,
bool  RequiresZeroInit,
unsigned  ConstructKind,
SourceRange  ParenRange 
)
ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
CXXConstructorDecl Constructor,
bool  Elidable,
MultiExprArg  ExprArgs,
bool  HadMultipleCandidates,
bool  RequiresZeroInit,
unsigned  ConstructKind,
SourceRange  ParenRange 
)

BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.

Definition at line 9026 of file SemaDeclCXX.cpp.

References Context, clang::CXXConstructExpr::Create(), clang::ASTMultiPtr< PtrTy >::get(), MarkFunctionReferenced(), Owned(), clang::ASTMultiPtr< PtrTy >::release(), clang::ASTMultiPtr< PtrTy >::size(), clang::Decl::specific_attr_begin(), and clang::Decl::specific_attr_end().

ExprResult Sema::BuildCXXDefaultArgExpr ( SourceLocation  CallLoc,
FunctionDecl FD,
ParmVarDecl Param 
)
StmtResult Sema::BuildCXXForRangeStmt ( SourceLocation  ForLoc,
SourceLocation  ColonLoc,
Stmt RangeDecl,
Stmt BeginEndDecl,
Expr Cond,
Expr Inc,
Stmt LoopVarDecl,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXFunctionalCastExpr ( TypeSourceInfo TInfo,
SourceLocation  LParenLoc,
Expr CastExpr,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXMemberCallExpr ( Expr Exp,
NamedDecl FoundDecl,
CXXMethodDecl Method,
bool  HadMultipleCandidates 
)
ExprResult Sema::BuildCXXNamedCast ( SourceLocation  OpLoc,
tok::TokenKind  Kind,
TypeSourceInfo Ty,
Expr E,
SourceRange  AngleBrackets,
SourceRange  Parens 
)
bool Sema::BuildCXXNestedNameSpecifier ( Scope S,
IdentifierInfo Identifier,
SourceLocation  IdentifierLoc,
SourceLocation  CCLoc,
QualType  ObjectType,
bool  EnteringContext,
CXXScopeSpec SS,
NamedDecl ScopeLookupResult,
bool  ErrorRecoveryLookup 
)

Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.

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

References clang::LookupResult::addDecl(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), clang::LookupResult::empty(), clang::CXXScopeSpec::Extend(), clang::LookupResult::getAsSingle(), clang::TypoCorrection::getAsString(), clang::Decl::getCanonicalDecl(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDecl(), getLangOptions(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::TypoCorrection::getQuoted(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getTypeDeclType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::ASTContext::hasSameType(), isAcceptableNestedNameSpecifier(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), LookupName(), LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), clang::TypeLocBuilder::push(), RequireCompleteDeclContext(), S, clang::LookupResult::setContextRange(), clang::LookupResult::setLookupName(), and clang::TypeSpecTypeLoc::setNameLoc().

Referenced by ActOnCXXNestedNameSpecifier(), and IsInvalidUnlessNestedName().

ExprResult Sema::BuildCXXNew ( SourceLocation  StartLoc,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
QualType  AllocType,
TypeSourceInfo AllocTypeInfo,
Expr ArraySize,
SourceLocation  ConstructorLParen,
MultiExprArg  ConstructorArgs,
SourceLocation  ConstructorRParen,
bool  TypeMayContainAuto = true 
)

Definition at line 933 of file SemaExprCXX.cpp.

References clang::frontend::CPlusPlus0x, clang::IntegerLiteral::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::FixItHint::CreateRemoval(), Diag(), doesUsualArrayDeleteWantSize(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTMultiPtr< PtrTy >::get(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::Stmt::getLocStart(), clang::Decl::getLocStart(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::QualType::getObjCLifetime(), clang::CXXMethodDecl::getParent(), clang::TypeLoc::getSourceRange(), clang::Stmt::getSourceRange(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getTypePtr(), clang::Expr::hasAnyTypeDependentArguments(), clang::QualType::hasStrongOrWeakObjCLifetime(), clang::InitializedEntity::InitializeNew(), clang::Decl::isImplicit(), clang::Expr::isIntegerConstantExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::SourceRange::isValid(), clang::Expr::isValueDependent(), clang::FunctionType::isVariadic(), clang::move(), clang::Qualifiers::OCL_None, clang::InitializationSequence::Perform(), clang::ActionResult< PtrTy, CompressInvalid >::release(), clang::ASTMultiPtr< PtrTy >::release(), clang::ASTMultiPtr< PtrTy >::size(), clang::ActionResult< PtrTy, CompressInvalid >::take(), and clang::ASTOwningVector< PtrTy, N >::take().

ExprResult Sema::BuildCXXNoexceptExpr ( SourceLocation  KeyLoc,
Expr Operand,
SourceLocation  RParen 
)

Definition at line 4723 of file SemaExprCXX.cpp.

References clang::Expr::CanThrow().

ExprResult Sema::BuildCXXThrow ( SourceLocation  OpLoc,
Expr Ex,
bool  IsThrownVarInScope 
)
ExprResult Sema::BuildCXXTypeConstructExpr ( TypeSourceInfo TInfo,
SourceLocation  LParenLoc,
MultiExprArg  exprs,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXTypeId ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXTypeId ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXUuidof ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)

Build a Microsoft __uuidof expression with a type operand.

Definition at line 422 of file SemaExprCXX.cpp.

References Diag(), clang::ExprError(), clang::TypeSourceInfo::getType(), GetUuidAttrOfType(), and clang::QualType::withConst().

ExprResult Sema::BuildCXXUuidof ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildDeclarationNameExpr ( const CXXScopeSpec SS,
LookupResult R,
bool  NeedsADL 
)
ExprResult Sema::BuildDeclarationNameExpr ( const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
NamedDecl D 
)
Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup ( Decl **  Group,
unsigned  NumDecls,
bool  TypeMayContainAuto = true 
)
ExprResult Sema::BuildDeclRefExpr ( ValueDecl D,
QualType  Ty,
ExprValueKind  VK,
SourceLocation  Loc,
const CXXScopeSpec SS = 0 
)
ExprResult Sema::BuildDeclRefExpr ( ValueDecl D,
QualType  Ty,
ExprValueKind  VK,
const DeclarationNameInfo NameInfo,
const CXXScopeSpec SS = 0 
)
QualType Sema::BuildDecltypeType ( Expr E,
SourceLocation  Loc 
)
MemInitResult Sema::BuildDelegatingInitializer ( TypeSourceInfo TInfo,
const MultiInitializer Args,
CXXRecordDecl ClassDecl 
)
ExprResult Sema::BuildDependentDeclRefExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
VarDecl * Sema::BuildExceptionDeclaration ( Scope S,
TypeSourceInfo TInfo,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id 
)
ExprResult Sema::BuildExpressionFromDeclTemplateArgument ( const TemplateArgument Arg,
QualType  ParamType,
SourceLocation  Loc 
)
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 4320 of file SemaTemplate.cpp.

References clang::CharacterLiteral::Ascii, clang::CK_IntegralCast, clang::IntegerLiteral::Create(), clang::CStyleCastExpr::Create(), clang::Type::getAs(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::Integral, clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::VK_RValue, and clang::CharacterLiteral::Wide.

Referenced by getTrivialTemplateArgumentLoc().

ExprResult Sema::BuildExpressionTrait ( ExpressionTrait  OET,
SourceLocation  KWLoc,
Expr Queried,
SourceLocation  RParen 
)
QualType Sema::BuildExtVectorType ( QualType  T,
Expr ArraySize,
SourceLocation  AttrLoc 
)
QualType Sema::BuildFunctionType ( QualType  T,
QualType ParamTypes,
unsigned  NumParamTypes,
bool  Variadic,
unsigned  Quals,
RefQualifierKind  RefQualifier,
SourceLocation  Loc,
DeclarationName  Entity,
FunctionType::ExtInfo  Info 
)

Build a function type.

This routine checks the function type according to C++ rules and under the assumption that the result type and parameter types have just been instantiated from a template. It therefore duplicates some of the behavior of GetTypeForDeclarator, but in a much simpler form that is only suitable for this narrow use case.

Parameters:
TThe return type of the function.
ParamTypesThe parameter types of the function. This array will be modified to account for adjustments to the types of the function parameters.
NumParamTypesThe number of parameter types in ParamTypes.
VariadicWhether this is a variadic function type.
QualsThe cvr-qualifiers to be applied to the function type.
LocThe location of the entity whose type involves this function type or, if there is no such entity, the location of the type that will have function type.
EntityThe name of the entity that involves the function type, if known.
Returns:
A suitable function type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 1448 of file SemaType.cpp.

References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getFunctionType(), clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::FunctionProtoType::ExtProtoInfo::Variadic.

ExprResult Sema::BuildImplicitMemberExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs,
bool  IsKnownInstance 
)

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 1561 of file SemaExprMember.cpp.

References clang::LookupResult::empty(), clang::LookupResult::getAsSingle(), clang::SourceRange::getBegin(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::LookupResult::isAmbiguous(), and clang::SourceRange::isValid().

ExprResult Sema::BuildInstanceMessage ( Expr Receiver,
QualType  ReceiverType,
SourceLocation  SuperLoc,
Selector  Sel,
ObjCMethodDecl Method,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  ArgsIn,
bool  isImplicit = false 
)

Build an Objective-C instance message expression.

This routine takes care of both normal instance messages and instance messages to the superclass instance.

Parameters:
ReceiverThe expression that computes the object that will receive this message. This may be empty, in which case we are sending to the superclass instance and SuperLoc must be a valid source location.
ReceiverTypeThe (static) type of the object receiving the message. When a Receiver expression is provided, this is the same type as that expression. For a superclass instance send, this is a pointer to the type of the superclass.
SuperLocThe location of the "super" keyword in a superclass instance message.
SelThe selector to which the message is being sent.
MethodThe method that this instance message is invoking, if already known.
LBracLocThe location of the opening square bracket ']'.
RBracThe location of the closing square bracket ']'.
ArgsThe message arguments.

Definition at line 1216 of file SemaExprObjC.cpp.

References Args, 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(), DiagnoseAvailabilityOfDecl(), DiagnoseUseOfDecl(), clang::ExprError(), forceUnknownAnyToType(), getCurMethodDecl(), clang::Decl::getDeclContext(), getLangOptions(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::ObjCMessageExpr::getMethodFamily(), clang::ASTContext::getObjCIdType(), clang::ObjCMethodDecl::getResultType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::ASTContext::isObjCNSObjectType(), isSelfExpr(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupInstanceMethodInGlobalPool(), LookupMethodInQualifiedType(), LookupPrivateClassMethod(), LookupPrivateInstanceMethod(), MaybeBindToTemporary(), clang::move(), clang::Expr::NPC_ValueDependentIsNull, NumArgs, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, Owned(), PDiag(), PerformContextuallyConvertToObjCPointer(), clang::ASTMultiPtr< PtrTy >::release(), RequireCompleteType(), clang::ObjCMessageExpr::setDelegateInitCall(), clang::ASTMultiPtr< PtrTy >::size(), clang::ActionResult< PtrTy, CompressInvalid >::take(), 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 1176 of file SemaExprObjC.cpp.

References BuildInstanceMessage().

MemInitResult Sema::BuildMemberInitializer ( ValueDecl Member,
const MultiInitializer Args,
SourceLocation  IdLoc 
)
QualType Sema::BuildMemberPointerType ( QualType  T,
QualType  Class,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a member pointer type T Class::*.

Parameters:
Tthe type to which the member pointer refers.
Classthe class type into which the member pointer points.
CVRQualifiers applied to the member pointer type
Locthe location where this type begins
Entitythe name of the entity that will have this member pointer type
Returns:
a member pointer type, if successful, or a NULL type if there was an error.

Definition at line 1507 of file SemaType.cpp.

References CheckDistantExceptionSpec(), Context, clang::CXXABI_Microsoft, Diag(), clang::DeclarationName::getAsString(), clang::ASTContext::getCanonicalType(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getTargetInfo(), clang::QualType::getTypePtr(), and RequireCompleteType().

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 
)
ExprResult Sema::BuildMemberReferenceExpr ( Expr Base,
QualType  BaseType,
SourceLocation  OpLoc,
bool  IsArrow,
const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
NamedDecl FirstQualifierInScope,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs,
bool  SuppressQualifierCheck = false 
)
MemInitResult Sema::BuildMemInitializer ( Decl ConstructorD,
Scope S,
CXXScopeSpec SS,
IdentifierInfo MemberOrBase,
ParsedType  TemplateTypeTy,
const DeclSpec DS,
SourceLocation  IdLoc,
const MultiInitializer Init,
SourceLocation  EllipsisLoc 
)
Decl * Sema::BuildMicrosoftCAnonymousStruct ( Scope S,
DeclSpec DS,
RecordDecl Record 
)
StmtResult Sema::BuildMSDependentExistsStmt ( SourceLocation  KeywordLoc,
bool  IsIfExists,
NestedNameSpecifierLoc  QualifierLoc,
DeclarationNameInfo  NameInfo,
Stmt Nested 
)

Definition at line 2557 of file SemaStmt.cpp.

StmtResult Sema::BuildObjCAtThrowStmt ( SourceLocation  AtLoc,
Expr Throw 
)
ExprResult Sema::BuildObjCBridgedCast ( SourceLocation  LParenLoc,
ObjCBridgeCastKind  Kind,
SourceLocation  BridgeKeywordLoc,
TypeSourceInfo TSInfo,
Expr SubExpr 
)
ExprResult Sema::BuildObjCEncodeExpression ( SourceLocation  AtLoc,
TypeSourceInfo EncodedTypeInfo,
SourceLocation  RParenLoc 
)
VarDecl * Sema::BuildObjCExceptionDecl ( TypeSourceInfo TInfo,
QualType  ExceptionType,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
bool  Invalid = false 
)
ExprResult clang::Sema::BuildOverloadedArrowExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc 
)
ExprResult clang::Sema::BuildOverloadedCallExpr ( Scope S,
Expr Fn,
UnresolvedLookupExpr ULE,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
SourceLocation  RParenLoc,
Expr ExecConfig,
bool  AllowTypoCorrection = true 
)
QualType Sema::BuildParenType ( QualType  T)

Build a paren type including T.

Definition at line 1032 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 6837 of file SemaDecl.cpp.

References clang::ParmVarDecl::Create(), Param, clang::SC_None, and clang::Decl::setImplicit().

Referenced by clang::TemplateDeclInstantiator::VisitFunctionDecl().

QualType Sema::BuildPointerType ( QualType  T,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a pointer type.

Parameters:
TThe type to which we'll be building a pointer.
LocThe location of the entity whose type involves this pointer type or, if there is no such entity, the location of the type that will have pointer type.
EntityThe name of the entity that involves the pointer type, if known.
Returns:
A suitable pointer type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 1101 of file SemaType.cpp.

References Context, Diag(), getLangOptions(), clang::ASTContext::getPointerType(), getPrintableNameForEntity(), and inferARCLifetimeForPointee().

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildPossibleImplicitMemberExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs 
)
ExprResult Sema::BuildPseudoDestructorExpr ( Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
const CXXScopeSpec SS,
TypeSourceInfo ScopeType,
SourceLocation  CCLoc,
SourceLocation  TildeLoc,
PseudoDestructorTypeStorage  DestroyedType,
bool  HasTrailingLParen 
)
ExprResult Sema::BuildQualifiedDeclarationNameExpr ( CXXScopeSpec SS,
const DeclarationNameInfo NameInfo 
)

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

References Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::LookupResult::isAmbiguous(), and clang::DeclContext::isDependentContext().

ExprResult Sema::BuildQualifiedTemplateIdExpr ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
QualType Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
Qualifiers  Qs 
)
QualType clang::Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
unsigned  CVR 
) [inline]

Definition at line 759 of file Sema.h.

References BuildQualifiedType(), and clang::Qualifiers::fromCVRMask().

QualType Sema::BuildReferenceType ( QualType  T,
bool  SpelledAsLValue,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a reference type.

Parameters:
TThe type to which we'll be building a reference.
LocThe location of the entity whose type involves this reference type or, if there is no such entity, the location of the type that will have reference type.
EntityThe name of the entity that involves the reference type, if known.
Returns:
A suitable reference type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 1133 of file SemaType.cpp.

References Context, Diag(), clang::ASTContext::getCanonicalType(), getLangOptions(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), inferARCLifetimeForPointee(), and clang::ASTContext::OverloadTy.

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildResolvedCallExpr ( Expr Fn,
NamedDecl NDecl,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
SourceLocation  RParenLoc,
Expr Config = 0,
bool  IsExecConfig = false 
)
QualType Sema::BuildStdInitializerList ( QualType  Element,
SourceLocation  Loc 
)

Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found.

Returns:
The instantiated template, or null on error.

Definition at line 5897 of file SemaDeclCXX.cpp.

References clang::TemplateArgumentListInfo::addArgument(), Args, CheckTemplateIdType(), Context, clang::ASTContext::getCanonicalType(), clang::ASTContext::getTrivialTypeSourceInfo(), LookupStdInitializerList(), and StdInitializerList.

ExprResult Sema::BuildTemplateIdExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
bool  RequiresADL,
const TemplateArgumentListInfo TemplateArgs 
)
QualType Sema::BuildTypeofExprType ( Expr E,
SourceLocation  Loc 
)
ExprResult Sema::BuildUnaryOp ( Scope S,
SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr Input 
)
QualType Sema::BuildUnaryTransformType ( QualType  BaseType,
UnaryTransformType::UTTKind  UKind,
SourceLocation  Loc 
)
ExprResult Sema::BuildUnaryTypeTrait ( UnaryTypeTrait  OTT,
SourceLocation  KWLoc,
TypeSourceInfo T,
SourceLocation  RParen 
)
NamedDecl * Sema::BuildUsingDeclaration ( Scope S,
AccessSpecifier  AS,
SourceLocation  UsingLoc,
CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
AttributeList AttrList,
bool  IsInstantiation,
bool  IsTypeName,
SourceLocation  TypenameLoc 
)

Builds a using declaration.

Parameters:
IsInstantiation- Whether this call arises from an instantiation of an unresolved using declaration. We treat the lookup differently for these declarations.

Definition at line 6386 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::LookupResult::begin(), BuildUsingShadowDecl(), CheckInheritedConstructorUsingDecl(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), Context, clang::UsingDecl::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::UnresolvedUsingTypenameDecl::Create(), CurContext, clang::DeclarationName::CXXConstructorName, Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::LookupResult::Filter::erase(), ForRedeclaration, clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::isAmbiguous(), isDeclInScope(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::DeclContext::isRecord(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), RequireCompleteDeclContext(), clang::Decl::setAccess(), clang::LookupResult::setHideTags(), and clang::Decl::setInvalidDecl().

Referenced by ActOnUsingDeclaration().

UsingShadowDecl * Sema::BuildUsingShadowDecl ( Scope S,
UsingDecl UD,
NamedDecl Target 
)
ExprResult Sema::BuildVAArgExpr ( SourceLocation  BuiltinLoc,
Expr E,
TypeSourceInfo TInfo,
SourceLocation  RPLoc 
)
ExprResult Sema::BuildVectorLiteral ( SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
Expr E,
TypeSourceInfo TInfo 
)
bool Sema::CanPerformCopyInitialization ( const InitializedEntity Entity,
ExprResult  Init 
)
bool Sema::CanUseDecl ( NamedDecl D)

Determine whether the use of this declaration is valid, without emitting diagnostics.

Definition at line 49 of file SemaExpr.cpp.

References clang::AR_Unavailable, and clang::Decl::getAvailability().

QualType Sema::CheckAdditionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
QualType CompLHSTy = 0 
)
Sema::AccessResult Sema::CheckAddressOfMemberAccess ( Expr OvlExpr,
DeclAccessPair  FoundDecl 
)
bool Sema::CheckAllocatedType ( QualType  AllocType,
SourceLocation  Loc,
SourceRange  R 
)

CheckAllocatedType - Checks that a type is suitable as the allocated type in a new-expression. dimension off and stores the size expression in ArraySize.

Definition at line 1249 of file SemaExprCXX.cpp.

References Diag(), clang::QualType::getAddressSpace(), clang::QualType::getObjCLifetime(), clang::QualType::getUnqualifiedType(), and clang::Qualifiers::OCL_None.

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 1527 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), and clang::DeclAccessPair::getAccess().

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

References CK_Invalid, and clang::VK_RValue.

Referenced by ActOnPropertyImplDecl(), DiagnosePropertyAccessorMismatch(), and handleCleanupAttr().

Sema::AssignConvertType Sema::CheckAssignmentConstraints ( QualType  LHSType,
ExprResult RHS,
CastKind Kind 
)

Check assignment constraints and 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. 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 5171 of file SemaExpr.cpp.

References checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::CK_AnyPointerToBlockPointerCast, clang::CK_AtomicToNonAtomic, 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, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getCanonicalType(), getElementType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), maybeExtendBlockObject(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

QualType Sema::CheckAssignmentOperands ( Expr LHSExpr,
ExprResult RHS,
SourceLocation  Loc,
QualType  CompoundType 
)
Sema::AccessResult Sema::CheckBaseClassAccess ( SourceLocation  AccessLoc,
QualType  Base,
QualType  Derived,
const CXXBasePath Path,
unsigned  DiagID,
bool  ForceCheck = false,
bool  ForceUnprivileged = false 
)

Checks access for a hierarchy conversion.

Parameters:
IsBaseToDerivedwhether this is a base-to-derived conversion (true) or a derived-to-base conversion (false)
ForceChecktrue if this check should be performed even if access control is disabled; some things rely on this for semantics
ForceUnprivilegedtrue if this check should proceed as if the context had no special privileges
ADKcontrols the kind of diagnostics that are used

Definition at line 1595 of file SemaAccess.cpp.

References clang::CXXBasePath::Access, AR_accessible, AR_dependent, AR_inaccessible, clang::AS_public, CheckAccess(), and CheckEffectiveAccess().

Referenced by CheckDerivedToBaseConversion(), CheckExceptionSpecSubset(), TryStaticDowncast(), and TryStaticMemberPointerUpcast().

CXXBaseSpecifier * Sema::CheckBaseSpecifier ( CXXRecordDecl Class,
SourceRange  SpecifierRange,
bool  Virtual,
AccessSpecifier  Access,
TypeSourceInfo TInfo,
SourceLocation  EllipsisLoc 
)
QualType Sema::CheckBitwiseOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign = false 
) [inline]
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.

Parameters:
Loc- A location associated with the condition, e.g. the 'if' keyword.
Returns:
true iff there were any errors

Definition at line 10160 of file SemaExpr.cpp.

References CheckCXXBooleanCondition(), CheckPlaceholderExpr(), DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseAssignmentAsCondition(), DiagnoseEqualityWithExtraParens(), clang::ExprError(), getLangOptions(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), Owned(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by ActOnBooleanCondition(), and clang::TemplateDeclInstantiator::InitFunctionInstantiation().

bool Sema::CheckCallingConvAttr ( const AttributeList attr,
CallingConv CC 
)
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 10054 of file SemaExpr.cpp.

References clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CallExpr::getSourceRange(), PDiag(), and RequireCompleteType().

bool Sema::CheckCaseExpression ( Expr E)
void Sema::CheckCastAlign ( Expr Op,
QualType  T,
SourceRange  TRange 
)
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 1646 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::classmeth_begin(), clang::ObjCContainerDecl::classmeth_end(), clang::ObjCCategoryImplDecl::getCategoryDecl(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCContainerDecl::instmeth_begin(), clang::ObjCContainerDecl::instmeth_end(), and MatchAllMethodDeclarations().

Referenced by ImplMethodsVsClassMethods().

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,
unsigned  NumOuterTemplateParamLists,
TemplateParameterList **  OuterTemplateParamLists 
)

Definition at line 827 of file SemaTemplate.cpp.

References clang::AS_none, clang::AS_public, clang::LookupResult::begin(), 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::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::DeclContext::getLookupParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::SourceLocation::isValid(), clang::DeclContext::makeDeclVisibleInContext(), NULL, 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::TemplateParameterList::size(), clang::TagDecl::startDefinition(), and clang::TTK_Enum.

Referenced by ActOnTemplatedFriendTag().

QualType Sema::CheckCompareOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  OpaqueOpc,
bool  isRelational 
)
void Sema::CheckCompatibleReinterpretCast ( QualType  SrcType,
QualType  DestType,
bool  IsDereference,
SourceRange  Range 
)
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.

class without overriding any.

Definition at line 3622 of file SemaDeclCXX.cpp.

References clang::AS_public, CheckAbstractClassUsage(), CheckExplicitlyDefaultedMethods(), Context, DeclareInheritedConstructors(), Diag(), DiagnoseHiddenVirtualMethods(), DynamicClasses, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDestructor(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::ASTContext::getRecordType(), clang::TagDecl::getTagKind(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CXXRecordDecl::isAbstract(), clang::CXXRecordDecl::isAggregate(), clang::TagDecl::isDependentType(), clang::CXXRecordDecl::isDynamicClass(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLiteral(), clang::CXXRecordDecl::isPolymorphic(), clang::CXXMethodDecl::isVirtual(), LangOpts, clang::DeclContext::lookup(), clang::CXXRecordDecl::method_begin(), clang::CXXRecordDecl::method_end(), PDiag(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back(), RequireLiteralType(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().

void Sema::CheckCompleteVariableDeclaration ( VarDecl var)
QualType Sema::CheckConditionalOperands ( ExprResult Cond,
ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
ExprObjectKind OK,
SourceLocation  QuestionLoc 
)
ExprResult Sema::CheckConditionVariable ( VarDecl ConditionVar,
SourceLocation  StmtLoc,
bool  ConvertToBoolean 
)
void Sema::CheckConflictingOverridingMethod ( ObjCMethodDecl Method,
ObjCMethodDecl Overridden,
bool  IsProtocolMethodDecl 
)
bool Sema::CheckConstexprFunctionBody ( const FunctionDecl Dcl,
Stmt Body,
bool  IsInstantiation 
)
bool Sema::CheckConstexprFunctionDecl ( const FunctionDecl FD,
CheckConstexprKind  CCK 
)
void Sema::CheckConstructor ( CXXConstructorDecl Constructor)
Sema::AccessResult Sema::CheckConstructorAccess ( SourceLocation  Loc,
CXXConstructorDecl D,
const InitializedEntity Entity,
AccessSpecifier  Access,
bool  IsCopyBindingRefToTemp = false 
)
Sema::AccessResult Sema::CheckConstructorAccess ( SourceLocation  Loc,
CXXConstructorDecl D,
AccessSpecifier  Access,
PartialDiagnostic  PD 
)

Checks access to a constructor.

Definition at line 1490 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), clang::CXXMethodDecl::getParent(), and clang::DeclAccessPair::make().

QualType Sema::CheckConstructorDeclarator ( Declarator D,
QualType  R,
StorageClass SC 
)

CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R. If there are any errors in the declarator, this routine will emit diagnostics and set the invalid bit to true. In any case, the type will be updated to reflect a well-formed type for the constructor and returned.

Definition at line 5200 of file SemaDeclCXX.cpp.

References clang::FunctionProtoType::arg_type_begin(), clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), Diag(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::FunctionProtoType::getNumArgs(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::FunctionType::getResultType(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getVirtualSpecLoc(), 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 
)
ExprResult clang::Sema::CheckConvertedConstantExpression ( Expr From,
QualType  T,
llvm::APSInt &  Value,
CCEKind  CCE 
)
bool Sema::CheckCUDATarget ( CUDAFunctionTarget  CallerTarget,
CUDAFunctionTarget  CalleeTarget 
)

Definition at line 11099 of file SemaDeclCXX.cpp.

References CFT_Device, CFT_Global, CFT_Host, and CFT_HostDevice.

Referenced by AddOverloadCandidate(), and CheckCUDATarget().

bool clang::Sema::CheckCUDATarget ( const FunctionDecl Caller,
const FunctionDecl Callee 
) [inline]

Definition at line 6151 of file Sema.h.

References CheckCUDATarget(), and IdentifyCUDATarget().

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

Referenced by CheckBooleanCondition().

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

References Diag(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::hasDefaultArg(), clang::Decl::isInvalidDecl(), Param, and clang::ParmVarDecl::setDefaultArg().

Referenced by ActOnFinishDelayedCXXMethodDeclaration().

void Sema::CheckCXXThisCapture ( SourceLocation  Loc,
bool  Explicit = false 
)

Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.

Parameters:
LocThe location at which the capture of 'this' occurs.
ExplicitWhether 'this' is explicitly captured in a lambda capture list.

Definition at line 673 of file SemaExprCXX.cpp.

References clang::sema::CapturingScopeInfo::AddThisCapture(), Diag(), clang::sema::CapturingScopeInfo::ImpCap_Block, and clang::sema::CapturingScopeInfo::ImpCap_LambdaByref.

ExprResult Sema::CheckCXXThrowOperand ( SourceLocation  ThrowLoc,
Expr E,
bool  IsThrownVarInScope 
)
void Sema::CheckDelegatingCtorCycles ( )
bool Sema::CheckDependentFunctionTemplateSpecialization ( FunctionDecl FD,
const TemplateArgumentListInfo ExplicitTemplateArgs,
LookupResult Previous 
)

Perform semantic analysis for the given dependent function template specialization. The only possible way to get a dependent function template specialization is with a friend declaration, like so:

template <class t>=""> void foo(T); template <class t>=""> class A { friend void foo<>(T); };

There really isn't any useful analysis we can do here, so we just store the information.

Definition at line 5567 of file SemaTemplate.cpp.

References clang::LookupResult::asUnresolvedSet(), 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 = 0,
bool  IgnoreAccess = false 
)
bool Sema::CheckDerivedToBaseConversion ( QualType  Derived,
QualType  Base,
unsigned  InaccessibleBaseID,
unsigned  AmbigiousBaseConvID,
SourceLocation  Loc,
SourceRange  Range,
DeclarationName  Name,
CXXCastPath BasePath 
)

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.

Definition at line 1296 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(), and clang::CXXBasePaths::setRecordingPaths().

bool Sema::CheckDestructor ( CXXDestructorDecl Destructor)
Sema::AccessResult Sema::CheckDestructorAccess ( SourceLocation  Loc,
CXXDestructorDecl Dtor,
const PartialDiagnostic PDiag 
)
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 5342 of file SemaDeclCXX.cpp.

References clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), clang::DeclaratorChunk::FunctionTypeInfo::freeArgs(), FTIHasSingleVoidArgument(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getStorageClassSpecLoc(), GetTypeFromParser(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::DeclSpec::hasTypeSpecifier(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, clang::DeclaratorChunk::FunctionTypeInfo::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::Qualifiers::Restrict, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, clang::ASTContext::VoidTy, and clang::Qualifiers::Volatile.

Referenced by CreateNewFunctionDecl().

Sema::AccessResult Sema::CheckDirectMemberAccess ( SourceLocation  UseLoc,
NamedDecl Target,
const PartialDiagnostic Diag 
)

Checks direct (i.e. non-inherited) access to an arbitrary class member.

Definition at line 1509 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), and clang::DeclAccessPair::make().

Referenced by ShouldDeleteCopyAssignmentOperator(), and ShouldDeleteMoveAssignmentOperator().

bool clang::Sema::CheckDistantExceptionSpec ( QualType  T)

CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification. This means that it is invalid to add another level of indirection.

Definition at line 84 of file SemaExceptionSpec.cpp.

References clang::FunctionProtoType::hasExceptionSpec().

Referenced by BuildMemberPointerType(), and GetFullTypeForDeclarator().

EnumConstantDecl * Sema::CheckEnumConstant ( EnumDecl Enum,
EnumConstantDecl LastEnumConst,
SourceLocation  IdLoc,
IdentifierInfo Id,
Expr val 
)
bool clang::Sema::CheckEquivalentExceptionSpec ( FunctionDecl Old,
FunctionDecl New 
)

Definition at line 99 of file SemaExceptionSpec.cpp.

References clang::FunctionProtoType::arg_type_begin(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::FunctionProtoType::exception_begin(), clang::FunctionProtoType::exception_end(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpecType, clang::DeclarationName::getCXXOverloadedOperator(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOptions(), clang::Decl::getLocation(), clang::Preprocessor::getLocForEndOfToken(), clang::FunctionProtoType::getNoexceptExpr(), clang::FunctionProtoType::getNumArgs(), clang::FunctionProtoType::getNumExceptions(), getPrintingPolicy(), clang::FunctionType::getResultType(), clang::ASTContext::getSourceManager(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isExternC(), clang::SourceManager::isInSystemHeader(), clang::SourceLocation::isInvalid(), clang::DeclContext::isTranslationUnit(), PDiag(), PP, clang::Stmt::printPretty(), and clang::ValueDecl::setType().

Referenced by CheckEquivalentExceptionSpec(), CheckExplicitlyDefaultedCopyAssignment(), CheckExplicitlyDefaultedCopyConstructor(), CheckExplicitlyDefaultedDefaultConstructor(), CheckExplicitlyDefaultedDestructor(), CheckExplicitlyDefaultedMoveAssignment(), CheckExplicitlyDefaultedMoveConstructor(), 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 264 of file SemaExceptionSpec.cpp.

References CheckEquivalentExceptionSpec(), getLangOptions(), and PDiag().

bool clang::Sema::CheckEquivalentExceptionSpec ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Old,
SourceLocation  OldLoc,
const FunctionProtoType New,
SourceLocation  NewLoc,
bool *  MissingExceptionSpecification = 0,
bool *  MissingEmptyExceptionSpecification = 0,
bool  AllowNoexceptAllMatchWithNoSpec = false,
bool  IsOperatorNew = false 
)
bool clang::Sema::CheckExceptionSpecCompatibility ( Expr From,
QualType  ToType 
)
bool clang::Sema::CheckExceptionSpecSubset ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Superset,
SourceLocation  SuperLoc,
const FunctionProtoType Subset,
SourceLocation  SubLoc 
)
void Sema::CheckExplicitlyDefaultedCopyAssignment ( CXXMethodDecl Method)
void Sema::CheckExplicitlyDefaultedCopyConstructor ( CXXConstructorDecl Ctor)
void Sema::CheckExplicitlyDefaultedDefaultConstructor ( CXXConstructorDecl Ctor)
void Sema::CheckExplicitlyDefaultedDestructor ( CXXDestructorDecl Dtor)
void Sema::CheckExplicitlyDefaultedMethods ( CXXRecordDecl Record)
void Sema::CheckExplicitlyDefaultedMoveAssignment ( CXXMethodDecl Method)
void Sema::CheckExplicitlyDefaultedMoveConstructor ( CXXConstructorDecl Ctor)
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 329 of file SemaDeclCXX.cpp.

References Diag(), clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::ParmVarDecl::getDefaultArg(), clang::Decl::getLocation(), clang::Declarator::getNumTypeObjects(), clang::Stmt::getSourceRange(), clang::Declarator::getTypeObject(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::DeclaratorChunk::Kind, Param, and clang::ParmVarDecl::setDefaultArg().

Referenced by ActOnCXXNamedCast(), ActOnObjCExceptionDecl(), and ActOnTypeName().

ExprResult Sema::CheckExtVectorCast ( SourceRange  R,
QualType  DestTy,
Expr CastExpr,
CastKind Kind 
)
FieldDecl * Sema::CheckFieldDecl ( DeclarationName  Name,
QualType  T,
TypeSourceInfo TInfo,
RecordDecl Record,
SourceLocation  Loc,
bool  Mutable,
Expr BitWidth,
bool  HasInit,
SourceLocation  TSSL,
AccessSpecifier  AS,
NamedDecl PrevDecl,
Declarator D = 0 
)
bool Sema::CheckForConstantInitializer ( Expr e,
QualType  t 
)

type checking declaration initializers (C99 6.7.8)

Definition at line 5877 of file SemaDecl.cpp.

References Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Expr::isConstantInitializer().

void Sema::CheckForFunctionRedefinition ( FunctionDecl FD)
bool Sema::CheckForwardProtocolDeclarationForCircularDependency ( IdentifierInfo PName,
SourceLocation PLoc,
SourceLocation  PrevLoc,
const ObjCList< ObjCProtocolDecl > &  PList 
)
FriendDecl * Sema::CheckFriendTypeDecl ( SourceLocation  Loc,
SourceLocation  FriendLoc,
TypeSourceInfo TSInfo 
)
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).

Parameters:
IsExplicitSpecialiationwhether this new function declaration is an explicit specialization of the previous declaration.

This sets NewFD->isInvalidDecl() to true if there was an error.

Returns true if the function declaration is a redeclaration.

Definition at line 5593 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::LookupResult::addDecl(), AllowOverloadingOfFunction(), clang::CXXMethodDecl::begin_overridden_methods(), clang::LookupResult::clear(), clang::frontend::CPlusPlus, Diag(), clang::LookupResult::empty(), clang::Decl::getAccess(), clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::LookupResult::getFoundDecl(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), clang::FunctionDecl::getLiteralIdentifier(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::FunctionDecl::getResultType(), clang::FunctionDecl::getStorageClass(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::FunctionDecl::isExternC(), clang::QualType::isNull(), clang::FunctionDecl::isOverloadedOperator(), clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), and clang::FunctionDecl::setPreviousDeclaration().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

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.

Parameters:
FDthe function declaration, which will be updated to become a function template specialization.
ExplicitTemplateArgsthe explicitly-provided template arguments, if any. Note that this may be valid info even when 0 arguments are explicitly provided as in, e.g., void sort<>(char*, char*); as it anyway contains info on the angle brackets locations.
Previousthe set of declarations that may be specialized by this function specialization.

Definition at line 5610 of file SemaTemplate.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::LookupResult::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), CheckTemplateSpecializationScope(), clang::LookupResult::clear(), DeduceTemplateArguments(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::Decl::FOK_None, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getFriendObjectKind(), clang::Decl::getLocation(), clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation(), clang::FunctionDecl::getPrimaryTemplate(), clang::DeclContext::getRedeclContext(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::Decl::setLocation(), clang::FunctionDecl::setStorageClass(), clang::FunctionTemplateSpecializationInfo::setTemplateSpecializationKind(), clang::TPOC_Other, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by clang::TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl(), and 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++0x [class.virtual]p3.

CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++0x [class.virtual]p3.

Definition at line 1443 of file SemaDeclCXX.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and clang::Decl::hasAttr().

void clang::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.

bool Sema::CheckInheritedConstructorUsingDecl ( UsingDecl UD)
bool Sema::checkInitMethod ( ObjCMethodDecl method,
QualType  receiverTypeIfCall 
)

Check whether the given method, which must be in the 'init' family, is a valid member of that family.

Parameters:
receiverTypeIfCall- if null, check this as if declaring it; if non-null, check this as if making a call to it with the given receiver type
Returns:
true to indicate that there was an error and appropriate actions were taken

Definition at line 40 of file SemaDeclObjC.cpp.

References clang::Decl::addAttr(), Context, Diag(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getResultType(), 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().

bool Sema::CheckLiteralOperatorDeclaration ( FunctionDecl FnDecl)
QualType Sema::CheckLogicalOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  Opc 
) [inline]
void Sema::CheckLookupAccess ( const LookupResult R)
void Sema::CheckMain ( FunctionDecl FD,
const DeclSpec D 
)
Sema::AccessResult Sema::CheckMemberOperatorAccess ( SourceLocation  OpLoc,
Expr ObjectExpr,
Expr ArgExpr,
DeclAccessPair  Found 
)
bool clang::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 2611 of file SemaOverload.cpp.

References clang::CK_BaseToDerivedMemberPointer, clang::CK_NullToMemberPointer, Diag(), clang::MemberPointerType::getClass(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::isNullPointerConstant(), and clang::Expr::NPC_ValueDependentIsNull.

bool Sema::CheckMemberSpecialization ( NamedDecl Member,
LookupResult Previous 
)

Perform semantic analysis for the given non-template member specialization.

This routine performs all of the semantic analysis required for an explicit member function specialization. On successful completion, the function declaration FD will become a member function specialization.

Parameters:
Memberthe member declaration, which will be updated to become a specialization.
Previousthe set of declarations, one of which may be specialized by this function specialization; the set will be modified to contain the redeclared member.

Definition at line 5750 of file SemaTemplate.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::begin(), CheckTemplateSpecializationScope(), clang::LookupResult::clear(), Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::Decl::FOK_None, clang::LookupResult::getFoundDecl(), clang::Decl::getFriendObjectKind(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLocation(), clang::VarDecl::getMemberSpecializationInfo(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::Decl::setLocation(), clang::VarDecl::setTemplateSpecializationKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

bool Sema::CheckMessageArgumentTypes ( QualType  ReceiverType,
Expr **  Args,
unsigned  NumArgs,
Selector  Sel,
ObjCMethodDecl Method,
bool  isClassMessage,
bool  isSuperMessage,
SourceLocation  lbrac,
SourceLocation  rbrac,
QualType ReturnType,
ExprValueKind VK 
)
Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol ( Scope S,
CXXScopeSpec SS,
const DeclarationNameInfo TargetNameInfo 
)
Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol ( Scope S,
SourceLocation  KeywordLoc,
bool  IsIfExists,
CXXScopeSpec SS,
UnqualifiedId Name 
)

Definition at line 4854 of file SemaExprCXX.cpp.

References DiagnoseUnexpandedParameterPacks().

QualType Sema::CheckMultiplyDivideOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign,
bool  IsDivide 
)
bool Sema::CheckNontrivialField ( FieldDecl FD)
QualType Sema::CheckNonTypeTemplateParameterType ( QualType  T,
SourceLocation  Loc 
)

Check that the type of a non-type template parameter is well-formed.

Returns:
the (possibly-promoted) parameter type if valid; otherwise, produces a diagnostic and returns a NULL type.

Definition at line 609 of file SemaTemplate.cpp.

References Diag().

Referenced by clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl().

bool Sema::CheckNoReturnAttr ( const AttributeList attr)
Sema::ARCConversionResult Sema::CheckObjCARCConversion ( SourceRange  castRange,
QualType  castType,
Expr *&  op,
CheckedConversionKind  CCK 
)
bool Sema::CheckObjCARCUnavailableWeakConversion ( QualType  castType,
QualType  ExprType 
)
bool Sema::CheckObjCDeclScope ( Decl D)
void Sema::CheckObjCMethodOverride ( ObjCMethodDecl NewMethod,
const ObjCMethodDecl Overridden,
bool  IsImplementation 
)
bool clang::Sema::CheckObjCMethodOverrides ( ObjCMethodDecl NewMethod,
DeclContext DC 
)

Check whether the given method overrides any methods in its class, calling CheckObjCMethodOverride for each overridden method.

void Sema::CheckObjCPropertyAttributes ( Decl PropertyPtrTy,
SourceLocation  Loc,
unsigned &  Attributes 
)
Sema::OverloadKind clang::Sema::CheckOverload ( Scope S,
FunctionDecl New,
const LookupResult OldDecls,
NamedDecl *&  OldDecl,
bool  IsForUsingDecl 
)
bool clang::Sema::CheckOverloadedOperatorDeclaration ( FunctionDecl FnDecl)
void Sema::CheckOverrideControl ( const Decl D)
bool clang::Sema::CheckOverridingFunctionExceptionSpec ( const CXXMethodDecl New,
const CXXMethodDecl Old 
)
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 10603 of file SemaDeclCXX.cpp.

References CheckDerivedToBaseConversion(), Context, Diag(), clang::NamedDecl::getDeclName(), clang::QualType::getLocalCVRQualifiers(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), IsDerivedFrom(), clang::QualType::isMoreQualifiedThan(), clang::QualType::isNull(), PDiag(), and RequireCompleteType().

TypeSourceInfo * Sema::CheckPackExpansion ( TypeSourceInfo Pattern,
SourceLocation  EllipsisLoc,
llvm::Optional< unsigned >  NumExpansions 
)
QualType Sema::CheckPackExpansion ( QualType  Pattern,
SourceRange  PatternRange,
SourceLocation  EllipsisLoc,
llvm::Optional< unsigned >  NumExpansions 
)

Construct a pack expansion type from the pattern of the pack expansion.

Definition at line 429 of file SemaTemplateVariadic.cpp.

References Context, Diag(), and clang::ASTContext::getPackExpansionType().

ExprResult Sema::CheckPackExpansion ( Expr Pattern,
SourceLocation  EllipsisLoc,
llvm::Optional< unsigned >  NumExpansions 
)

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

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

Definition at line 450 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), and Owned().

ParmVarDecl * Sema::CheckParameter ( DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  NameLoc,
IdentifierInfo Name,
QualType  T,
TypeSourceInfo TSInfo,
VarDecl::StorageClass  StorageClass,
VarDecl::StorageClass  StorageClassAsWritten 
)
bool Sema::CheckParameterPacksForExpansion ( SourceLocation  EllipsisLoc,
SourceRange  PatternRange,
llvm::ArrayRef< UnexpandedParameterPack Unexpanded,
const MultiLevelTemplateArgumentList TemplateArgs,
bool &  ShouldExpand,
bool &  RetainExpansion,
llvm::Optional< unsigned > &  NumExpansions 
)

Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.

Parameters:
EllipsisLocThe location of the ellipsis that identifies the pack expansion.
PatternRangeThe source range that covers the entire pattern of the pack expansion.
UnexpandedThe set of unexpanded parameter packs within the pattern.
NumUnexpandedThe number of unexpanded parameter packs in Unexpanded.
ShouldExpandWill be set to true if the transformer should expand the corresponding pack expansions into separate arguments. When set, NumExpansions must also be set.
RetainExpansionWhether the caller should add an unexpanded pack expansion after all of the expanded arguments. This is used when extending explicitly-specified template argument packs per C++0x [temp.arg.explicit]p9.
NumExpansionsThe number of separate arguments that will be in the expanded form of the corresponding pack expansion. This is both an input and an output parameter, which can be set by the caller if the number of expansions is known a priori (e.g., due to a prior substitution) and will be set by the callee when the number of expansions is known. The callee must set this value when ShouldExpand is true; it may set this value in other cases.
Returns:
true if an error occurred (e.g., because the parameter packs are to be instantiated with arguments of different lengths), false otherwise. If false, ShouldExpand (and possibly NumExpansions) must be set.

Definition at line 483 of file SemaTemplateVariadic.cpp.

References CurrentInstantiationScope, Diag(), clang::LocalInstantiationScope::findInstantiationOf(), getDepthAndIndex(), clang::NamedDecl::getIdentifier(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), and Index.

Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InstantiateMemInitializers(), SubstBaseSpecifiers(), and clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl().

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 654 of file SemaExceptionSpec.cpp.

References clang::CheckSpecForTypesEquivalent(), clang::FunctionProtoType::getArgType(), clang::FunctionProtoType::getNumArgs(), clang::FunctionType::getResultType(), and PDiag().

Referenced by CheckExceptionSpecSubset().

bool Sema::CheckParmsForFunctionDef ( ParmVarDecl **  P,
ParmVarDecl **  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 4235 of file SemaChecking.cpp.

References Diag(), clang::ASTContext::getAsArrayType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ParmVarDecl::getOriginalType(), clang::ValueDecl::getType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), Param, clang::Decl::setInvalidDecl(), and clang::ArrayType::Star.

ExprResult Sema::CheckPlaceholderExpr ( Expr E)
bool clang::Sema::CheckPointerConversion ( Expr From,
QualType  ToType,
CastKind Kind,
CXXCastPath BasePath,
bool  IgnoreBaseAccess 
)

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 2501 of file SemaOverload.cpp.

References clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_DerivedToBase, clang::CK_NullToPointer, clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.

QualType Sema::CheckPointerToMemberOperands ( ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
SourceLocation  OpLoc,
bool  isIndirect 
)
void Sema::CheckProtocolMethodDefs ( SourceLocation  ImpLoc,
ObjCProtocolDecl PDecl,
bool &  IncompleteImpl,
const SelectorSet InsMap,
const SelectorSet ClsMap,
ObjCContainerDecl CDecl 
)

CheckProtocolMethodDefs - This routine checks unimplemented methods declared in protocol, and those referenced by it.

Parameters:
IDecl- Used for checking for methods which may have been inherited.

FIXME: Type hierarchies in Objective-C can be deep. We could most likely improve the efficiency of selector lookups and type checking by associating with each protocol / interface / category the flattened instance tables. If we used an immutable set to keep the table then it wouldn't add significant memory cost and it would be handy for lookups. CheckProtocolMethodDefs - This routine checks unimplemented methods Declared in protocol, and those referenced by it.

Definition at line 1462 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::classmeth_begin(), clang::ObjCContainerDecl::classmeth_end(), Context, DIAG, Diag(), Diags, clang::IdentifierTable::get(), clang::NamedDecl::getDeclName(), clang::DiagnosticsEngine::getDiagnosticLevel(), clang::ObjCMethodDecl::getImplementationControl(), getLangOptions(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::SelectorTable::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTContext::Idents, clang::DiagnosticsEngine::Ignored, clang::ObjCContainerDecl::instmeth_begin(), clang::ObjCContainerDecl::instmeth_end(), clang::ObjCMethodDecl::isSynthesized(), clang::ObjCInterfaceDecl::lookupClassMethod(), clang::ObjCInterfaceDecl::lookupInheritedClass(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), clang::ObjCMethodDecl::Optional, clang::ObjCProtocolDecl::protocol_begin(), clang::ObjCProtocolDecl::protocol_end(), clang::ASTContext::Selectors, and WarnUndefinedMethod().

Referenced by ImplMethodsVsClassMethods().

ExprResult Sema::checkPseudoObjectAssignment ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opcode,
Expr LHS,
Expr RHS 
)
ExprResult Sema::checkPseudoObjectIncDec ( Scope S,
SourceLocation  OpLoc,
UnaryOperatorKind  Opcode,
Expr Op 
)
ExprResult Sema::checkPseudoObjectRValue ( Expr E)

Definition at line 725 of file SemaPseudoObject.cpp.

References clang::Expr::IgnoreParens().

Referenced by CheckPlaceholderExpr().

bool Sema::CheckPureMethod ( CXXMethodDecl Method,
SourceRange  InitRange 
)
bool Sema::CheckQualifiedMemberReference ( Expr BaseExpr,
QualType  BaseType,
const CXXScopeSpec SS,
const LookupResult R 
)
bool Sema::CheckRegparmAttr ( const AttributeList Attr,
unsigned &  numParams 
)
QualType Sema::CheckRemainderOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign = false 
)
void Sema::checkRetainCycles ( ObjCMessageExpr msg)
void Sema::checkRetainCycles ( Expr receiver,
Expr argument 
)

Check a property assign to see if it's likely to cause a retain cycle.

Definition at line 4750 of file SemaChecking.cpp.

References diagnoseRetainCycle(), findCapturingExpr(), and findRetainCycleOwner().

void Sema::CheckSelfReference ( Decl OrigDecl,
Expr E 
)

CheckSelfReference - Warns if OrigDecl is used in expression E.

Definition at line 5979 of file SemaDecl.cpp.

Referenced by TryConstructorInitialization().

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.

Parameters:
Sthe scope in which the shadowing name is being declared
Rthe lookup of the name

Definition at line 4139 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(), clang::DiagnosticsEngine::Ignored, clang::DeclContext::isFileContext(), and clang::DeclContext::isRecord().

void Sema::CheckShadow ( Scope S,
VarDecl D 
)

Check -Wshadow without the advantage of a previous lookup.

Definition at line 4214 of file SemaDecl.cpp.

References ForRedeclaration, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::DiagnosticsEngine::Ignored, and LookupOrdinaryName.

QualType Sema::CheckShiftOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  Opc,
bool  IsCompAssign = false 
)
Sema::AssignConvertType Sema::CheckSingleAssignmentConstraints ( QualType  LHSType,
ExprResult RHS,
bool  Diagnose = true 
)
bool Sema::CheckSpecializationInstantiationRedecl ( SourceLocation  NewLoc,
TemplateSpecializationKind  NewTSK,
NamedDecl PrevDecl,
TemplateSpecializationKind  PrevTSK,
SourceLocation  PrevPointOfInstantiation,
bool &  HasNoEffect 
)

Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect.

Parameters:
NewLocthe location of the new explicit specialization or instantiation.
NewTSKthe kind of the new explicit specialization or instantiation.
PrevDeclthe previous declaration of the entity.
PrevTSKthe kind of the old explicit specialization or instantiatin.
PrevPointOfInstantiationif valid, indicates where the previus declaration was instantiated (either implicitly or explicitly).
HasNoEffectwill be set to true to indicate that the new specialization or instantiation has no effect and should be ignored.
Returns:
true if there was an error that should prevent the introduction of the new declaration into the AST, false otherwise.

Definition at line 5395 of file SemaTemplate.cpp.

References clang::frontend::CPlusPlus0x, 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,
const 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.

Definition at line 41 of file SemaExceptionSpec.cpp.

References clang::SourceRange::getBegin(), PDiag(), and RequireCompleteType().

Referenced by GetFullTypeForDeclarator(), and clang::TemplateDeclInstantiator::InitFunctionInstantiation().

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

References clang::frontend::CPlusPlus, Diag(), DiagnoseCalleeStaticArrayParam(), clang::ParmVarDecl::getOriginalType(), clang::ConstantArrayType::getSize(), clang::ArrayType::getSizeModifier(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_NeverValueDependent, and clang::ArrayType::Static.

QualType Sema::CheckSubtractionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
QualType CompLHSTy = 0 
)
bool Sema::CheckTemplateArgument ( NamedDecl Param,
const 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.

Parameters:
ParamThe template parameter against which the argument will be checked.
ArgThe template argument.
TemplateThe template in which the template argument resides.
TemplateLocThe location of the template name for the template whose argument list we're matching.
RAngleLocThe location of the right angle bracket ('>') that closes the template argument list.
ArgumentPackIndexThe index into the argument pack where this argument will be placed. Only valid if the parameter is a parameter pack.
ConvertedThe checked, converted argument will be added to the end of this small vector.
CTAKDescribes how we arrived at this particular template argument: explicitly written, deduced, etc.
Returns:
true on error, false otherwise.

Definition at line 2671 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), clang::DependentScopeDeclRefExpr::Create(), clang::TemplateArgument::Declaration, Diag(), clang::TemplateArgument::Expression, 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::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TemplateArgument::Null, clang::TemplateArgumentList::OnStack, clang::TemplateArgument::Pack, Param, clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by ConvertDeducedTemplateArgument().

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

References Arg, Diag(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::DiagnosticsEngine::Ignored.

ExprResult Sema::CheckTemplateArgument ( NonTypeTemplateParmDecl Param,
QualType  InstantiatedParamType,
Expr Arg,
TemplateArgument Converted,
CheckTemplateArgumentKind  CTAK = CTAK_Specified 
)
bool Sema::CheckTemplateArgument ( TemplateTemplateParmDecl Param,
const TemplateArgumentLoc Arg 
)

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

References Diag(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateDecl::getTemplateParameters(), and clang::TemplateName::isDependent().

bool Sema::CheckTemplateArgumentList ( TemplateDecl Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo TemplateArgs,
bool  PartialTemplateArgs,
SmallVectorImpl< TemplateArgument > &  Converted,
bool *  ExpansionIntoFixedList = 0 
)

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.

Parameters:
TemplateThe template to which the template arguments are being provided.
TemplateLocThe location of the template name in the source.
TemplateArgsThe list of template arguments. If the template is a template template parameter, this function may extend the set of template arguments to also include substituted, defaulted template arguments.
PartialTemplateArgsTrue if the list of template arguments is intentionally partial, e.g., because we're checking just the initial set of template arguments.
ConvertedWill receive the converted, canonicalized template arguments.
ExpansionIntoFixedListIf non-NULL, will be set true to indicate when the template arguments contain a pack expansion that is being expanded into a fixed parameter list.
Returns:
True if an error occurred, false otherwise.

Definition at line 2898 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), Arg, clang::TemplateParameterList::begin(), clang::TemplateArgument::CreatePackCopy(), Diag(), diagnoseArityMismatch(), clang::TemplateParameterList::end(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TemplateParameterList::getSourceRange(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateDecl::getTemplateParameters(), clang::TypeSourceInfo::getType(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TemplateName::isNull(), clang::Decl::isTemplateParameterPack(), NumArgs, Param, clang::TemplateParameterList::size(), clang::TemplateArgumentListInfo::size(), SubstDefaultTemplateArgument(), and clang::ActionResult< PtrTy, CompressInvalid >::takeAs().

Referenced by FinishTemplateArgumentDeduction(), and clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization().

bool Sema::CheckTemplateArgumentPointerToMember ( Expr Arg,
TemplateArgument Converted 
)
bool Sema::CheckTemplateDeclScope ( Scope S,
TemplateParameterList TemplateParams 
)
QualType Sema::CheckTemplateIdType ( TemplateName  Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo TemplateArgs 
)
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.

Parameters:
NewParamsTemplate parameter list for a new template declaration. This template parameter list will be updated with any default arguments that are carried through from the previous template parameter list.
OldParamsIf provided, template parameter list from a previous declaration of the same template. Default template arguments will be merged from the old template parameter list to the new template parameter list.
TPCDescribes the context in which we are checking the given template parameter list.
Returns:
true if an error occurred, false otherwise.

Definition at line 1197 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), Diag(), DiagnoseDefaultTemplateArgument(), DiagnoseUnexpandedParameterPacks(), clang::TemplateParameterList::end(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::getDefaultArgumentInfo(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), and clang::TemplateTemplateParmDecl::setDefaultArgument().

Referenced by ActOnAliasDeclaration(), and clang::TemplateDeclInstantiator::VisitClassTemplateDecl().

bool Sema::CheckTemplateTypeArgument ( TemplateTypeParmDecl Param,
const TemplateArgumentLoc Arg,
SmallVectorImpl< TemplateArgument > &  Converted 
)
Sema::AssignConvertType Sema::CheckTransparentUnionArgumentConstraints ( QualType  ArgType,
ExprResult RHS 
)
void Sema::CheckTypedefForVariablyModifiedType ( Scope S,
TypedefNameDecl D 
)
QualType Sema::CheckTypenameType ( ElaboratedTypeKeyword  Keyword,
SourceLocation  KeywordLoc,
NestedNameSpecifierLoc  QualifierLoc,
const IdentifierInfo II,
SourceLocation  IILoc 
)
bool Sema::CheckUnaryExprOrTypeTraitOperand ( Expr E,
UnaryExprOrTypeTrait  ExprKind 
)

Check the constrains 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 2647 of file SemaExpr.cpp.

References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::UETT_SizeOf, and clang::UETT_VecStep.

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

References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), and clang::UETT_VecStep.

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

References clang::CK_NoOp, clang::ExprError(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Sema::AccessResult Sema::CheckUnresolvedLookupAccess ( UnresolvedLookupExpr E,
DeclAccessPair  FoundDecl 
)
Sema::AccessResult Sema::CheckUnresolvedMemberAccess ( UnresolvedMemberExpr E,
DeclAccessPair  Found 
)
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 4759 of file SemaChecking.cpp.

References clang::CK_ARCConsumeObject, Diag(), clang::QualType::getObjCLifetime(), clang::Stmt::getSourceRange(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.

void Sema::checkUnsafeExprAssigns ( SourceLocation  Loc,
Expr LHS,
Expr RHS 
)
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 3843 of file SemaDeclAttr.cpp.

References checkUnusedDeclAttributes(), 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,
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.

Returns true if the base is dependent or is one of the accumulated base classes.

Definition at line 6632 of file SemaDeclCXX.cpp.

References computeDeclContext(), CurContext, Diag(), clang::CXXRecordDecl::forallBases(), clang::SourceRange::getBegin(), getLangOptions(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::DeclContext::isRecord(), and RequireCompleteDeclContext().

Referenced by BuildUsingDeclaration(), and clang::TemplateDeclInstantiator::VisitUsingDecl().

bool Sema::CheckUsingDeclRedeclaration ( SourceLocation  UsingLoc,
bool  isTypeName,
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 6573 of file SemaDeclCXX.cpp.

References clang::LookupResult::begin(), Context, CurContext, Diag(), clang::LookupResult::end(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), and clang::DeclContext::isRecord().

Referenced by BuildUsingDeclaration(), and clang::TemplateDeclInstantiator::VisitUsingDecl().

bool Sema::CheckUsingShadowDecl ( UsingDecl Using,
NamedDecl Orig,
const LookupResult Previous 
)
bool Sema::CheckVariableDeclaration ( VarDecl NewVD,
LookupResult Previous 
)
bool Sema::CheckVecStepExpr ( Expr E)
bool Sema::CheckVectorCast ( SourceRange  R,
QualType  VectorTy,
QualType  Ty,
CastKind Kind 
)

Definition at line 4046 of file SemaExpr.cpp.

References clang::CK_BitCast, Diag(), and clang::SourceRange::getBegin().

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

References clang::VectorType::AltiVecVector, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::VectorType::getVectorKind(), clang::Expr::IgnoreParenImpCasts(), and clang::QualType::isNull().

QualType Sema::CheckVectorLogicalOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc 
)
QualType Sema::CheckVectorOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign 
)
Sema::NameClassification Sema::ClassifyName ( Scope S,
CXXScopeSpec SS,
IdentifierInfo *&  Name,
SourceLocation  NameLoc,
const Token NextToken 
)

Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.

This routine is used by the parser to resolve identifiers and help direct parsing. When the identifier cannot be found, this routine will attempt to correct the typo and classify based on the resulting name.

Parameters:
SThe scope in which we're performing name lookup.
SSThe nested-name-specifier that precedes the name.
NameThe identifier. If typo correction finds an alternative name, this pointer parameter will be updated accordingly.
NameLocThe location of the identifier.
NextTokenThe token following the identifier. Used to help disambiguate the name.

Definition at line 473 of file SemaDecl.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::Ambiguous, clang::LookupResult::begin(), clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), 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::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::NamedDecl::getUnderlyingDecl(), clang::Token::is(), clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isResultTypeOrTemplate(), clang::CXXScopeSpec::isSet(), clang::OpaquePtr< QualType >::make(), clang::move(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::LookupResult::resolveKind(), S, clang::LookupResult::setLookupName(), clang::LookupResult::suppressDiagnostics(), clang::TTK_Class, clang::TTK_Enum, clang::TTK_Struct, clang::TTK_Union, and Unknown.

void Sema::CleanupVarDeclMarking ( )

Definition at line 9777 of file SemaExpr.cpp.

References MarkVarDeclODRUsed(), and MaybeODRUseExprs.

Referenced by PopExpressionEvaluationContext().

void Sema::CodeCompleteAfterIf ( Scope S)
void Sema::CodeCompleteAssignmentRHS ( Scope S,
Expr LHS 
)

Definition at line 3891 of file SemaCodeComplete.cpp.

void Sema::CodeCompleteCall ( Scope S,
Expr Fn,
Expr **  Args,
unsigned  NumArgs 
)
void Sema::CodeCompleteCase ( Scope S)
void Sema::CodeCompleteConstructorInitializer ( Decl Constructor,
CXXCtorInitializer **  Initializers,
unsigned  NumInitializers 
)
void Sema::CodeCompleteDeclSpec ( Scope S,
DeclSpec DS,
bool  AllowNonIdentifiers,
bool  AllowNestedNameSpecifiers 
)
void Sema::CodeCompleteExpression ( Scope S,
const CodeCompleteExpressionData Data 
)
void Sema::CodeCompleteInitializer ( Scope S,
Decl D 
)

Definition at line 3810 of file SemaCodeComplete.cpp.

References clang::ValueDecl::getType().

void Sema::CodeCompleteInPreprocessorConditionalExclusion ( Scope S)
void Sema::CodeCompleteMemberReferenceExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
bool  IsArrow 
)
void Sema::CodeCompleteModuleImport ( SourceLocation  ImportLoc,
ModuleIdPath  Path 
)
void Sema::CodeCompleteNamespaceAliasDecl ( Scope S)
void Sema::CodeCompleteNamespaceDecl ( Scope S)
void Sema::CodeCompleteNaturalLanguage ( )
void Sema::CodeCompleteObjCAtDirective ( Scope S)
void Sema::CodeCompleteObjCAtExpression ( Scope S)
void Sema::CodeCompleteObjCAtStatement ( Scope S)
void Sema::CodeCompleteObjCAtVisibility ( Scope S)
void Sema::CodeCompleteObjCClassMessage ( Scope S,
ParsedType  Receiver,
IdentifierInfo **  SelIdents,
unsigned  NumSelIdents,
bool  AtArgumentExpression,
bool  IsSuper = false 
)
void Sema::CodeCompleteObjCForCollection ( Scope S,
DeclGroupPtrTy  IterationVar 
)
void Sema::CodeCompleteObjCImplementationCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCImplementationDecl ( Scope S)
void Sema::CodeCompleteObjCInstanceMessage ( Scope S,
Expr Receiver,
IdentifierInfo **  SelIdents,
unsigned  NumSelIdents,
bool  AtArgumentExpression,
ObjCInterfaceDecl Super = 0 
)
void Sema::CodeCompleteObjCInterfaceCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCInterfaceDecl ( Scope S)
void Sema::CodeCompleteObjCMessageReceiver ( Scope S)
void Sema::CodeCompleteObjCMethodDecl ( Scope S,
bool  IsInstanceMethod,
ParsedType  ReturnType 
)
void Sema::CodeCompleteObjCMethodDeclSelector ( Scope S,
bool  IsInstanceMethod,
bool  AtParameterName,
ParsedType  ReturnType,
IdentifierInfo **  SelIdents,
unsigned  NumSelIdents 
)
void Sema::CodeCompleteObjCPassingType ( Scope S,
ObjCDeclSpec DS,
bool  IsParameter 
)
void Sema::CodeCompleteObjCPropertyDefinition ( Scope S)
void Sema::CodeCompleteObjCPropertyFlags ( Scope S,
ObjCDeclSpec ODS 
)
void Sema::CodeCompleteObjCPropertyGetter ( Scope S)
void Sema::CodeCompleteObjCPropertySetter ( Scope S)
void Sema::CodeCompleteObjCPropertySynthesizeIvar ( Scope S,
IdentifierInfo PropertyName 
)
void Sema::CodeCompleteObjCProtocolDecl ( Scope S)
void Sema::CodeCompleteObjCProtocolReferences ( IdentifierLocPair Protocols,
unsigned  NumProtocols 
)
void Sema::CodeCompleteObjCSelector ( Scope S,
IdentifierInfo **  SelIdents,
unsigned  NumSelIdents 
)
void Sema::CodeCompleteObjCSuperclass ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCSuperMessage ( Scope S,
SourceLocation  SuperLoc,
IdentifierInfo **  SelIdents,
unsigned  NumSelIdents,
bool  AtArgumentExpression 
)
void clang::Sema::CodeCompleteOperatorName ( Scope S)
void Sema::CodeCompleteOrdinaryName ( Scope S,
ParserCompletionContext  CompletionContext 
)
void Sema::CodeCompletePostfixExpression ( Scope S,
ExprResult  LHS 
)
void Sema::CodeCompletePreprocessorDirective ( bool  InConditional)
void Sema::CodeCompletePreprocessorExpression ( )
void Sema::CodeCompletePreprocessorMacroArgument ( Scope S,
IdentifierInfo Macro,
MacroInfo MacroInfo,
unsigned  Argument 
)

Definition at line 6982 of file SemaCodeComplete.cpp.

void Sema::CodeCompletePreprocessorMacroName ( bool  IsDefinition)
void Sema::CodeCompleteQualifiedId ( Scope S,
CXXScopeSpec SS,
bool  EnteringContext 
)
void Sema::CodeCompleteReturn ( Scope S)

Definition at line 3820 of file SemaCodeComplete.cpp.

References clang::QualType::isNull().

void Sema::CodeCompleteTag ( Scope S,
unsigned  TagSpec 
)
void Sema::CodeCompleteTypeQualifiers ( DeclSpec DS)
void Sema::CodeCompleteUsing ( Scope S)
void Sema::CodeCompleteUsingDirective ( Scope S)
void Sema::CollectImmediateProperties ( ObjCContainerDecl CDecl,
llvm::DenseMap< IdentifierInfo *, ObjCPropertyDecl * > &  PropMap,
llvm::DenseMap< IdentifierInfo *, ObjCPropertyDecl * > &  SuperPropMap 
)

CollectImmediateProperties - This routine collects all properties in the class and its conforming protocols; but not those it its super class.

Definition at line 1212 of file SemaObjCProperty.cpp.

References clang::NamedDecl::getIdentifier(), and P.

Referenced by DiagnoseUnimplementedProperties().

void Sema::CollectIvarsToConstructOrDestruct ( ObjCInterfaceDecl OI,
SmallVectorImpl< ObjCIvarDecl * > &  Ivars 
)

CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.

Definition at line 3013 of file SemaDeclObjC.cpp.

References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), Context, clang::ASTContext::getBaseElementType(), and clang::ObjCIvarDecl::getNextIvar().

Referenced by SetIvarInitializers().

void Sema::collectUnexpandedParameterPacks ( TemplateArgument  Arg,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given template argument.

Parameters:
ArgThe template argument that will be traversed to find unexpanded parameter packs.

Definition at line 313 of file SemaTemplateVariadic.cpp.

Referenced by DeduceTemplateArguments(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InstantiateMemInitializers(), SubstBaseSpecifiers(), and clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl().

void Sema::collectUnexpandedParameterPacks ( TemplateArgumentLoc  Arg,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given template argument.

Parameters:
ArgThe template argument that will be traversed to find unexpanded parameter packs.

Definition at line 319 of file SemaTemplateVariadic.cpp.

void Sema::collectUnexpandedParameterPacks ( QualType  T,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given type.

Parameters:
TThe type that will be traversed to find unexpanded parameter packs.

Definition at line 325 of file SemaTemplateVariadic.cpp.

void Sema::collectUnexpandedParameterPacks ( TypeLoc  TL,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given type.

Parameters:
TLThe type that will be traversed to find unexpanded parameter packs.

Definition at line 330 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.

Parameters:
SSThe nested-name-specifier that will be traversed to find unexpanded parameter packs.

Definition at line 335 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.

Parameters:
NameInfoThe name that will be traversed to find unexpanded parameter packs.

Definition at line 346 of file SemaTemplateVariadic.cpp.

void Sema::CompareMethodParamsInBaseAndSuper ( Decl ClassDecl,
ObjCMethodDecl Method,
bool  IsInstance 
)

CompareMethodParamsInBaseAndSuper - This routine compares methods with identical selector names in current and its super classes and issues a warning if any of their argument types are incompatible.

Definition at line 2103 of file SemaDeclObjC.cpp.

References Context, Diag(), clang::ASTContext::getCanonicalType(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::ASTContext::typesAreCompatible().

Referenced by ActOnAtEnd().

void Sema::CompareProperties ( Decl CDecl,
Decl ClassOrProtocol 
)

CompareProperties - This routine compares properties declared in 'ClassOrProtocol' objects (which can be a class or an inherited protocol with the list of properties for class/category 'CDecl'

Definition at line 1110 of file SemaObjCProperty.cpp.

References clang::ObjCInterfaceDecl::all_referenced_protocol_begin(), clang::ObjCInterfaceDecl::all_referenced_protocol_end(), MatchOneProtocolPropertiesInClass(), P, clang::ObjCProtocolDecl::protocol_begin(), clang::ObjCCategoryDecl::protocol_begin(), clang::ObjCProtocolDecl::protocol_end(), and clang::ObjCCategoryDecl::protocol_end().

Referenced by ActOnAtEnd().

void Sema::ComparePropertiesInBaseAndSuper ( ObjCInterfaceDecl IDecl)

ComparePropertiesInBaseAndSuper - This routine compares property declarations in base and its super class, if any, and issues diagnostics in a variety of inconsistent situations.

Definition at line 1047 of file SemaObjCProperty.cpp.

References DiagnosePropertyMismatch(), clang::NamedDecl::getIdentifier(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCContainerDecl::prop_begin(), clang::ObjCContainerDecl::prop_end(), and S.

Referenced by ActOnAtEnd().

Sema::ReferenceCompareResult clang::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 3628 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(), IsDerivedFrom(), PDiag(), Ref_Compatible, Ref_Compatible_With_Added_Qualification, Ref_Incompatible, Ref_Related, clang::Qualifiers::removeObjCLifetime(), and RequireCompleteType().

Referenced by clang::FindConversionForRefInit(), clang::TryListConversion(), TryLValueToRValueCast(), clang::TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().

bool Sema::CompleteConstructorCall ( CXXConstructorDecl Constructor,
MultiExprArg  ArgsPtr,
SourceLocation  Loc,
ASTOwningVector< Expr * > &  ConvertedArgs 
)

Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor.

Returns:
true if an error occurred, false otherwise.

Definition at line 9282 of file SemaDeclCXX.cpp.

References Args, GatherArgumentsForCall(), clang::ASTMultiPtr< PtrTy >::get(), clang::FunctionProtoType::getNumArgs(), clang::ValueDecl::getType(), clang::FunctionType::isVariadic(), NumArgs, clang::ASTMultiPtr< PtrTy >::size(), VariadicConstructor, and VariadicDoesNotApply.

Referenced by BuildCXXCastArgument(), CopyObject(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().

DeclContext * Sema::computeDeclContext ( QualType  T)
DeclContext * Sema::computeDeclContext ( const CXXScopeSpec SS,
bool  EnteringContext = false 
)

Compute the DeclContext that is associated with the given scope specifier.

Parameters:
SSthe C++ scope specifier as it appears in the source
EnteringContextwhen true, we will be entering the context of this scope specifier, so we can retrieve the declaration context of a class template or class template partial specialization even if it is not the current instantiation.
Returns:
the declaration context represented by the scope specifier SS, or NULL if the declaration context cannot be computed (e.g., because it is dependent and not the current instantiation).

Definition at line 81 of file SemaCXXScopeSpec.cpp.

References Context, clang::Type::getAs(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), 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::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

std::pair< Sema::ImplicitExceptionSpecification, bool > Sema::ComputeDefaultedCopyAssignmentExceptionSpecAndConst ( CXXRecordDecl ClassDecl)
std::pair< Sema::ImplicitExceptionSpecification, bool > Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst ( CXXRecordDecl ClassDecl)
Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedDefaultCtorExceptionSpec ( CXXRecordDecl ClassDecl)
Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedDtorExceptionSpec ( CXXRecordDecl ClassDecl)
Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedMoveAssignmentExceptionSpec ( CXXRecordDecl ClassDecl)
Sema::ImplicitExceptionSpecification Sema::ComputeDefaultedMoveCtorExceptionSpec ( CXXRecordDecl ClassDecl)
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 function has the same NRVO candidate, that candidate is the NRVO variable.

FIXME: Employ a smarter algorithm that accounts for multiple return statements and the lifetimes of the NRVO candidates. We should be able to find a maximal set of NRVO variables.

Definition at line 7175 of file SemaDecl.cpp.

References clang::ReturnStmt::getNRVOCandidate(), 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.,

   void f(T...);

To determine whether we have an (unnamed) function parameter pack or a variadic function.

Returns:
true if the declarator contains any unexpanded parameter packs, false otherwise.

Definition at line 636 of file SemaTemplateVariadic.cpp.

References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::Expr::containsUnexpandedParameterPack(), clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::Declarator::getTypeObject(), clang::DeclSpec::getTypeSpecType(), clang::QualType::isNull(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Mem, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::TST_atomic, clang::TST_auto, 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_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_half, clang::TST_int, 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, and clang::TST_wchar.

bool Sema::ConvertArgumentsForCall ( CallExpr Call,
Expr Fn,
FunctionDecl FDecl,
const FunctionProtoType Proto,
Expr **  Args,
unsigned  NumArgs,
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 3173 of file SemaExpr.cpp.

References Args, Diag(), clang::SourceRange::getBegin(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getLocStart(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumArgs(), clang::Stmt::getSourceRange(), clang::CallExpr::getSourceRange(), clang::Expr::getType(), clang::FunctionType::isVariadic(), NumArgs, clang::CallExpr::setArg(), and clang::CallExpr::setNumArgs().

Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup ( Decl Ptr,
Decl OwnedType = 0 
)

Definition at line 50 of file SemaDecl.cpp.

References clang::DeclGroupRef::Create().

void Sema::ConvertIntegerToTypeWarnOnOverflow ( llvm::APSInt &  Val,
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.

Definition at line 384 of file SemaStmt.cpp.

References Diag().

ExprResult clang::Sema::ConvertToIntegralOrEnumerationType ( SourceLocation  Loc,
Expr From,
const PartialDiagnostic NotIntDiag,
const PartialDiagnostic IncompleteDiag,
const PartialDiagnostic ExplicitConvDiag,
const PartialDiagnostic ExplicitConvNote,
const PartialDiagnostic AmbigDiag,
const PartialDiagnostic AmbigNote,
const PartialDiagnostic ConvDiag,
bool  AllowScopedEnumerations 
)

Attempt to convert the given expression to an integral or enumeration type.

This routine will attempt to convert an expression of class type to an integral or enumeration type, if that class type only has a single conversion to an integral or enumeration type.

Parameters:
LocThe source location of the construct that requires the conversion.
FromEThe expression we're converting from.
NotIntDiagThe diagnostic to be emitted if the expression does not have integral or enumeration type.
IncompleteDiagThe diagnostic to be emitted if the expression has incomplete class type.
ExplicitConvDiagThe diagnostic to be emitted if we're calling an explicit conversion function (because no implicit conversion functions were available). This is a recovery mode.
ExplicitConvNoteThe note to be emitted with ExplicitConvDiag, showing which conversion was picked.
AmbigDiagThe diagnostic to be emitted if there is more than one conversion function that could convert to integral or enumeration type.
AmbigNoteThe note to be emitted with AmbigDiag for each usable conversion function.
ConvDiagThe diagnostic to be emitted if we are calling a conversion function, which may be an extension in this case.
AllowScopedEnumerationsSpecifies whether conversions to scoped enumerations should be considered.
Returns:
The expression, converted to an integral or enumeration type if successful.

Definition at line 4813 of file SemaOverload.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), BuildCXXMemberCallExpr(), CheckMemberOperatorAccess(), CheckPlaceholderExpr(), clang::CK_UserDefinedConversion, Context, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateInsertion(), DefaultLvalueConversion(), Diag(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAsStringInternal(), clang::CXXConversionDecl::getConversionType(), clang::RecordType::getDecl(), clang::PartialDiagnostic::getDiagID(), clang::Expr::getExprLoc(), getLangOptions(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), clang::Preprocessor::getLocForEndOfToken(), clang::Stmt::getLocStart(), clang::QualType::getNonReferenceType(), getPrintingPolicy(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isSFINAEContext(), clang::Expr::isTypeDependent(), Owned(), PP, RequireCompleteType(), clang::UnresolvedSetImpl::size(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by VerifyIntegerConstantExpression().

TypoCorrection Sema::CorrectTypo ( const DeclarationNameInfo TypoName,
Sema::LookupNameKind  LookupKind,
Scope S,
CXXScopeSpec SS,
CorrectionCandidateCallback CCC,
DeclContext MemberContext = 0,
bool  EnteringContext = false,
const ObjCObjectPointerType OPT = 0 
)

Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.

Parameters:
TypoNamethe DeclarationNameInfo structure that contains the name that was present in the source code along with its location.
LookupKindthe name-lookup criteria used to search for the name.
Sthe scope in which name lookup occurs.
SSthe nested-name-specifier that precedes the name we're looking for, if present.
CCCA CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted.
MemberContextif non-NULL, the context in which to look for a member access expression.
EnteringContextwhether we're entering the context described by the nested-name-specifier SS.
OPTwhen non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of OPT.
Returns:
a TypoCorrection containing the corrected name if the typo along with information such as the NamedDecl where the corrected name was declared, and any additional NestedNameSpecifier needed to access it (C++ only). The TypoCorrection is empty if there is no correction.

Definition at line 3512 of file SemaLookup.cpp.

References clang::TypoCorrection::addCorrectionDecl(), AddKeywordsToConsumer(), clang::LookupResult::Ambiguous, clang::LookupResult::begin(), clang::LookupResult::clear(), clang::frontend::CPlusPlus, clang::LookupResult::end(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), clang::IdentifierInfo::getName(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::isInvalid(), clang::TypoCorrection::isKeyword(), clang::CorrectionCandidateCallback::IsObjCIvarLookup, clang::CXXScopeSpec::isSet(), LookupPotentialTypoResult(), LookupVisibleDecls(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, NULL, clang::ObjCObjectPointerType::qual_begin(), clang::ObjCObjectPointerType::qual_end(), clang::LookupResult::setLookupName(), clang::LookupResult::suppressDiagnostics(), clang::CorrectionCandidateCallback::ValidateCandidate(), clang::CorrectionCandidateCallback::WantObjCSuper, and clang::CorrectionCandidateCallback::WantRemainingKeywords.

Referenced by ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnStartClassInterface(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), DiagnoseInvalidRedeclaration(), FindProtocolDeclaration(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExprInRecord(), and TryNamespaceTypoCorrection().

ExprResult Sema::CreateBuiltinArraySubscriptExpr ( Expr Base,
SourceLocation  LLoc,
Expr Idx,
SourceLocation  RLoc 
)
ExprResult Sema::CreateBuiltinBinOp ( SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHSExpr,
Expr RHSExpr 
)
ExprResult Sema::CreateBuiltinUnaryOp ( SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr InputExpr 
)
ExprResult Sema::CreateGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
Expr ControllingExpr,
TypeSourceInfo **  Types,
Expr **  Exprs,
unsigned  NumAssocs 
)
ExprResult clang::Sema::CreateOverloadedArraySubscriptExpr ( SourceLocation  LLoc,
SourceLocation  RLoc,
Expr Base,
Expr Idx 
)
ExprResult clang::Sema::CreateOverloadedBinOp ( SourceLocation  OpLoc,
unsigned  OpcIn,
const UnresolvedSetImpl Fns,
Expr LHS,
Expr RHS 
)

Create a binary operation that may resolve to an overloaded operator.

Parameters:
OpLocThe location of the operator itself (e.g., '+').
OpcInThe BinaryOperator::Opcode that describes this operator.
FunctionsThe set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedBinOp().
LHSLeft-hand argument.
RHSRight-hand argument.

Definition at line 9672 of file SemaOverload.cpp.

References Args, clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::BO_Assign, clang::BO_Comma, clang::BO_OrAssign, clang::BO_PtrMemD, CandidateSet, clang::checkPlaceholderForOverload(), clang::CreateFunctionRefExpr(), Diag(), clang::DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getResultType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::IsOverloaded(), isRecordType(), clang::move(), clang::OverloadCandidateSet::NoteCandidates(), 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, clang::OverloadCandidateSet::size(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ActionResult< PtrTy, CompressInvalid >::takeAs(), clang::VK_LValue, and clang::VK_RValue.

Referenced by BuildOverloadedBinOp().

ExprResult clang::Sema::CreateOverloadedUnaryOp ( SourceLocation  OpLoc,
unsigned  OpcIn,
const UnresolvedSetImpl Fns,
Expr Input 
)

Create a unary operation that may resolve to an overloaded operator.

Parameters:
OpLocThe location of the operator itself (e.g., '*').
OpcInThe UnaryOperator::Opcode that describes this operator.
FunctionsThe set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedUnaryOp().
inputThe input argument.

Definition at line 9475 of file SemaOverload.cpp.

References Args, clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), CandidateSet, clang::checkPlaceholderForOverload(), clang::CreateFunctionRefExpr(), Diag(), clang::DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getResultType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::IsOverloaded(), clang::Expr::isTypeDependent(), clang::OverloadCandidateSet::NoteCandidates(), 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, clang::OverloadCandidateSet::size(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::UO_PostDec, clang::UO_PostInc, and clang::VK_RValue.

ParsedType Sema::CreateParsedType ( QualType  T,
TypeSourceInfo TInfo 
)
ObjCPropertyDecl * Sema::CreatePropertyDecl ( Scope S,
ObjCContainerDecl CDecl,
SourceLocation  AtLoc,
FieldDeclarator FD,
Selector  GetterSel,
Selector  SetterSel,
const bool  isAssign,
const bool  isReadWrite,
const unsigned  Attributes,
const unsigned  AttributesAsWritten,
TypeSourceInfo T,
tok::ObjCKeywordKind  MethodImplKind,
DeclContext lexicalDC = 0 
)

Definition at line 368 of file SemaObjCProperty.cpp.

References clang::DeclContext::addDecl(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), Context, clang::ObjCPropertyDecl::Create(), 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_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::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOptions(), clang::TypeSourceInfo::getType(), clang::ASTContext::Idents, 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_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 2786 of file SemaExpr.cpp.

References clang::ExprError(), clang::SourceRange::getEnd(), and clang::TypeSourceInfo::getType().

ExprResult Sema::CreateUnaryExprOrTypeTraitExpr ( Expr E,
SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind 
)
QualType Sema::CXXCheckConditionalOperands ( ExprResult Cond,
ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
ExprObjectKind OK,
SourceLocation  QuestionLoc 
)
void Sema::DeclApplyPragmaWeak ( Scope S,
NamedDecl ND,
WeakInfo W 
)

DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias.

Definition at line 3903 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), clang::WeakInfo::getAlias(), clang::NamedDecl::getIdentifier(), clang::WeakInfo::getLocation(), clang::IdentifierInfo::getName(), clang::WeakInfo::getUsed(), and clang::WeakInfo::setUsed().

Referenced by ActOnPragmaWeakAlias().

void Sema::DeclareGlobalAllocationFunction ( DeclarationName  Name,
QualType  Return,
QualType  Argument,
bool  AddMallocAttr = false 
)
void Sema::DeclareGlobalNewDelete ( )

DeclareGlobalNewDelete - Declare the global forms of operator new and delete. These are:

   // C++03:
   void* operator new(std::size_t) throw(std::bad_alloc);
   void* operator new[](std::size_t) throw(std::bad_alloc);
   void operator delete(void *) throw();
   void operator delete[](void *) throw();
   // C++0x:
   void* operator new(std::size_t);
   void* operator new[](std::size_t);
   void operator delete(void *);
   void operator delete[](void *);

C++0x operator delete is implicitly noexcept. Note that the placement and nothrow forms of new are *not* implicitly declared. Their use requires including <new>.

Definition at line 1617 of file SemaExprCXX.cpp.

References clang::frontend::CPlusPlus0x, clang::CXXRecordDecl::Create(), clang::Decl::setImplicit(), and clang::TTK_Class.

CXXMethodDecl * Sema::DeclareImplicitCopyAssignment ( CXXRecordDecl ClassDecl)
CXXConstructorDecl * Sema::DeclareImplicitCopyConstructor ( CXXRecordDecl ClassDecl)
CXXConstructorDecl * Sema::DeclareImplicitDefaultConstructor ( CXXRecordDecl ClassDecl)
CXXDestructorDecl * Sema::DeclareImplicitDestructor ( CXXRecordDecl ClassDecl)
CXXMethodDecl * Sema::DeclareImplicitMoveAssignment ( CXXRecordDecl ClassDecl)
CXXConstructorDecl * Sema::DeclareImplicitMoveConstructor ( CXXRecordDecl ClassDecl)
void Sema::DeclareInheritedConstructors ( CXXRecordDecl ClassDecl)

Declare all inherited constructors for the given class.

Parameters:
ClassDeclThe class declaration into which the inherited constructors will be added.

Definition at line 7178 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), Args, clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), Context, clang::ParmVarDecl::Create(), clang::CXXConstructorDecl::Create(), clang::CXXRecordDecl::ctor_begin(), clang::CXXRecordDecl::ctor_end(), clang::ASTContext::DeclarationNames, Diag(), clang::Decl::getAccess(), clang::FunctionProtoType::getArgType(), clang::ASTContext::getCanonicalType(), clang::Type::getCanonicalTypeUnqualified(), clang::DeclarationNameTable::getCXXConstructorName(), clang::RecordType::getDecl(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionType::getResultType(), getScopeForContext(), clang::ValueDecl::getType(), clang::TypeDecl::getTypeForDecl(), clang::FunctionDecl::isConstexpr(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::CXXConstructorDecl::isExplicit(), LookupSingleName(), LookupUsingDeclName, PushOnScopeChains(), clang::SC_None, clang::Decl::setAccess(), clang::CXXConstructorDecl::setInheritedConstructor(), clang::FunctionDecl::setParams(), and clang::FunctionProtoType::ExtProtoInfo::Variadic.

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 3852 of file SemaDeclAttr.cpp.

References clang::VarDecl::Create(), clang::FunctionDecl::Create(), Param, clang::SC_None, clang::DeclaratorDecl::setQualifierInfo(), and clang::ParmVarDecl::setScopeInfo().

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

References clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getKind(), 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 Type,
Expr *&  Init,
TypeSourceInfo *&  Result 
)

Deduce the type for an auto type-specifier (C++0x [dcl.spec.auto]p6)

Parameters:
Typethe type pattern using the auto type-specifier.
Initthe initializer for the variable whose type is to be deduced.
Resultif type deduction was successful, this will be set to the deduced type. This may still contain undeduced autos if the type is dependent. This will be set to null if deduction succeeded, but auto substitution failed; the appropriate diagnostic will already have been produced in that case.

Definition at line 3385 of file SemaTemplateDeduction.cpp.

References AdjustFunctionParmAndArgTypesForDeduction(), CheckOriginalCallArgDeduction(), clang::TemplateTypeParmDecl::Create(), DeduceTemplateArgumentsByTypeMatch(), clang::Expr::getExprLoc(), clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::TypeDecl::getTypeForDecl(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by AddCXXDirectInitializerToDecl().

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( ClassTemplatePartialSpecializationDecl Partial,
const TemplateArgumentList TemplateArgs,
sema::TemplateDeductionInfo Info 
)
Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
Expr **  Args,
unsigned  NumArgs,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info 
)

Perform template argument deduction from a function call (C++ [temp.deduct.call]).

Parameters:
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgumentsthe explicit template arguments provided for this call.
Argsthe function call arguments
NumArgsthe number of arguments in Args
Namethe name of the function being called. This is only significant when the function template is a conversion function template, in which case this routine will also perform template argument deduction based on the function to which
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
Returns:
the result of template argument deduction.

Definition at line 2898 of file SemaTemplateDeduction.cpp.

References AdjustFunctionParmAndArgTypesForDeduction(), Arg, DeduceTemplateArgumentsByTypeMatch(), FinishArgumentPackDeduction(), FinishTemplateArgumentDeduction(), getDepthAndIndex(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::PackExpansionType::getPattern(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::Expr::getType(), clang::ValueDecl::getType(), hasDeducibleTemplateParameters(), Index, clang::TemplateArgument::isNull(), clang::FunctionProtoType::isTemplateVariadic(), clang::FunctionType::isVariadic(), NumArgs, PrepareArgumentPackDeduction(), and clang::TemplateParameterList::size().

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
QualType  ArgFunctionType,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info 
)

Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.

Parameters:
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgumentsthe explicitly-specified template arguments.
ArgFunctionTypethe function type that will be used as the "argument" type (A) when performing template argument deduction from the function template's function type. This type may be NULL, if there is no argument type to compare against, in C++0x [temp.arg.explicit]p3.
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
Returns:
the result of template argument deduction.

Definition at line 3154 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::TemplateParameterList::size(), clang::TDF_TopLevelParameterTypeList, and Unevaluated.

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
QualType  ToType,
CXXConversionDecl *&  Specialization,
sema::TemplateDeductionInfo Info 
)
Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info 
)

Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).

Parameters:
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgumentsthe explicitly-specified template arguments.
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
Returns:
the result of template argument deduction.

Definition at line 3332 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments().

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 are promoted to double. All other argument types are converted by UsualUnaryConversions().

Definition at line 462 of file SemaExpr.cpp.

References clang::CK_FloatingCast, clang::frontend::CPlusPlus, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::InitializedEntity::InitializeTemporary(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

Referenced by CheckMessageArgumentTypes().

ExprResult Sema::DefaultFunctionArrayConversion ( Expr E)
ExprResult Sema::DefaultFunctionArrayLvalueConversion ( Expr E)
ExprResult Sema::DefaultLvalueConversion ( Expr E)
void Sema::DefaultSynthesizeProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCInterfaceDecl IDecl 
)
void Sema::DefaultSynthesizeProperties ( Scope S,
Decl D 
)
ExprResult Sema::DefaultVariadicArgumentPromotion ( Expr E,
VariadicCallType  CT,
FunctionDecl FDecl 
)
void Sema::DefineImplicitCopyAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared copy assignment operator.

Definition at line 7896 of file SemaDeclCXX.cpp.

References ActOnCallExpr(), ActOnCompoundStmt(), ActOnCXXThis(), ActOnReturnStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), BuildDeclRefExpr(), BuildMemberReferenceExpr(), BuildSingleCopyAssign(), clang::CK_UncheckedDerivedToBase, Context, clang::IntegerLiteral::Create(), CreateBuiltinUnaryOp(), CXXCopyAssignment, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ExprError(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::ASTContext::getAsConstantArrayType(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), clang::ASTContext::getTagDeclType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::QualType::hasTrivialAssignment(), clang::ASTContext::Idents, ImpCastExprToType(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::FieldDecl::isUnnamedBitfield(), clang::QualType::isVolatileQualified(), LookupMemberName, LookupName(), LookupOrdinaryName, clang::move_arg(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::Decl::setUsed(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ActionResult< PtrTy, CompressInvalid >::takeAs(), TUScope, clang::UO_AddrOf, clang::UO_Deref, and clang::VK_LValue.

Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().

void Sema::DefineImplicitCopyConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)
void Sema::DefineImplicitDefaultConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)
void Sema::DefineImplicitDestructor ( SourceLocation  CurrentLocation,
CXXDestructorDecl Destructor 
)
void Sema::DefineImplicitMoveAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared move assignment operator.

Definition at line 8320 of file SemaDeclCXX.cpp.

References ActOnCallExpr(), ActOnCompoundStmt(), ActOnCXXThis(), ActOnReturnStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), BuildDeclRefExpr(), BuildMemberReferenceExpr(), BuildSingleCopyAssign(), CastForMoving(), clang::CK_UncheckedDerivedToBase, Context, clang::IntegerLiteral::Create(), CreateBuiltinUnaryOp(), CXXMoveAssignment, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ExprError(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::ASTContext::getAsConstantArrayType(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), clang::ASTContext::getTagDeclType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::QualType::hasTrivialAssignment(), clang::ASTContext::Idents, ImpCastExprToType(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Expr::isLValue(), clang::FunctionDecl::isOverloadedOperator(), clang::FieldDecl::isUnnamedBitfield(), clang::QualType::isVolatileQualified(), LookupMemberName, LookupName(), LookupOrdinaryName, clang::move_arg(), clang::OK_Ordinary, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::Decl::setUsed(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ActionResult< PtrTy, CompressInvalid >::takeAs(), TUScope, clang::UO_AddrOf, clang::UO_Deref, clang::VK_LValue, clang::VK_RValue, and clang::VK_XValue.

Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().

void Sema::DefineImplicitMoveConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)
bool Sema::DefineUsedVTables ( )
Sema::SemaDiagnosticBuilder Sema::Diag ( SourceLocation  Loc,
unsigned  DiagID 
)

Emit a diagnostic.

Definition at line 753 of file Sema.cpp.

References Diags, and clang::DiagnosticsEngine::Report().

Referenced by ActOnAliasDeclaration(), ActOnAtEnd(), ActOnClassPropertyRefExpr(), ActOnCompatiblityAlias(), ActOnConversionDeclarator(), ActOnCXXConditionDeclaration(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnNamespaceAliasDef(), ActOnObjCExceptionDecl(), ActOnPackExpansion(), ActOnParamDefaultArgument(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaUnused(), ActOnPragmaVisibility(), ActOnPropertyImplDecl(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStaticAssertDeclaration(), ActOnSuperMessage(), ActOnTemplatedFriendTag(), ActOnUsingDeclaration(), ActOnUsingDirective(), AddCXXDirectInitializerToDecl(), AtomicPropertySetterGetterRules(), AttachBaseSpecifiers(), BuildArrayType(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockPointerType(), BuildClassMessage(), BuildCXXNestedNameSpecifier(), BuildDelegatingInitializer(), BuildExceptionDeclaration(), BuildExtVectorType(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildMemberInitializer(), BuildMemberPointerType(), BuildMemInitializer(), BuildObjCBridgedCast(), BuildObjCExceptionDecl(), BuildPointerType(), BuildQualifiedType(), BuildReferenceType(), BuildUnaryTransformType(), BuildUsingDeclaration(), CheckAddressOfOperand(), CheckAlignOfExpr(), CheckAnonMemberRedeclaration(), checkARCPropertyDecl(), checkARCPropertyImpl(), checkArgCount(), checkArithmethicPointerOnNonFragileABI(), checkArithmeticNull(), CheckArrayDesignatorExpr(), CheckArrow(), CheckAsmLValue(), checkAttrArgsAreLockableObjs(), checkAttributeAtLeastNumArgs(), checkAttributeNumArgs(), CheckBaseSpecifier(), CheckBooleanCondition(), CheckBuiltinAnnotationString(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalConvertScalarsToVectors(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), CheckCXX98CompatAccessibleCopy(), CheckCXXDefaultArguments(), CheckDeclInExpr(), CheckDerivedToBaseConversion(), CheckDestructorDeclarator(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedCopyAssignment(), CheckExplicitlyDefaultedCopyConstructor(), CheckExplicitlyDefaultedDefaultConstructor(), CheckExplicitlyDefaultedDestructor(), CheckExplicitlyDefaultedMoveAssignment(), CheckExplicitlyDefaultedMoveConstructor(), CheckExtensionTraitOperandType(), CheckExtraCXXDefaultArguments(), CheckExtVectorComponent(), CheckFallThroughForBody(), CheckForDanglingReferenceOrPointer(), checkForLockableRecord(), CheckForModifiableLvalue(), CheckForwardProtocolDeclarationForCircularDependency(), CheckFriendTypeDecl(), checkIBOutletCommon(), CheckIfOverriddenFunctionIsMarkedFinal(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckInheritedConstructorUsingDecl(), checkInitMethod(), checkIsPointer(), CheckLiteralOperatorDeclaration(), CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckNonTypeClassTemplatePartialSpecializationArgs(), CheckObjCARCConversion(), CheckObjCDeclScope(), CheckObjCMethodOverride(), CheckObjCPropertyAttributes(), CheckObjCTraitOperandConstraints(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), CheckOverrideControl(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckParameterPacksForExpansion(), checkPointerIntegerMismatch(), CheckPoppedLabel(), CheckProtocolMethodDefs(), CheckPureMethod(), CheckRealImagOperand(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateSpecializationScope(), checkUndefinedInternals(), checkUnusedDeclAttributes(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CheckVecStepTraitOperandType(), CompareMethodParamsInBaseAndSuper(), ConvertDeclSpecToType(), convertPointersToCompositeType(), ConvertToIntegralOrEnumerationType(), CopyObject(), CreateNewFunctionDecl(), CreatePropertyDecl(), DeclareInheritedConstructors(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineUsedVTables(), DelegatingCycleHelper(), Diag(), clang::InitializationSequence::Diagnose(), DiagnoseAbstractType(), DiagnoseAccessPath(), diagnoseAddressOfInvalidType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), diagnoseArityMismatch(), DiagnoseAssignmentAsCondition(), DiagnoseAssignmentResult(), DiagnoseBadAccess(), diagnoseBadCast(), DiagnoseBadShiftValues(), diagnoseBadTypeAttribute(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseBitwisePrecedence(), DiagnoseCalleeStaticArrayParam(), DiagnoseClassExtensionDupMethods(), DiagnoseConditionalPrecedence(), DiagnoseDefaultTemplateArgument(), diagnoseDistinctPointerComparison(), DiagnoseDuplicateIvars(), DiagnoseEqualityWithExtraParens(), diagnoseFunctionPointerToVoidComparison(), DiagnoseHiddenVirtualMethods(), DiagnoseIgnoredQualifiers(), DiagnoseIndirectJumpStmt(), DiagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), DiagnoseMultipleUserDefinedConversion(), DiagnoseNarrowingInInitList(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), DiagnoseOwningPropertyGetterSynthesis(), diagnosePointerIncompatibility(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnoseQualifiedMemberReference(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), DiagnoseTemplateParameterListArityMismatch(), clang::DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReference(), DiagnoseUnexpandedParameterPacks(), DiagnoseUnimplementedProperties(), DiagnoseUninitializedUse(), diagnoseUnknownAnyExpr(), DiagnoseUnusedComparison(), DiagnoseUseOfUnimplementedSelectors(), DiagRuntimeBehavior(), EmitDiagnosticForBitwiseAndInBitwiseOr(), EmitDiagnosticForLogicalAndInLogicalOr(), EmitRelatedResultTypeNote(), EvaluateArrayTypeTrait(), FinalizeVarWithDestructor(), FindConditionalOverload(), FindInstantiatedDecl(), FindProtocolDeclaration(), flushDiagnostics(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getObjCMessageKind(), handleAcquireOrderAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArcWeakrefUnavailableAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallConvAttr(), handleCFTransferAttr(), handleCleanupAttr(), handleCommonAttr(), handleConstantAttr(), handleConstAttr(), handleConstructorAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), HandleExprPropertyRefExpr(), handleExtVectorTypeAttr(), HandleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleIBAction(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMallocAttr(), HandleMBlazeInterruptHandlerAttr(), HandleMBlazeSaveVolatilesAttr(), handleModeAttr(), HandleMSP430InterruptAttr(), handleMsStructAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNothrowAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCExceptionAttr(), handleObjCGCTypeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresPropertyDefsAttr(), handleObjCReturnsInnerPointerAttr(), HandleOpenCLImageAccessAttribute(), handleOverloadableAttr(), handleOwnershipAttr(), handlePackedAttr(), HandlePropertyInClassExtension(), handleRegparmAttr(), handleReqdWorkGroupSize(), handleReturnsTwiceAttr(), handleSectionAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnavailableAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), inferARCLifetimeForPointee(), InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), InstantiateFunctionDefinition(), InstantiateStaticDataMemberDefinition(), IsMicrosoftUsingDeclarationAccessBug(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), LookupMemberExprInRecord(), LookupStdInitializerList(), MatchTemplateParameterKind(), MergeCXXFunctionDecl(), clang::OverloadCandidateSet::NoteCandidates(), noteOverloads(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformObjectArgumentInitialization(), PopFunctionScopeInfo(), PopPragmaVisibility(), ProcessInheritableDeclAttr(), ProcessPropertyDecl(), RequireCompleteDeclContext(), RequireCompleteType(), RequireLiteralType(), RequireNonAbstractType(), SearchForReturnInStmt(), SetDeclDefaulted(), SetDeclDeleted(), SubstParmVarDecl(), SuggestInitializationFixit(), SuggestParentheses(), TryCaptureVar(), tryDiagnoseOverloadedCast(), TryDiagnoseProtectedAccess(), TryNamespaceTypoCorrection(), TryReinterpretCast(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), tryToRecoverWithCall(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), WarnUndefinedMethod(), and clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().

Sema::SemaDiagnosticBuilder Sema::Diag ( SourceLocation  Loc,
const PartialDiagnostic PD 
)

Emit a partial diagnostic.

Definition at line 759 of file Sema.cpp.

References Diag(), clang::PartialDiagnostic::Emit(), and clang::PartialDiagnostic::getDiagID().

void Sema::DiagnoseAbstractType ( const CXXRecordDecl RD)
bool Sema::DiagnoseAmbiguousLookup ( LookupResult Result)

Produce a diagnostic describing the ambiguity that resulted from name lookup.

Parameters:
ResultThe ambiguous name lookup result.
NameThe name of the entity that name lookup was searching for.
NameLocThe location of the name within the source code.
LookupRangeA source range that provides more source-location information concerning the lookup itself. For example, this range might highlight a nested-name-specifier that precedes the name.
Returns:
true

Definition at line 1655 of file SemaLookup.cpp.

References clang::LookupResult::AmbiguousBaseSubobjects, clang::LookupResult::AmbiguousBaseSubobjectTypes, clang::LookupResult::AmbiguousReference, clang::LookupResult::AmbiguousTagHiding, clang::CXXBasePaths::begin(), clang::LookupResult::begin(), clang::CXXBasePath::Decls, Diag(), clang::LookupResult::Filter::done(), clang::CXXBasePaths::end(), clang::LookupResult::end(), clang::LookupResult::Filter::erase(), clang::CXXBasePaths::front(), clang::LookupResult::getAmbiguityKind(), clang::LookupResult::getBasePaths(), clang::LookupResult::getContextRange(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::isAmbiguous(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().

Referenced by ActOnSizeofParameterPackExpr().

void Sema::diagnoseARCUnbridgedCast ( Expr e)
void Sema::DiagnoseAssignmentAsCondition ( Expr E)
bool Sema::DiagnoseAssignmentResult ( AssignConvertType  ConvTy,
SourceLocation  Loc,
QualType  DstType,
QualType  SrcType,
Expr SrcExpr,
AssignmentAction  Action,
bool *  Complained = 0 
)
void Sema::DiagnoseAutoDeductionFailure ( VarDecl VDecl,
Expr Init 
)
AvailabilityResult Sema::DiagnoseAvailabilityOfDecl ( NamedDecl D,
SourceLocation  Loc,
const ObjCInterfaceDecl UnknownObjCClass 
)
void Sema::DiagnoseClassExtensionDupMethods ( ObjCCategoryDecl CAT,
ObjCInterfaceDecl ID 
)

DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.

Definition at line 687 of file SemaDeclObjC.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), MatchTwoMethodDeclarations(), clang::ObjCContainerDecl::meth_begin(), and clang::ObjCContainerDecl::meth_end().

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:

  • every static data member of class T;
  • every member function of class T
  • every member of class T that is itself a type;
    Returns:
    true if the declaration name violates these rules.

Definition at line 3214 of file SemaDecl.cpp.

References Diag(), clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().

Referenced by ActOnAliasDeclaration().

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

References Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPCK_CXX0X_nullptr, clang::Expr::NPCK_NotNull, and clang::Expr::NPCK_ZeroInteger.

Referenced by FindConditionalOverload().

ExprResult Sema::DiagnoseDtorReference ( SourceLocation  NameLoc,
Expr MemExpr 
)
void Sema::DiagnoseDuplicateIvars ( ObjCInterfaceDecl ID,
ObjCInterfaceDecl SID 
)

DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of . This becomes necesssary because class extension can add ivars to a class in random order which will not be known until class's is seen.

Definition at line 2142 of file SemaDeclObjC.cpp.

References Diag(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), clang::ObjCInterfaceDecl::ivar_begin(), clang::ObjCInterfaceDecl::ivar_end(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), and clang::Decl::setInvalidDecl().

Referenced by ActOnAtEnd().

bool Sema::DiagnoseEmptyLookup ( Scope S,
CXXScopeSpec SS,
LookupResult R,
CorrectionCandidateCallback CCC,
TemplateArgumentListInfo ExplicitTemplateArgs = 0,
Expr **  Args = 0,
unsigned  NumArgs = 0 
)

Diagnose an empty lookup.

Returns:
false if new lookup candidates were found

Definition at line 1257 of file SemaExpr.cpp.

References clang::LookupResult::addDecl(), clang::CXXScopeSpec::Adopt(), Args, clang::AS_none, clang::TypoCorrection::begin(), clang::LookupResult::begin(), clang::LookupResult::clear(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::CXXDependentScopeMemberExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, Diag(), clang::LookupResult::empty(), clang::TypoCorrection::end(), clang::LookupResult::end(), clang::TypoCorrection::getAsString(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDecl(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), 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::OverloadExpr::getQualifierLoc(), clang::TypoCorrection::getQuoted(), clang::OverloadExpr::getTemplateKeywordLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::CXXScopeSpec::isEmpty(), clang::CXXMethodDecl::isInstance(), clang::TypoCorrection::isOverloaded(), clang::DeclContext::isRecord(), clang::DeclAccessPair::make(), NumArgs, clang::OR_Success, S, clang::LookupResult::setLookupName(), clang::TemplateArgumentListInfo::size(), and clang::LookupResult::suppressDiagnostics().

Referenced by clang::BuildRecoveryCallExpr().

void Sema::DiagnoseEqualityWithExtraParens ( ParenExpr ParenE)
void Sema::DiagnoseFunctionSpecifiers ( Declarator D)
void Sema::DiagnoseHiddenVirtualMethods ( CXXRecordDecl DC,
CXXMethodDecl MD 
)
void Sema::DiagnoseInvalidJumps ( Stmt Body)

Definition at line 769 of file JumpDiagnostics.cpp.

bool clang::Sema::DiagnoseMultipleUserDefinedConversion ( Expr From,
QualType  ToType 
)
void Sema::DiagnoseNontrivial ( const RecordType T,
CXXSpecialMember  member 
)
void Sema::DiagnoseOwningPropertyGetterSynthesis ( const ObjCImplementationDecl D)
bool Sema::DiagnosePropertyAccessorMismatch ( ObjCPropertyDecl PD,
ObjCMethodDecl Getter,
SourceLocation  Loc 
)
void Sema::DiagnosePropertyMismatch ( ObjCPropertyDecl Property,
ObjCPropertyDecl SuperProperty,
const IdentifierInfo inheritedName 
)
void Sema::DiagnoseReturnInConstructorExceptionHandler ( CXXTryStmt TryBlock)
void Sema::DiagnoseSentinelCalls ( NamedDecl D,
SourceLocation  Loc,
Expr **  args,
unsigned  numArgs 
)

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

References clang::FixItHint::CreateInsertion(), Diag(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), clang::Type::getPointeeType(), clang::SourceLocation::isInvalid(), and clang::Expr::isValueDependent().

Referenced by CheckMessageArgumentTypes().

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

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::QualType::isPODType(), and Param.

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

References Diag(), clang::Decl::getLocation(), and clang::Decl::isTemplateParameter().

Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), and ActOnForwardClassDeclaration().

bool Sema::DiagnoseUnexpandedParameterPack ( SourceLocation  Loc,
TypeSourceInfo T,
UnexpandedParameterPackContext  UPPC 
)
bool Sema::DiagnoseUnexpandedParameterPack ( Expr E,
UnexpandedParameterPackContext  UPPC = UPPC_Expression 
)

If the given expression contains an unexpanded parameter pack, diagnose the error.

Parameters:
EThe expression that is being checked for unexpanded parameter packs.
Returns:
true if an error occurred, false otherwise.

Definition at line 215 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::Stmt::getLocStart().

bool Sema::DiagnoseUnexpandedParameterPack ( const CXXScopeSpec SS,
UnexpandedParameterPackContext  UPPC 
)

If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.

Parameters:
SSThe nested-name-specifier that is being checked for unexpanded parameter packs.
Returns:
true if an error occurred, false otherwise.

Definition at line 230 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 
)
bool Sema::DiagnoseUnexpandedParameterPack ( SourceLocation  Loc,
TemplateName  Template,
UnexpandedParameterPackContext  UPPC 
)

If the given template name contains an unexpanded parameter pack, diagnose the error.

Parameters:
LocThe location of the template name.
TemplateThe template name that is being checked for unexpanded parameter packs.
Returns:
true if an error occurred, false otherwise.

Definition at line 284 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.

Parameters:
ArgThe template argument that is being checked for unexpanded parameter packs.
Returns:
true if an error occurred, false otherwise.

Definition at line 299 of file SemaTemplateVariadic.cpp.

References clang::TemplateArgument::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgumentLoc::getLocation(), and clang::TemplateArgument::isNull().

void Sema::DiagnoseUnexpandedParameterPacks ( SourceLocation  Loc,
UnexpandedParameterPackContext  UPPC,
const SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Diagnose unexpanded parameter packs.

Diagnose all of the unexpanded parameter packs in the given vector.

Parameters:
LocThe location at which we should emit the diagnostic.
UPPCThe context in which we are diagnosing unexpanded parameter packs.
Unexpandedthe set of unexpanded parameter packs.

Definition at line 159 of file SemaTemplateVariadic.cpp.

References Diag().

Referenced by DiagnoseUnexpandedParameterPack().

void Sema::DiagnoseUnimplementedProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl CDecl,
const SelectorSet InsMap 
)
bool Sema::DiagnoseUnknownTemplateName ( const IdentifierInfo II,
SourceLocation  IILoc,
Scope S,
const CXXScopeSpec SS,
TemplateTy SuggestedTemplate,
TemplateNameKind SuggestedKind 
)
bool Sema::DiagnoseUnknownTypeName ( const IdentifierInfo II,
SourceLocation  IILoc,
Scope S,
CXXScopeSpec SS,
ParsedType SuggestedType 
)
void Sema::DiagnoseUnusedDecl ( const NamedDecl D)

DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).

Definition at line 1198 of file SemaDecl.cpp.

References Diag(), GenerateFixForUnusedDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and ShouldDiagnoseUnusedDecl().

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

void Sema::DiagnoseUnusedExprResult ( const Stmt S)

DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.

Definition at line 145 of file SemaStmt.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), DiagnoseUnusedComparison(), clang::Decl::getAttr(), clang::PointerTypeLoc::getStarLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and S.

Referenced by CheckCommaOperands().

void Sema::DiagnoseUnusedParameters ( ParmVarDecl *const *  Begin,
ParmVarDecl *const *  End 
)

Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.

Definition at line 6850 of file SemaDecl.cpp.

References Diag(), and Param.

bool Sema::DiagnoseUseOfDecl ( NamedDecl D,
SourceLocation  Loc,
const ObjCInterfaceDecl UnknownObjCClass = 0 
)

Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.

This routine diagnoses various problems with referencing declarations that can occur when using a declaration. For example, it might warn if a deprecated or unavailable declaration is being used, or produce an error (and return true) if a C++0x deleted function is being used.

Returns:
true if there was an error (this declaration cannot be referenced), false otherwise.

Definition at line 123 of file SemaExpr.cpp.

References clang::frontend::CPlusPlus, Diag(), clang::Decl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and clang::Decl::hasAttr().

Referenced by ActOnClassPropertyRefExpr(), ActOnStartCategoryImplementation(), ActOnStartClassInterface(), BuildClassMessage(), BuildInstanceMessage(), BuildTypeofExprType(), BuildUnaryTransformType(), ConvertDeclSpecToType(), FindProtocolDeclaration(), HandleExprPropertyRefExpr(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and SetDelegatingInitializer().

void Sema::DiagnoseUseOfUnimplementedSelectors ( )
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.

Parameters:
stmt- If stmt 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 10028 of file SemaExpr.cpp.

References ConstantEvaluated, Diag(), ExprEvalContexts, FunctionScopes, getCurFunctionOrMethodDecl(), PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, and Unevaluated.

Referenced by CheckForNullPointerDereference(), and DiagnoseBadShiftValues().

void Sema::DiscardCleanupsInEvaluationContext ( )
void Sema::EmitDeprecationWarning ( NamedDecl D,
StringRef  Message,
SourceLocation  Loc,
const ObjCInterfaceDecl UnknownObjCClass = 0 
)
void Sema::EmitRelatedResultTypeNote ( const Expr E)
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 822 of file SemaDecl.cpp.

References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::Scope::setEntity().

Referenced by ActOnCXXEnterDeclaratorScope(), and ActOnCXXEnterDeclInitializer().

void Sema::ExitDeclaratorContext ( Scope S)
QualType clang::Sema::ExtractUnqualifiedFunctionType ( QualType  PossiblyAFunctionType)
void Sema::FilterAcceptableTemplateNames ( LookupResult R)
void Sema::FilterLookupForScope ( LookupResult R,
DeclContext Ctx,
Scope S,
bool  ConsiderLinkage,
bool  ExplicitInstantiationOrSpecialization 
)

Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.

Definition at line 998 of file SemaDecl.cpp.

References clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), isOutOfScopePreviousDeclaration(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().

Referenced by ActOnAliasDeclaration().

void Sema::FinalizeDeclaration ( Decl ThisDecl)

FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.

Definition at line 6649 of file SemaDecl.cpp.

Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup ( Scope S,
const DeclSpec DS,
Decl **  Group,
unsigned  NumDecls 
)
void Sema::FinalizeVarWithDestructor ( VarDecl VD,
const RecordType DeclInitType 
)
bool Sema::FindAllocationFunctions ( SourceLocation  StartLoc,
SourceRange  Range,
bool  UseGlobal,
QualType  AllocType,
bool  IsArray,
Expr **  PlaceArgs,
unsigned  NumPlaceArgs,
FunctionDecl *&  OperatorNew,
FunctionDecl *&  OperatorDelete 
)
bool Sema::FindAllocationOverload ( SourceLocation  StartLoc,
SourceRange  Range,
DeclarationName  Name,
Expr **  Args,
unsigned  NumArgs,
DeclContext Ctx,
bool  AllowMissing,
FunctionDecl *&  Operator,
bool  Diagnose = true 
)
void Sema::FindAssociatedClassesAndNamespaces ( Expr **  Args,
unsigned  NumArgs,
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 2084 of file SemaLookup.cpp.

References addAssociatedClassesAndNamespaces(), Arg, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::Expr::IgnoreParens(), NumArgs, and clang::UO_AddrOf.

Referenced by clang::DiagnoseTwoPhaseLookup().

QualType Sema::FindCompositeObjCPointerType ( ExprResult LHS,
ExprResult RHS,
SourceLocation  QuestionLoc 
)
QualType Sema::FindCompositePointerType ( SourceLocation  Loc,
Expr *&  E1,
Expr *&  E2,
bool *  NonStandardCompositeType = 0 
)

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++0x 5.9p2. It converts both expressions to this type and returns it. It does not emit diagnostics.

Parameters:
LocThe 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 3918 of file SemaExprCXX.cpp.

References clang::CK_NullToMemberPointer, clang::CK_NullToPointer, clang::Qualifiers::Const, clang::frontend::CPlusPlus, clang::InitializationKind::CreateCopy(), clang::Qualifiers::fromCVRMask(), clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::MemberPointerType::getClass(), clang::QualType::getCVRQualifiers(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::Expr::getType(), clang::InitializedEntity::InitializeTemporary(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNull, clang::InitializationSequence::Perform(), and clang::ActionResult< PtrTy, CompressInvalid >::takeAs().

Referenced by convertPointersToCompositeType(), and FindCompositePointerType().

QualType clang::Sema::FindCompositePointerType ( SourceLocation  Loc,
ExprResult E1,
ExprResult E2,
bool *  NonStandardCompositeType = 0 
) [inline]
bool Sema::FindDeallocationFunction ( SourceLocation  StartLoc,
CXXRecordDecl RD,
DeclarationName  Name,
FunctionDecl *&  Operator,
bool  Diagnose = true 
)
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 291 of file SemaCXXScopeSpec.cpp.

References clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Identifier, isAcceptableNestedNameSpecifier(), LookupName(), and LookupNestedNameSpecifierName.

DeclContext * Sema::FindInstantiatedContext ( SourceLocation  Loc,
DeclContext DC,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Finds the instantiation of the given declaration context within the current instantiation.

Returns:
NULL if there was an error

Definition at line 3119 of file SemaTemplateInstantiateDecl.cpp.

References FindInstantiatedDecl().

Referenced by FindInstantiatedDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), 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:

 template<typename T>
 struct X {
   enum Kind {
     KnownValue = sizeof(T)
   };

   bool getKind() const { return KnownValue; }
 };

 template struct X<int>;

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). InstantiateCurrentDeclRef() performs this mapping from within the instantiation of X<int>.

Definition at line 3153 of file SemaTemplateInstantiateDecl.cpp.

References ArgumentPackSubstitutionIndex, Context, CurContext, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), Diags, clang::DeclContext::Equals(), FindInstantiatedContext(), clang::LocalInstantiationScope::findInstantiationOf(), findInstantiationOf(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::RecordType::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), 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::DeclContext::lookup(), RequireCompleteType(), and SubstDecl().

Referenced by FindInstantiatedContext(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), and clang::TemplateDeclInstantiator::VisitUsingDecl().

llvm::DenseMap< DeclarationName, NamedDecl * >::iterator Sema::findLocallyScopedExternalDecl ( DeclarationName  Name)

Look for a locally scoped external declaration by the given name.

Definition at line 3590 of file SemaDecl.cpp.

bool Sema::findMacroSpelling ( SourceLocation loc,
StringRef  name 
)

Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name. If one is found, returns true and sets the location to that expansion loc.

Definition at line 770 of file Sema.cpp.

References clang::SourceManager::getExpansionLoc(), getPreprocessor(), getSourceManager(), and clang::SourceLocation::isMacroID().

Referenced by diagnoseBadTypeAttribute().

void Sema::FindProtocolDeclaration ( bool  WarnOnDeclarations,
const IdentifierLocPair ProtocolId,
unsigned  NumProtocols,
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 647 of file SemaDeclObjC.cpp.

References CorrectTypo(), Diag(), DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::hasDefinition(), LookupObjCProtocolName, LookupProtocol(), NULL, and TUScope.

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

References S, and clang::StmtError().

Sema::TemplateDeductionResult Sema::FinishTemplateArgumentDeduction ( FunctionTemplateDecl FunctionTemplate,
SmallVectorImpl< DeducedTemplateArgument > &  Deduced,
unsigned  NumExplicitlySpecified,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info,
SmallVectorImpl< OriginalCallArg > const *  OriginalCallArgs = 0 
)

Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.

Parameters:
OriginalCallArgsIf non-NULL, the original call arguments against which the deduced argument types should be compared.

Definition at line 2448 of file SemaTemplateDeduction.cpp.

References clang::Sema::OriginalCallArg::ArgIdx, CheckOriginalCallArgDeduction(), ConvertDeducedTemplateArgument(), clang::TemplateArgumentList::CreateCopy(), clang::sema::TemplateDeductionInfo::diag_begin(), clang::sema::TemplateDeductionInfo::diag_end(), clang::TemplateArgumentLoc::getArgument(), clang::FunctionTemplateDecl::getCanonicalDecl(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::SourceRange::getEnd(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::TemplateDecl::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::TemplateArgument::isNull(), clang::Decl::isTemplateParameterPack(), makeTemplateParameter(), clang::TemplateArgumentList::OnStack, clang::sema::TemplateDeductionInfo::Param, Param, clang::sema::TemplateDeductionInfo::reset(), clang::Decl::setInvalidDecl(), clang::TemplateParameterList::size(), clang::sema::TemplateDeductionInfo::take(), TDK_SubstitutionFailure, and Unevaluated.

Expr * clang::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 10729 of file SemaOverload.cpp.

References clang::DeclAccessPair::getDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::Expr::getValueKind(), clang::OK_Ordinary, clang::DeclRefExpr::setHadMultipleCandidates(), clang::MemberExpr::setHadMultipleCandidates(), clang::UO_AddrOf, clang::VK_LValue, and clang::VK_RValue.

Referenced by clang::IsStandardConversion(), clang::InitializationSequence::Perform(), and TryStaticMemberPointerUpcast().

ExprResult clang::Sema::FixOverloadedFunctionReference ( ExprResult  E,
DeclAccessPair  FoundDecl,
FunctionDecl Fn 
)
void Sema::ForceDeclarationOfImplicitMembers ( CXXRecordDecl Class)
ExprResult Sema::forceUnknownAnyToType ( Expr E,
QualType  ToType 
)

Force an expression with unknown-type to an expression of the given type.

Definition at line 10551 of file SemaExpr.cpp.

Referenced by BuildInstanceMessage().

void Sema::FreePackedContext ( )

FreePackedContext - Deallocate and null out PackContext.

Definition at line 109 of file SemaAttr.cpp.

References PackContext.

Referenced by ~Sema().

void Sema::FreeVisContext ( )

FreeVisContext - Deallocate and null out VisContext.

Definition at line 334 of file SemaAttr.cpp.

References VisContext.

Referenced by PopPragmaVisibility(), and ~Sema().

bool clang::Sema::FunctionArgTypesAreEqual ( const FunctionProtoType OldType,
const FunctionProtoType NewType,
unsigned *  ArgPos = 0 
)

FunctionArgTypesAreEqual - This routine checks two function proto types for equality of their argument types. Caller has already checked that they have same number of arguments. This routine assumes that Objective-C pointer types which only differ in their protocol qualifiers are equal. If the parameters are different, ArgPos will have the the parameter index of the first different parameter.

Definition at line 2450 of file SemaOverload.cpp.

References clang::FunctionProtoType::arg_type_begin(), and clang::FunctionProtoType::arg_type_end().

bool Sema::GatherArgumentsForCall ( SourceLocation  CallLoc,
FunctionDecl FDecl,
const FunctionProtoType Proto,
unsigned  FirstProtoArg,
Expr **  Args,
unsigned  NumArgs,
SmallVector< Expr *, 8 > &  AllArgs,
VariadicCallType  CallType = VariadicDoesNotApply 
)
void Sema::GatherGlobalCodeCompletions ( CodeCompletionAllocator Allocator,
SmallVectorImpl< CodeCompletionResult > &  Results 
)
std::string Sema::getAmbiguousPathsDisplayString ( CXXBasePaths Paths)

Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.

This function builds a string that can be used in error messages to show the different paths that one can take through the inheritance hierarchy to go from the derived class to different subobjects of a base class. The result looks something like this:

 struct D -> struct B -> struct A
 struct D -> struct C -> struct A

Definition at line 1382 of file SemaDeclCXX.cpp.

References clang::CXXBasePaths::begin(), Context, clang::CXXBasePaths::end(), clang::QualType::getAsString(), clang::CXXBasePaths::getOrigin(), and clang::ASTContext::getTypeDeclType().

Referenced by CheckDerivedToBaseConversion(), and TryStaticMemberPointerUpcast().

ASTConsumer& clang::Sema::getASTConsumer ( ) const [inline]

Definition at line 681 of file Sema.h.

References Consumer.

Referenced by getASTMutationListener(), and clang::ParseAST().

ASTContext& clang::Sema::getASTContext ( ) const [inline]
ASTMutationListener * Sema::getASTMutationListener ( ) const
DeclContext * Sema::getContainingDC ( DeclContext DC)

Definition at line 778 of file SemaDecl.cpp.

References clang::DeclContext::getLexicalParent().

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

Parameters:
ReturnTypeIf 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.
EThe expression being returned from the function or block, or being thrown.
AllowFunctionParameterWhether 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).
Returns:
The NRVO candidate variable, if the return statement may use the NRVO, or NULL if there is no such candidate.

Definition at line 1665 of file SemaStmt.cpp.

References clang::DeclRefExpr::getDecl(), clang::Decl::getKind(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasLocalStorage(), clang::Expr::IgnoreParens(), clang::VarDecl::isExceptionVariable(), clang::QualType::isNull(), and clang::QualType::isVolatileQualified().

BlockScopeInfo * Sema::getCurBlock ( )

Retrieve the current block, if any.

Definition at line 867 of file Sema.cpp.

References FunctionScopes.

Referenced by AddKeywordsToConsumer(), AddOrdinaryNameResults(), and shouldBuildBlockDeclRef().

AvailabilityResult Sema::getCurContextAvailability ( ) const

Definition at line 10110 of file SemaDecl.cpp.

References clang::Decl::getAvailability(), and getCurLexicalContext().

sema::FunctionScopeInfo* clang::Sema::getCurFunction ( ) const [inline]
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 650 of file Sema.cpp.

References getFunctionLevelDeclContext().

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

References getFunctionLevelDeclContext().

Referenced by AddKeywordsToConsumer(), DiagRuntimeBehavior(), and handleInitPriorityAttr().

LambdaScopeInfo * Sema::getCurLambda ( )

Retrieve the current lambda expression, if any.

Definition at line 874 of file Sema.cpp.

References FunctionScopes.

Referenced by shouldAddConstQualToVarRef().

DeclContext* clang::Sema::getCurLexicalContext ( ) const [inline]

Definition at line 6421 of file Sema.h.

References CurContext, and OriginalLexicalContext.

Referenced by getCurContextAvailability().

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

References getFunctionLevelDeclContext().

Referenced by ActOnClassPropertyRefExpr(), ActOnStartOfObjCMethodDef(), AddClassMessageCompletions(), AddOrdinaryNameResults(), AddSuperSendCompletion(), BuildInstanceMessage(), CheckForModifiableLvalue(), findRetainCycleOwner(), getMessageSendResultType(), getObjCMessageKind(), and LookupPotentialTypoResult().

CXXRecordDecl * Sema::getCurrentInstantiationOf ( NestedNameSpecifier NNS)

If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).

Parameters:
NNSa dependent nested name specifier.

Definition at line 188 of file SemaCXXScopeSpec.cpp.

References clang::frontend::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), getLangOptions(), and clang::NestedNameSpecifier::isDependent().

Referenced by computeDeclContext(), and isUnknownSpecialization().

QualType Sema::getCurrentThisType ( )

Try to retrieve the type of the 'this' pointer.

Parameters:
CaptureIf true, capture 'this' in this context.
Returns:
The type of 'this', if possible. Otherwise, returns a NULL type.

Definition at line 654 of file SemaExprCXX.cpp.

References clang::Scope::getFlags(), S, and clang::Scope::ThisScope.

Referenced by AddOrdinaryNameResults().

Scope* clang::Sema::getCurScope ( ) const [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 6417 of file Sema.h.

Referenced by clang::Parser::getCurScope(), getScopeForContext(), and HandleExtVectorTypeAttr().

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

References clang::Decl::getAvailability(), and clang::FunctionDecl::isDeleted().

ParsedType Sema::getDestructorName ( SourceLocation  TildeLoc,
IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS,
ParsedType  ObjectType,
bool  EnteringContext 
)
ParsedType Sema::getDestructorType ( const DeclSpec DS,
ParsedType  ObjectType 
)
DiagnosticsEngine& clang::Sema::getDiagnostics ( ) const [inline]
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 4328 of file SemaType.cpp.

References Context, clang::ETK_None, clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::QualType::isNull(), and clang::CXXScopeSpec::isValid().

Referenced by ConvertDeclSpecToType().

SourceRange Sema::getExprRange ( Expr E) const

Definition at line 278 of file SemaExpr.cpp.

References clang::Stmt::getSourceRange().

const char * Sema::getFixItZeroInitializerForType ( QualType  T) const
FPOptions& clang::Sema::getFPOptions ( ) [inline]

Definition at line 674 of file Sema.h.

References FPFeatures.

DeclContext * Sema::getFunctionLevelDeclContext ( )
const LangOptions& clang::Sema::getLangOptions ( ) const [inline]

Definition at line 672 of file Sema.h.

References LangOpts.

Referenced by ActOnCXXNamedCast(), ActOnCXXNestedNameSpecifierDecltype(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEnumBody(), ActOnEnumConstant(), ActOnFriendFunctionDecl(), ActOnMethodDeclaration(), ActOnObjCExceptionDecl(), ActOnParamDefaultArgument(), ActOnPragmaFPContract(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnSizeofParameterPackExpr(), ActOnStartOfObjCMethodDef(), ActOnTypeName(), ActOnUsingDeclaration(), AddCXXDirectInitializerToDecl(), AddImplicitlyDeclaredMembersToClass(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverloadCandidate(), AtomicPropertySetterGetterRules(), BuildArrayType(), BuildClassMessage(), BuildCStyleCastExpr(), BuildCXXNestedNameSpecifier(), BuildExceptionDeclaration(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildMemInitializer(), BuildObjCExceptionDecl(), BuildPointerType(), BuildReferenceType(), CheckAddressOfOperand(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), CheckAsmLValue(), checkBlockPointerTypesForAssignment(), CheckBooleanCondition(), CheckCommaOperands(), checkCondition(), CheckConversionDeclarator(), CheckCXX98CompatAccessibleCopy(), CheckEffectiveAccess(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckForModifiableLvalue(), CheckFriendTypeDecl(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckMessageArgumentTypes(), CheckObjCMethodOverride(), CheckObjCPropertyAttributes(), CheckOverridingFunctionExceptionSpec(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateSpecializationScope(), CheckUsingDeclQualifier(), CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), clang::CompareStandardConversionSequences(), ConvertDeclSpecToType(), ConvertToIntegralOrEnumerationType(), CreateNewFunctionDecl(), CreatePropertyDecl(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveConstructor(), DeduceTemplateArgumentsByTypeMatch(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseAssignmentResult(), DiagnoseDefaultTemplateArgument(), DiagnoseInvalidRedeclaration(), DiagnoseNarrowingInInitList(), DiagnoseOwningPropertyGetterSynthesis(), diagnoseUncapturableValueReference(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), handleDelayedForbiddenType(), HandleDLLImportAttr(), handleFunctionTypeAttr(), handleInitPriorityAttr(), handleNSBridgedAttr(), handleNSReturnsRetainedAttr(), handleObjCOwnershipTypeAttr(), ImpCastExprToType(), clang::InitializationSequence::InitializationSequence(), isAtLeastAsSpecializedAs(), isCurrentClassName(), IsCXX98CompatWarning(), IsDerivedFrom(), isResultTypeOrTemplate(), clang::IsStandardConversion(), isStdInitializerList(), LookupBuiltin(), LookupDirect(), LookupMemberExprInRecord(), MakeObjCStringLiteralFixItHint(), mapCodeCompletionContext(), MatchTwoMethodDeclarations(), maybeExtendBlockObject(), MaybeProduceObjCObject(), MergeCXXFunctionDecl(), MergeVarDeclExceptionSpecs(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), RequireNonAbstractType(), Sema(), SetIvarInitializers(), clang::DeclSpec::SetStorageClassSpec(), TryCaptureVar(), TryDefaultInitialization(), clang::TryImplicitConversion(), TryListInitialization(), TryNamespaceTypoCorrection(), clang::TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryReinterpretCast(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), WarnConflictingTypedMethods(), and clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().

SourceLocation Sema::getLocationOfStringLiteralByte ( const StringLiteral SL,
unsigned  ByteNo 
) const

Definition at line 43 of file SemaChecking.cpp.

References clang::StringLiteral::getLocationOfByte().

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 262 of file SemaExprObjC.cpp.

References Context, getCurMethodDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::ObjCMethodDecl::getSendResultType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ObjCMethodDecl::isInstanceMethod(), and stripObjCInstanceType().

Referenced by CheckMessageArgumentTypes().

Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).

Parameters:
PS1the first class template partial specialization
PS2the second class template partial specialization
Returns:
the more specialized class template partial specialization. If neither partial specialization is more specialized, returns NULL.

Definition at line 3937 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), clang::Decl::getLocation(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::TemplateParameterList::size(), and clang::TDF_None.

Referenced by InstantiateClassTemplateSpecialization().

FunctionTemplateDecl * Sema::getMoreSpecializedTemplate ( FunctionTemplateDecl FT1,
FunctionTemplateDecl FT2,
SourceLocation  Loc,
TemplatePartialOrderingContext  TPOC,
unsigned  NumCallArguments 
)

Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).

Parameters:
FT1the first function template
FT2the second function template
TPOCthe context in which we are performing partial ordering of function templates.
NumCallArgumentsThe number of arguments in a call, used only when TPOC is TPOC_Call.
Returns:
the more specialized function template. If neither template is more specialized, returns NULL.

Definition at line 3706 of file SemaTemplateDeduction.cpp.

References ArgMoreQualified, isAtLeastAsSpecializedAs(), isVariadicFunctionTemplate(), NeitherMoreQualified, and ParamMoreQualified.

Referenced by clang::isBetterOverloadCandidate().

UnresolvedSetIterator Sema::getMostSpecialized ( UnresolvedSetIterator  SpecBegin,
UnresolvedSetIterator  SpecEnd,
TemplatePartialOrderingContext  TPOC,
unsigned  NumCallArguments,
SourceLocation  Loc,
const PartialDiagnostic NoneDiag,
const PartialDiagnostic AmbigDiag,
const PartialDiagnostic CandidateDiag,
bool  Complain = true,
QualType  TargetType = QualType() 
)

Retrieve the most specialized of the given function template specializations.

Parameters:
SpecBeginthe start iterator of the function template specializations that we will be comparing.
SpecEndthe end iterator of the function template specializations, paired with SpecBegin.
TPOCthe partial ordering context to use to compare the function template specializations.
NumCallArgumentsThe number of arguments in a call, used only when TPOC is TPOC_Call.
Locthe location where the ambiguity or no-specializations diagnostic should occur.
NoneDiagpartial diagnostic used to diagnose cases where there are no matching candidates.
AmbigDiagpartial diagnostic used to diagnose an ambiguity, if one occurs.
CandidateDiagpartial diagnostic used for each function template specialization that is a candidate in the ambiguous ordering. One parameter in this diagnostic should be unbound, which will correspond to the string describing the template arguments for the function template specialization.
Indexif non-NULL and the result of this function is non-nULL, receives the index corresponding to the resulting function template specialization.
Returns:
the most specialized function template specialization, if found. Otherwise, returns SpecEnd.
Todo:
FIXME: Consider passing in the "also-ran" candidates that failed template argument deduction.

Definition at line 3849 of file SemaTemplateDeduction.cpp.

References Diag(), clang::QualType::isNull(), and isSameTemplate().

DeclarationNameInfo Sema::GetNameForDeclarator ( Declarator D)

GetNameForDeclarator - Determine the full declaration name for the given Declarator.

Definition at line 2969 of file SemaDecl.cpp.

References clang::Declarator::getName().

Referenced by ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), and CreateNewFunctionDecl().

DeclarationNameInfo Sema::GetNameFromUnqualifiedId ( const UnqualifiedId Name)
Scope * Sema::getNonFieldDeclScope ( Scope S)

getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. This routine copes with the difference between C and C++ scoping rules in structs and unions. For example, the following code is well-formed in C but ill-formed in C++:

 struct S6 {
   enum { BAR } e;
 };

 void test_S6() {
   struct S6 a;
   a.e = BAR;
 }

For the declaration of BAR, this routine will return a different scope. The scope S will be the scope of the unnamed enumeration within S6. In C++, this routine will return the scope associated with S6, because the enumeration's scope is a transparent context but structures can contain non-field names. In C, this routine will return the translation unit scope, since the enumeration's scope is a transparent context and structures cannot contain non-field names.

Definition at line 1319 of file SemaDecl.cpp.

References clang::Scope::DeclScope, clang::Scope::getEntity(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::Scope::isClassScope(), and S.

Referenced by ActOnEnumConstant().

unsigned Sema::getNumArgumentsInExpansion ( QualType  T,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Determine the number of arguments in the given pack expansion type.

This routine already assumes that the pack expansion type can be expanded and that the number of arguments in the expansion is consistent across all of the unexpanded parameter packs in its pattern.

Definition at line 593 of file SemaTemplateVariadic.cpp.

References CurrentInstantiationScope, clang::LocalInstantiationScope::findInstantiationOf(), getDepthAndIndex(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), and Index.

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().

Sema::ObjCContainerKind Sema::getObjCContainerKind ( ) const
Decl * Sema::getObjCDeclContext ( ) const

Definition at line 10106 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.

Parameters:
IdThe name of the Objective-C class we're looking for. If typo-correction fixes this name, the Id will be updated to the fixed name.
IdLocThe location of the name in the translation unit.
TypoCorrectionIf true, this routine will attempt typo correction if there is no class with the given name.
Returns:
The declaration of the named Objective-C class, or NULL if the class could not be found.

Definition at line 1265 of file SemaDecl.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::NamedDecl::getNameAsString(), and NULL.

Referenced by ActOnClassPropertyRefExpr(), ActOnDefs(), ActOnStartCategoryImplementation(), and ActOnStartCategoryInterface().

Sema::ObjCMessageKind Sema::getObjCMessageKind ( Scope S,
IdentifierInfo Name,
SourceLocation  NameLoc,
bool  IsSuper,
bool  HasTrailingDot,
ParsedType ReceiverType 
)
OpenCLOptions& clang::Sema::getOpenCLOptions ( ) [inline]
NamespaceDecl * Sema::getOrCreateStdNamespace ( )

Retrieve the special "std" namespace, which may require us to implicitly define the namespace.

Definition at line 5788 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().

Preprocessor& clang::Sema::getPreprocessor ( ) const [inline]

Definition at line 679 of file Sema.h.

References PP.

Referenced by DiagnoseNarrowingInInitList(), findMacroSpelling(), and clang::ParseAST().

PrintingPolicy clang::Sema::getPrintingPolicy ( ) const [inline]
PrintingPolicy Sema::getPrintingPolicy ( const ASTContext Ctx,
const Preprocessor PP 
) [static]
Scope * Sema::getScopeForContext ( DeclContext Ctx)

Determines the active Scope associated with the given declaration context.

This routine maps a declaration context to the active Scope object that represents that declaration context in the parser. It is typically used from "scope-less" code (e.g., template instantiation, lazy creation of declarations) that injects a name for name-lookup purposes and, therefore, must update the Scope.

Returns:
The scope corresponding to the given declaraion context, or NULL if no such scope is open.

Definition at line 798 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(), DeclareInheritedConstructors(), and handleIBOutletCollection().

Scope * Sema::getScopeForDeclContext ( Scope S,
DeclContext DC 
) [static]

Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope. Otherwise return NULL.

Definition at line 981 of file SemaDecl.cpp.

References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::DeclContext::getPrimaryContext().

Referenced by ActOnFriendFunctionDecl().

QualType Sema::GetSignedVectorType ( QualType  V)
SourceManager& clang::Sema::getSourceManager ( ) const [inline]
Sema::CXXSpecialMember Sema::getSpecialMember ( const CXXMethodDecl MD)
CXXRecordDecl * Sema::getStdBadAlloc ( ) const
NamespaceDecl * Sema::getStdNamespace ( ) const
const TargetAttributesSema & Sema::getTargetAttributesSema ( ) const
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 6943 of file SemaTemplate.cpp.

References clang::TemplateArgumentList::data(), and clang::TemplateArgumentList::size().

Referenced by InstantiateClassTemplateSpecialization(), and PrintInstantiationStack().

std::string Sema::getTemplateArgumentBindingsText ( const TemplateParameterList Params,
const TemplateArgument Args,
unsigned  NumArgs 
)
MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs ( NamedDecl D,
const TemplateArgumentList Innermost = 0,
bool  RelativeToPrimary = false,
const FunctionDecl Pattern = 0 
)

Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.

Parameters:
Dthe declaration for which we are computing template instantiation arguments.
Innermostif non-NULL, the innermost template argument list.
RelativeToPrimarytrue if we should get the template arguments relative to the primary template, even when we're dealing with a specialization. This is only relevant for function template specializations.
PatternIf non-NULL, indicates the pattern from which we will be instantiating the definition of the given declaration, D. This is used to determine the proper set of template instantiation arguments for friend function template specializations.

Definition at line 51 of file SemaTemplateInstantiate.cpp.

References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::TemplateSpecializationType::getArgs(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::TemplateSpecializationType::getNumArgs(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isTranslationUnit(), and clang::TSK_ExplicitSpecialization.

Referenced by InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), InstantiateFunctionDefinition(), InstantiateStaticDataMemberDefinition(), RequireCompleteType(), and SubstDefaultTemplateArgument().

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

References Context, GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLangOptions(), clang::ASTContext::getNullTypeSourceInfo(), inferARCWriteback(), clang::QualType::isNull(), and clang::Declarator::isPrototypeContext().

Referenced by ActOnExceptionDeclarator(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnObjCExceptionDecl(), ActOnProperty(), and ActOnTypeName().

TypeSourceInfo * Sema::GetTypeForDeclaratorCast ( Declarator D,
QualType  FromTy 
)
QualType Sema::GetTypeFromParser ( ParsedType  Ty,
TypeSourceInfo **  TInfo = 0 
) [static]
ParsedType Sema::getTypeName ( IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS = 0,
bool  isClassName = false,
bool  HasTrailingDot = false,
ParsedType  ObjectTypePtr = ParsedType(),
bool  IsCtorOrDtorName = false,
bool  WantNontrivialTypeSourceInfo = false,
IdentifierInfo **  CorrectedII = 0 
)

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.

If name lookup results in an ambiguity, this routine will complain and then return NULL.

Definition at line 94 of file SemaDecl.cpp.

References clang::LookupResult::Ambiguous, clang::LookupResult::AmbiguousTagHiding, clang::LookupResult::begin(), clang::frontend::CPlusPlus, clang::FixItHint::CreateReplacement(), Diag(), 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::getAsString(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionDecl(), clang::TypoCorrection::getCorrectionSpecifier(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::TypoCorrection::getQuoted(), clang::SourceLocation::getRawEncoding(), clang::LookupResult::getResultKind(), clang::driver::types::getTypeName(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::OpaquePtr< QualType >::make(), clang::CXXScopeSpec::MakeTrivial(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), S, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::UnqualifiedId::setIdentifier(), clang::TypeSpecTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::LookupResult::suppressDiagnostics().

Referenced by handleIBOutletCollection().

TypeSourceInfo * Sema::GetTypeSourceInfoForDeclarator ( Declarator D,
QualType  T,
TypeSourceInfo ReturnTypeInfo 
)

Create and instantiate a TypeSourceInfo with type source information.

Parameters:
TQualType referring to the type as written in source code.
ReturnTypeInfoFor 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 3087 of file SemaType.cpp.

References Context, clang::ASTContext::CreateTypeSourceInfo(), fillAttributedTypeLoc(), 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().

Decl * Sema::HandleDeclarator ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists 
)

Definition at line 3227 of file SemaDecl.cpp.

References clang::CXXScopeSpec::clear(), clang::LookupResult::clear(), clang::FixItHint::CreateRemoval(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, clang::Scope::DeclScope, Diag(), clang::DeclContext::Encloses(), clang::NestedNameSpecifier::getAsType(), clang::SourceRange::getBegin(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::DeclarationName::getCXXNameType(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Scope::getFlags(), clang::LookupResult::getFoundDecl(), clang::Declarator::getIdentifierLoc(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::NestedNameSpecifierLoc::getPrefix(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLoc::getSourceRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclContext::isDependentContext(), clang::DeclSpec::isFriendSpecified(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isSingleTagDecl(), clang::Decl::isTemplateParameter(), clang::move(), RebuildDeclaratorInCurrentInstantiation(), RemoveUsingDecls(), clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::Declarator::setInvalidType(), clang::ASTMultiPtr< PtrTy >::size(), and clang::Scope::TemplateParamScope.

Referenced by ActOnCXXMemberDeclarator().

void Sema::HandleDelayedAccessCheck ( sema::DelayedDiagnostic DD,
Decl Ctx 
)
void Sema::HandleDelayedDeprecationCheck ( sema::DelayedDiagnostic DD,
Decl Ctx 
)
void Sema::HandleDependentAccessCheck ( const DependentDiagnostic DD,
const MultiLevelTemplateArgumentList TemplateArgs 
)
ExprResult Sema::HandleExprEvaluationContextForTypeof ( Expr E)

Definition at line 9330 of file SemaExpr.cpp.

References clang::Expr::getType(), and TranformToPotentiallyEvaluated().

ExprResult Sema::HandleExprPropertyRefExpr ( const ObjCObjectPointerType OPT,
Expr BaseExpr,
SourceLocation  OpLoc,
DeclarationName  MemberName,
SourceLocation  MemberLoc,
SourceLocation  SuperLoc,
QualType  SuperType,
bool  Super 
)
FieldDecl * Sema::HandleField ( Scope S,
RecordDecl Record,
SourceLocation  DeclStart,
Declarator D,
Expr BitWidth,
bool  HasInit,
AccessSpecifier  AS 
)
void clang::Sema::HandleFunctionTypeMismatch ( PartialDiagnostic PDiag,
QualType  FromType,
QualType  ToType 
)
Decl * Sema::HandlePropertyInClassExtension ( Scope S,
SourceLocation  AtLoc,
FieldDeclarator FD,
Selector  GetterSel,
Selector  SetterSel,
const bool  isAssign,
const bool  isReadWrite,
const unsigned  Attributes,
const unsigned  AttributesAsWritten,
bool *  isOverridingProperty,
TypeSourceInfo T,
tok::ObjCKeywordKind  MethodImplKind 
)

Definition at line 203 of file SemaObjCProperty.cpp.

References ActOnProperty(), Context, clang::ObjCPropertyDecl::Create(), CreatePropertyDecl(), CurContext, clang::FieldDeclarator::D, Diag(), clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCPropertyDecl::findPropertyDecl(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), clang::DeclarationName::getAsIdentifierInfo(), clang::ASTContext::getASTMutationListener(), clang::ObjCCategoryDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getFirstClassExtension(), clang::ObjCPropertyDecl::getGetterName(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::ObjCCategoryDecl::getNextClassExtension(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::hasSameType(), isObjCPointerConversion(), clang::ObjCPropertyDecl::makeitReadWriteAttribute(), makePropertyAttributesAsWritten(), clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_strong, ProcessDeclAttributes(), ProcessPropertyDecl(), clang::ObjCPropertyDecl::setGetterName(), clang::ObjCPropertyDecl::setPropertyAttributes(), clang::ObjCPropertyDecl::setPropertyAttributesAsWritten(), and clang::ObjCPropertyDecl::setSetterName().

Referenced by ActOnProperty().

bool Sema::hasAnyAcceptableTemplateNames ( LookupResult R)
bool Sema::hasAnyUnrecoverableErrorsInThisFunction ( ) const

Determine whether any errors occurred within this function/method/ block.

Definition at line 863 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::ErrorTrap, getCurFunction(), and clang::DiagnosticErrorTrap::hasUnrecoverableErrorOccurred().

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 6360 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::CUDAFunctionTarget Sema::IdentifyCUDATarget ( const FunctionDecl D)

IdentifyCUDATarget - Determine the CUDA compilation target for this function.

Definition at line 11080 of file SemaDeclCXX.cpp.

References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, clang::Decl::hasAttr(), and clang::Decl::isImplicit().

Referenced by CheckCUDATarget().

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

References clang::CK_ToVoid, clang::frontend::CPlusPlus, clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isRValue(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by CheckCommaOperands().

ExprResult Sema::ImpCastExprToType ( Expr E,
QualType  Ty,
CastKind  Kind,
ExprValueKind  VK = VK_RValue,
const CXXCastPath BasePath = 0,
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.

ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast. If there is already an implicit cast, merge into the existing one. The result is of the given category.

Definition at line 235 of file Sema.cpp.

References BasePathInvolvesVirtualBase(), CheckObjCARCConversion(), clang::CK_ArrayToPointerDecay, clang::CK_DerivedToBase, clang::CK_FunctionToPointerDecay, clang::CK_LValueToRValue, clang::CK_ToVoid, Context, clang::ImplicitCastExpr::Create(), clang::ASTContext::getCanonicalType(), getLangOptions(), clang::Stmt::getLocStart(), clang::Expr::getType(), clang::Expr::isRValue(), MarkVTableUsed(), Owned(), and clang::VK_RValue.

Referenced by BuildImplicitBaseInitializer(), BuildInstanceMessage(), checkConditionalBlockPointerCompatibility(), checkConditionalConvertScalarsToVectors(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), checkPointerIntegerMismatch(), convertPointersToCompositeType(), DefineImplicitCopyAssignment(), DefineImplicitMoveAssignment(), handleComplexFloatToComplexFloatConverstion(), handleComplexIntConversion(), handleFloatConversion(), handleIntegerConversion(), handleIntegerToComplexFloatConversion(), handleIntToFloatConversion(), handleOtherComplexFloatConversion(), clang::InitializationSequence::Perform(), PerformObjectArgumentInitialization(), and ShouldTryAgainWithRedefinitionType().

NamedDecl * Sema::ImplicitlyDefineFunction ( SourceLocation  Loc,
IdentifierInfo II,
Scope S 
)
void Sema::ImplMethodsVsClassMethods ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl IDecl,
bool  IncompleteImpl = false 
)
bool Sema::inferObjCARCLifetime ( ValueDecl decl)
void Sema::Initialize ( )
bool Sema::InitializeVarWithConstructor ( VarDecl VD,
CXXConstructorDecl Constructor,
MultiExprArg  Exprs,
bool  HadMultipleCandidates 
)
void Sema::InstantiateAttrs ( const MultiLevelTemplateArgumentList TemplateArgs,
const Decl Pattern,
Decl Inst,
LateInstantiatedAttrVec LateAttrs = 0,
LocalInstantiationScope OuterMostScope = 0 
)
bool Sema::InstantiateClass ( SourceLocation  PointOfInstantiation,
CXXRecordDecl Instantiation,
CXXRecordDecl Pattern,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateSpecializationKind  TSK,
bool  Complain = true 
)

Instantiate the definition of a class from a given pattern.

Parameters:
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis the declaration whose definition is being instantiated. This will be either a class template specialization or a member class of a class template specialization.
Patternis the pattern from which the instantiation occurs. This will be either the declaration of a class template or the declaration of a member class of a class template.
TemplateArgsThe template arguments to be substituted into the pattern.
TSKthe kind of implicit or explicit instantiation to perform.
Complainwhether to complain if the class cannot be instantiated due to the lack of a definition.
Returns:
true if an error occurred, false otherwise.

Definition at line 1698 of file SemaTemplateInstantiate.cpp.

References ActOnCXXInClassMemberInitializer(), ActOnFields(), ActOnFinishDelayedMemberInitializers(), CheckCompletedCXXClass(), Consumer, Context, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), clang::TemplateDeclInstantiator::delayed_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_partial_spec_end(), clang::LocalInstantiationScope::deleteScopes(), Diag(), clang::TemplateDeclInstantiator::disableLateAttributeInstantiation(), clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::CXXRecordDecl::getDefinition(), clang::FieldDecl::getInClassInitializer(), clang::TagDecl::getInnerLocStart(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::TagDecl::getRBraceLoc(), clang::TemplateDeclInstantiator::getStartingScope(), clang::TagDecl::getTagKind(), clang::ASTContext::getTypeDeclType(), clang::ASTConsumer::HandleTagDeclDefinition(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateInitializer(), clang::sema::instantiateTemplateAttribute(), clang::TagDecl::isBeingDefined(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::Decl::isInvalidDecl(), MarkVTableUsed(), P, clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::Decl::setInvalidDecl(), clang::TypeDecl::setLocStart(), clang::TagDecl::setRBraceLoc(), clang::TagDecl::setTagKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::TagDecl::startDefinition(), SubstBaseSpecifiers(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::DeclVisitor< ImplClass, RetTy >::Visit().

Referenced by InstantiateClassMembers(), InstantiateClassTemplateSpecialization(), and RequireCompleteType().

void Sema::InstantiateClassMembers ( SourceLocation  PointOfInstantiation,
CXXRecordDecl Instantiation,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateSpecializationKind  TSK 
)
bool Sema::InstantiateClassTemplateSpecialization ( SourceLocation  PointOfInstantiation,
ClassTemplateSpecializationDecl ClassTemplateSpec,
TemplateSpecializationKind  TSK,
bool  Complain = true 
)
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 2231 of file SemaTemplateInstantiate.cpp.

References getTemplateInstantiationArgs(), and InstantiateClassMembers().

void Sema::InstantiateFunctionDefinition ( SourceLocation  PointOfInstantiation,
FunctionDecl Function,
bool  Recursive = false,
bool  DefinitionRequired = false 
)

Instantiate the definition of the given function from its template.

Parameters:
PointOfInstantiationthe point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close.
Functionthe already-instantiated declaration of a function template specialization or member function of a class template specialization.
Recursiveif true, recursively instantiates any functions that are required by this instantiation.
DefinitionRequiredif true, then we are performing an explicit instantiation where the body of the function is required. Complain if there is no such body.

Definition at line 2432 of file SemaTemplateInstantiateDecl.cpp.

References ActOnFinishFunctionBody(), ActOnStartOfFunctionDef(), Consumer, DefineUsedVTables(), Diag(), clang::LocalInstantiationScope::Exit(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getPrimaryTemplate(), getTemplateInstantiationArgs(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::LocalInstantiationScope::InstantiatedLocalPackArg(), InstantiateMemInitializers(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isLateTemplateParsed(), clang::ParmVarDecl::isParameterPack(), LateTemplateParser, clang::LocalInstantiationScope::MakeInstantiatedLocalArgPack(), OpaqueParser, PendingInstantiations, PerformDependentDiagnostics(), PerformPendingInstantiations(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, SetDeclDefaulted(), clang::NamedDecl::setDeclName(), clang::DeclaratorDecl::setInnerLocStart(), clang::Decl::setInvalidDecl(), SubstStmt(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and VTableUses.

Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), and PerformPendingInstantiations().

bool Sema::InstantiateInitializer ( Expr Init,
const MultiLevelTemplateArgumentList TemplateArgs,
SourceLocation LParenLoc,
ASTOwningVector< Expr * > &  NewArgs,
SourceLocation RParenLoc 
)

Instantiate an initializer, breaking it into separate initialization arguments.

Parameters:
InitThe initializer to instantiate.
TemplateArgsTemplate arguments to be substituted into the initializer.
NewArgsWill be filled in with the instantiation arguments.
Returns:
true if an error occurred, false otherwise

Definition at line 266 of file SemaTemplateInstantiateDecl.cpp.

References clang::Preprocessor::getLocForEndOfToken(), clang::Stmt::getLocStart(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), PP, SubstExpr(), SubstExprs(), and clang::ActionResult< PtrTy, CompressInvalid >::takeAs().

Referenced by InstantiateClass(), InstantiateMemInitializers(), and clang::TemplateDeclInstantiator::VisitVarDecl().

void Sema::InstantiateMemInitializers ( CXXConstructorDecl New,
const CXXConstructorDecl Tmpl,
const MultiLevelTemplateArgumentList TemplateArgs 
)
void Sema::InstantiateStaticDataMemberDefinition ( SourceLocation  PointOfInstantiation,
VarDecl Var,
bool  Recursive = false,
bool  DefinitionRequired = false 
)

Instantiate the definition of the given variable from its template.

Parameters:
PointOfInstantiationthe point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close.
Varthe already-instantiated declaration of a static member variable of a class template specialization.
Recursiveif true, recursively instantiates any functions that are required by this instantiation.
DefinitionRequiredif true, then we are performing an explicit instantiation where an out-of-line definition of the member variable is required. Complain if there is no such definition.

Definition at line 2641 of file SemaTemplateInstantiateDecl.cpp.

References Consumer, DefineUsedVTables(), Diag(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getOutOfLineDefinition(), clang::MemberSpecializationInfo::getPointOfInstantiation(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticDataMember(), PendingInstantiations, PerformPendingInstantiations(), clang::VarDecl::setTemplateSpecializationKind(), SubstDecl(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and VTableUses.

Referenced by DoMarkVarDeclReferenced(), InstantiateClassMembers(), PerformPendingInstantiations(), and RequireCompleteExprType().

QualType Sema::InvalidOperands ( SourceLocation  Loc,
ExprResult LHS,
ExprResult RHS 
)

type checking binary operators (subroutines of CreateBuiltinBinOp).

the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).

Definition at line 5593 of file SemaExpr.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), and clang::Expr::getType().

bool Sema::isAcceptableNestedNameSpecifier ( NamedDecl SD)

Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.

Definition at line 259 of file SemaCXXScopeSpec.cpp.

References Context, clang::ASTContext::getLangOptions(), and clang::ASTContext::getTypeDeclType().

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.

Returns:
true if the new tag kind is acceptable, false otherwise.

Definition at line 7577 of file SemaDecl.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::TagDecl::getDefinition(), clang::Decl::getLocation(), clang::TagDecl::getTagKind(), isTemplate(), clang::Redeclarable< decl_type >::redecls_begin(), clang::Redeclarable< decl_type >::redecls_end(), clang::TTK_Class, and clang::TTK_Struct.

bool clang::Sema::IsBlockPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType 
)
bool clang::Sema::IsComplexPromotion ( QualType  FromType,
QualType  ToType 
)

Determine if a conversion is a complex promotion.

A complex promotion is defined as a complex -> complex conversion where the conversion between the underlying real types is a floating-point or integral promotion.

Definition at line 1755 of file SemaOverload.cpp.

References clang::ComplexType::getElementType().

Referenced by clang::IsStandardConversion().

bool Sema::isCurrentClassName ( const IdentifierInfo II,
Scope S,
const CXXScopeSpec SS = 0 
)

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

References computeDeclContext(), clang::frontend::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOptions(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

bool Sema::isDeclInScope ( NamedDecl *&  D,
DeclContext Ctx,
Scope S = 0,
bool  ExplicitInstantiationOrSpecialization = 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.

Parameters:
ExplicitInstantiationOrSpecializationWhen true, we are checking whether the declaration is in scope for the purposes of explicit template instantiation or specialization. The default is false.

Definition at line 975 of file SemaDecl.cpp.

Referenced by ActOnEnumConstant(), ActOnNamespaceAliasDef(), BuildUsingDeclaration(), and CheckAnonMemberRedeclaration().

bool Sema::isDependentScopeSpecifier ( const CXXScopeSpec SS)
bool Sema::IsDerivedFrom ( QualType  Derived,
QualType  Base 
)
bool Sema::IsDerivedFrom ( 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 1237 of file SemaDeclCXX.cpp.

References clang::frontend::CPlusPlus, GetClassForType(), getLangOptions(), and clang::CXXRecordDecl::isDerivedFrom().

bool Sema::isExprCallable ( const Expr E,
QualType ZeroArgCallReturnTy,
UnresolvedSetImpl OverloadSet 
)

Figure out if an expression could be turned into a call.

Use this when trying to recover from an error where the programmer may have written just the name of a function instead of actually calling it.

Parameters:
E- The expression to examine.
ZeroArgCallReturnTy- If the expression can be turned into a call with no arguments, this parameter is set to the type returned by such a call; otherwise, it is set to an empty QualType.
OverloadSet- If the expression is an overloaded function name, this parameter is populated with the decls of the various overloads.

Definition at line 919 of file Sema.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::ASTContext::BoundMemberTy, clang::UnresolvedSetImpl::clear(), Context, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::Expr::findBoundMemberType(), clang::FunctionType::getResultType(), clang::Expr::getType(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::Expr::IgnoreParens(), clang::QualType::isNull(), NULL, and clang::ASTContext::OverloadTy.

Referenced by tryToRecoverWithCall().

bool clang::Sema::IsFloatingPointPromotion ( QualType  FromType,
QualType  ToType 
)

IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6). If so, returns true and sets PromotedType to the promoted type.

An rvalue of type float can be converted to an rvalue of type double. (C++ 4.6p1).

Definition at line 1723 of file SemaOverload.cpp.

Referenced by clang::IsStandardConversion().

bool clang::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. Inside an unavailable function, unavailability is ignored.

Returns:
true if
  • FD is unavailable and current context is inside an available function, false otherwise.

Definition at line 985 of file SemaOverload.cpp.

References clang::Decl::isUnavailable().

Referenced by clang::OverloadCandidateSet::BestViableFunction(), and TryListConstructionSpecialCases().

bool Sema::isIncompatibleTypedef ( TypeDecl Old,
TypedefNameDecl New 
)
bool Sema::isInitListConstructor ( const CXXConstructorDecl Ctor)

Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.

Definition at line 5912 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ParmVarDecl::hasDefaultArg(), and isStdInitializerList().

Referenced by ResolveConstructorOverload().

bool Sema::IsInsideALocalClassWithinATemplateFunction ( )
bool clang::Sema::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). If so, returns true and sets PromotedType to the promoted type.

Definition at line 1590 of file SemaOverload.cpp.

References clang::Expr::getBitField(), clang::BuiltinType::getKind(), and clang::Stmt::getLocStart().

Referenced by clang::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 726 of file SemaCXXScopeSpec.cpp.

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

bool clang::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 2568 of file SemaOverload.cpp.

References clang::MemberPointerType::getClass(), clang::Stmt::getLocStart(), clang::MemberPointerType::getPointeeType(), clang::QualType::getTypePtr(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.

Referenced by clang::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:

 template<class T> class A {
 public:
   typedef int TYPE;
 };
 template<class T> class B : public A<T> {
 public:
   A<T>::TYPE a; // no typename required because A<T> is a base class.
 };

Definition at line 348 of file SemaDecl.cpp.

References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::NestedNameSpecifier::getAsType(), clang::CXXScopeSpec::getScopeRep(), and clang::Scope::isFunctionPrototypeScope().

bool Sema::isNonTypeNestedNameSpecifier ( Scope S,
CXXScopeSpec SS,
SourceLocation  IdLoc,
IdentifierInfo II,
ParsedType  ObjectType 
)
bool clang::Sema::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.

Definition at line 1197 of file SemaOverload.cpp.

References clang::CanQual< T >::getAs(), and clang::FunctionType::getExtInfo().

Referenced by CheckOriginalCallArgDeduction(), checkPointerTypesForAssignment(), and clang::IsStandardConversion().

bool clang::Sema::isObjCPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType,
bool &  IncompatibleObjC 
)
bool clang::Sema::isObjCWritebackConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType 
)

Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.

Parameters:
FromTypeThe type we're converting form.
ToTypeThe type we're converting to.
ConvertedTypeThe type that will be produced after applying this conversion.

Construct the type we're converting to, which is a pointer to __autoreleasing pointee.

Definition at line 2198 of file SemaOverload.cpp.

References clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::empty(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Qualifiers::setObjCLifetime(), and clang::Qualifiers::withoutObjCLifetime().

Referenced by clang::IsStandardConversion(), and tryObjCWritebackConversion().

bool clang::Sema::IsOverload ( FunctionDecl New,
FunctionDecl Old,
bool  IsForUsingDecl 
)
bool clang::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 1849 of file SemaOverload.cpp.

References clang::BuildSimilarlyQualifiedPointerType(), clang::frontend::CPlusPlus, clang::Stmt::getLocStart(), clang::PointerType::getPointeeType(), clang::isNullPointerConstantForConversion(), and clang::Type::isVoidType().

Referenced by clang::IsStandardConversion().

bool Sema::isPropertyReadonly ( ObjCPropertyDecl PDecl,
ObjCInterfaceDecl IDecl 
)
bool clang::Sema::IsQualificationConversion ( QualType  FromType,
QualType  ToType,
bool  CStyle,
bool &  ObjCLifetimeConversion 
)

IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToType is a qualification conversion (C++ 4.4).

Parameters:
ObjCLifetimeConversionOutput parameter that will be set to indicate when the qualification conversion involves a change in the Objective-C object lifetime.

Definition at line 2678 of file SemaOverload.cpp.

References clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::compatiblyIncludesObjCLifetime(), clang::QualType::getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasConst(), clang::Qualifiers::hasObjCGCAttr(), clang::Qualifiers::removeObjCGCAttr(), and clang::Qualifiers::removeObjCLifetime().

Referenced by CastsAwayConstness(), CheckOriginalCallArgDeduction(), CheckTemplateArgumentAddressOfObjectOrFunction(), and clang::IsStandardConversion().

bool Sema::isSelfExpr ( Expr RExpr)
llvm::Optional< TemplateDeductionInfo * > Sema::isSFINAEContext ( ) const
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.

Parameters:
Declthe declaration to check if it can be accessed
Classthe class/context from which to start the search
Returns:
true if the Decl is accessible from the Class, false otherwise.

Definition at line 1652 of file SemaAccess.cpp.

References AR_inaccessible, clang::AS_public, clang::declaresSameEntity(), clang::Decl::getAccess(), 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::isStdInitializerList ( QualType  Ty,
QualType Element 
)
bool Sema::IsStringLiteralToNonConstPointerConversion ( Expr From,
QualType  ToType 
)

Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively).

Definition at line 2103 of file SemaExprCXX.cpp.

References clang::StringLiteral::Ascii, clang::Type::getPointeeType(), clang::Expr::IgnoreParens(), clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.

Referenced by DiagnoseAssignmentResult(), and clang::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_class). This is used to diagnose cases in C where the user forgot to specify the tag.

Definition at line 316 of file SemaDecl.cpp.

References clang::LookupResult::Found, clang::LookupResult::getAsSingle(), clang::LookupResult::getResultKind(), clang::LookupResult::suppressDiagnostics(), clang::TST_class, clang::TST_enum, clang::TST_struct, clang::TST_union, clang::TST_unspecified, clang::TTK_Class, clang::TTK_Enum, 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 
)
bool Sema::isUnknownSpecialization ( const CXXScopeSpec SS)
NamedDecl * Sema::LazilyCreateBuiltin ( IdentifierInfo II,
unsigned  bid,
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 1332 of file SemaDecl.cpp.

References clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), Diag(), clang::ASTContext::GE_Missing_setjmp, clang::ASTContext::GE_Missing_stdio, clang::ASTContext::GE_Missing_ucontext, clang::ASTContext::GE_None, clang::DiagnosticsEngine::Ignored, 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 10771 of file SemaDeclCXX.cpp.

References ExternalSource, 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 398 of file Sema.cpp.

References ExternalSource, clang::ExternalSemaSource::ReadWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.

Referenced by ActOnEndOfTranslationUnit().

DeclContext::lookup_result Sema::LookupConstructors ( CXXRecordDecl Class)
CXXMethodDecl * Sema::LookupCopyingAssignment ( CXXRecordDecl Class,
unsigned  Quals,
bool  RValueThis,
unsigned  ThisQuals,
bool *  ConstParam = 0 
)
CXXConstructorDecl * Sema::LookupCopyingConstructor ( CXXRecordDecl Class,
unsigned  Quals,
bool *  ConstParam = 0 
)
CXXConstructorDecl * Sema::LookupDefaultConstructor ( CXXRecordDecl Class)

Look up the default constructor for the given class.

Definition at line 2426 of file SemaLookup.cpp.

References clang::Sema::SpecialMemberOverloadResult::getMethod().

Referenced by ComputeDefaultedDefaultCtorExceptionSpec(), and TryListConstructionSpecialCases().

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

Returns:
The destructor for this class.

Definition at line 2517 of file SemaLookup.cpp.

Referenced by ComputeDefaultedDtorExceptionSpec(), EvaluateUnaryTypeTrait(), FinalizeVarWithDestructor(), MarkBaseAndMemberDestructorsReferenced(), clang::InitializationSequence::Perform(), SetDelegatingInitializer(), SetIvarInitializers(), ShouldDeleteDestructor(), and ShouldDeleteSpecialMember().

ObjCMethodDecl* clang::Sema::LookupFactoryMethodInGlobalPool ( Selector  Sel,
SourceRange  R,
bool  receiverIdOrClass = false,
bool  warn = true 
) [inline]

LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.

Definition at line 2012 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 2086 of file SemaDeclObjC.cpp.

References MethodPool.

Referenced by DiagnoseUseOfUnimplementedSelectors().

ExprResult Sema::LookupInObjCMethod ( LookupResult Lookup,
Scope S,
IdentifierInfo II,
bool  AllowBuiltinCreation = false 
)
ObjCMethodDecl* clang::Sema::LookupInstanceMethodInGlobalPool ( Selector  Sel,
SourceRange  R,
bool  receiverIdOrClass = false,
bool  warn = true 
) [inline]

LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.

Definition at line 2003 of file Sema.h.

Referenced by BuildInstanceMessage(), and ParseObjCSelectorExpression().

ExprResult Sema::LookupMemberExpr ( LookupResult R,
ExprResult BaseExpr,
bool &  IsArrow,
SourceLocation  OpLoc,
CXXScopeSpec SS,
Decl ObjCImpDecl,
bool  HasTemplateArgs 
)

Look up the given member of the given non-type-dependent expression. This can return in one of two ways: If it returns a sentinel null-but-valid result, the caller will assume that lookup was performed and the results written into the provided structure. It will take over from there. Otherwise, the returned expression will be produced in place of an ordinary member expression.

The ObjCImpDecl bit is a gross hack that will need to be properly fixed for ObjC++.

Definition at line 1022 of file SemaExprMember.cpp.

References CheckExtVectorComponent(), clang::CK_BitCast, clang::CXXScopeSpec::clear(), clang::SelectorTable::constructSetterName(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::DeclarationName::CXXDestructorName, clang::declaresSameEntity(), Diag(), clang::ExprError(), FindGetterSetterNameDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ObjCIvarDecl::getAccessControl(), clang::SourceRange::getBegin(), clang::ObjCInterfaceDecl::getCategoryClassMethod(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::NamedDecl::getNameAsString(), clang::LookupResult::getNameLoc(), clang::ObjCObjectPointerType::getObjectType(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::ValueDecl::getType(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::CorrectionCandidateCallback::IsObjCIvarLookup, isPointerToRecordType(), isRecordType(), clang::IdentifierInfo::isStr(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::ObjCInterfaceDecl::lookupClassMethod(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), LookupMemberExprInRecord(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), NULL, clang::Qualifiers::OCL_Weak, clang::OK_ObjCProperty, clang::ObjCIvarDecl::Package, clang::ObjCIvarDecl::Private, clang::ObjCIvarDecl::Public, ShouldTryAgainWithRedefinitionType(), clang::UO_Deref, and clang::VK_LValue.

ObjCMethodDecl * Sema::LookupMethodInObjectType ( Selector  Sel,
QualType  Ty,
bool  IsInstance 
)
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 540 of file SemaExprObjC.cpp.

References clang::ObjCProtocolDecl::lookupMethod(), clang::ObjCObjectPointerType::qual_begin(), and clang::ObjCObjectPointerType::qual_end().

Referenced by BuildInstanceMessage(), and HandleExprPropertyRefExpr().

CXXMethodDecl * Sema::LookupMovingAssignment ( CXXRecordDecl Class,
bool  RValueThis,
unsigned  ThisQuals 
)
CXXConstructorDecl * Sema::LookupMovingConstructor ( CXXRecordDecl Class)

Look up the moving constructor for the given class.

Definition at line 2451 of file SemaLookup.cpp.

References clang::Sema::SpecialMemberOverloadResult::getMethod().

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

 int x;
 int f() {
   return x; // unqualified name look finds 'x' in the global scope
 }

Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.

Parameters:
SThe scope from which unqualified name lookup will begin. If the lookup criteria permits, name lookup may also search in the parent scopes.
NameThe name of the entity that we are searching for.
LocIf provided, the source location where we're performing name lookup. At present, this is only used to produce diagnostics when C library functions (like "malloc") are implicitly declared.
Returns:
The result of name lookup, which includes zero or more declarations and possibly additional information used to diagnose ambiguities.

Definition at line 1111 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::frontend::CPlusPlus, clang::Scope::DeclScope, clang::DeclContext::Equals(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::LookupResult::getIdentifierNamespace(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), getVisibleDecl(), clang::Scope::isDeclScope(), clang::LookupResult::isHiddenDeclarationVisible(), isNamespaceOrTranslationUnitScope(), LookupBuiltin(), LookupRedeclarationWithLinkage, and clang::LookupResult::resolveKind().

Referenced by ActOnAliasDeclaration(), ActOnMethodDeclaration(), ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildUsingDeclaration(), CheckAnonMemberRedeclaration(), DefineImplicitCopyAssignment(), DefineImplicitMoveAssignment(), FindFirstQualifierInScope(), getObjCMessageKind(), handleNSBridgedAttr(), isNonTypeNestedNameSpecifier(), and KnownName().

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 3026 of file SemaLookup.cpp.

References clang::LabelDecl::Create(), clang::Decl::getDeclContext(), clang::Scope::getFnParent(), and clang::SourceLocation::isValid().

void Sema::LookupOverloadedOperatorName ( OverloadedOperatorKind  Op,
Scope S,
QualType  T1,
QualType  T2,
UnresolvedSetImpl Functions 
)
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.

Parameters:
SThe scope from which unqualified name lookup will begin.
SSAn optional C++ scope-specifier, e.g., "::N::M".
EnteringContextIndicates whether we are going to enter the context of the scope-specifier SS (if present).
Returns:
True if any decls were found (but possibly ambiguous)

Definition at line 1607 of file SemaLookup.cpp.

References clang::CXXScopeSpec::getRange(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::LookupResult::setContextRange(), and clang::LookupResult::setNotFoundInCurrentInstantiation().

Referenced by ActOnNamespaceAliasDef(), ActOnPragmaUnused(), ActOnUsingDirective(), BuildMemInitializer(), and LookupPotentialTypoResult().

ObjCMethodDecl * Sema::LookupPrivateClassMethod ( Selector  Sel,
ObjCInterfaceDecl CDecl 
)
ObjCMethodDecl * Sema::LookupPrivateInstanceMethod ( Selector  Sel,
ObjCInterfaceDecl ClassDecl 
)
ObjCPropertyDecl * Sema::LookupPropertyDecl ( const ObjCContainerDecl CDecl,
IdentifierInfo II 
)

LookupPropertyDecl - Looks up a property in the current class and all its protocols.

Definition at line 1304 of file SemaObjCProperty.cpp.

References clang::NamedDecl::getIdentifier(), and P.

ObjCProtocolDecl * Sema::LookupProtocol ( IdentifierInfo II,
SourceLocation  IdLoc,
RedeclarationKind  Redecl = NotForRedeclaration 
)
bool Sema::LookupQualifiedName ( LookupResult R,
DeclContext LookupCtx,
bool  InUnqualifiedLookup = false 
)

Perform qualified name lookup into a given context.

Qualified name lookup (C++ [basic.lookup.qual]) is used to find names when the context of those names is explicit specified, e.g., "std::vector" or "x->member", or as part of unqualified name lookup.

Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.

Parameters:
Rcaptures both the lookup criteria and any lookup results found.
LookupCtxThe context in which qualified name lookup will search. If the lookup criteria permits, name lookup may also search in the parent contexts or (for C++ classes) base classes.
InUnqualifiedLookuptrue if this is qualified name lookup that occurs as part of unqualified name lookup.
Returns:
true if lookup succeeded, false if it failed.

Definition at line 1405 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::AS_none, clang::CXXBasePathElement::Base, clang::CXXBasePaths::begin(), clang::CXXBasePath::Decls, clang::CXXBasePaths::end(), clang::CXXRecordDecl::FindNestedNameSpecifierMember(), clang::CXXRecordDecl::FindOrdinaryMember(), clang::CXXRecordDecl::FindTagMember(), clang::CXXBasePaths::front(), clang::Decl::getAccess(), clang::DeclarationName::getAsOpaquePtr(), clang::QualType::getCanonicalType(), clang::CXXRecordDecl::getDefinition(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::CXXBaseSpecifier::getType(), clang::CXXRecordDecl::hasAnyDependentBases(), HasOnlyStaticMembers(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), clang::QualType::isNull(), LookupAnyMember(), LookupDirect(), clang::CXXRecordDecl::lookupInBases(), LookupQualifiedNameInUsingDirectives(), clang::CXXRecordDecl::MergeAccess(), clang::LookupResult::resolveKind(), clang::LookupResult::setAmbiguousBaseSubobjects(), clang::LookupResult::setAmbiguousBaseSubobjectTypes(), clang::LookupResult::setNamingClass(), clang::LookupResult::setNotFoundInCurrentInstantiation(), clang::CXXBasePaths::setOrigin(), and clang::CXXBasePathElement::SubobjectNumber.

Referenced by ActOnFriendFunctionDecl(), BuildCXXNestedNameSpecifier(), BuildSingleCopyAssign(), BuildUsingDeclaration(), DiagnoseInvalidRedeclaration(), clang::DiagnoseTwoPhaseLookup(), doesUsualArrayDeleteWantSize(), EvaluateUnaryTypeTrait(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), LookupPotentialTypoResult(), LookupStdInitializerList(), clang::TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

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 2175 of file SemaLookup.cpp.

References clang::LookupResult::getAsSingle().

Referenced by ActOnCompatiblityAlias(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), ActOnNamespaceAliasDef(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), ActOnStartClassImplementation(), ActOnStartClassInterface(), DeclareInheritedConstructors(), and handleCleanupAttr().

void Sema::LookupTemplateName ( LookupResult R,
Scope S,
CXXScopeSpec SS,
QualType  ObjectType,
bool  EnteringContext,
bool &  MemberOfUnknownSpecialization 
)
void Sema::LookupVisibleDecls ( Scope S,
LookupNameKind  Kind,
VisibleDeclConsumer Consumer,
bool  IncludeGlobalScope = true 
)
void Sema::LookupVisibleDecls ( DeclContext Ctx,
LookupNameKind  Kind,
VisibleDeclConsumer Consumer,
bool  IncludeGlobalScope = true 
)

Definition at line 3010 of file SemaLookup.cpp.

References LookupVisibleDecls().

FullExprArg clang::Sema::MakeFullExpr ( Expr Arg) [inline]

Definition at line 2060 of file Sema.h.

References ActOnFinishFullExpr().

Referenced by BuildSingleCopyAssign().

bool Sema::makeUnavailableInSystemHeader ( SourceLocation  loc,
StringRef  msg 
)

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

Perform marking for a reference to an aribitrary declaration. It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building an normal expression which refers to a variable.

Definition at line 9884 of file SemaExpr.cpp.

References MarkFunctionReferenced(), MarkVariableReferenced(), and clang::Decl::setReferenced().

Referenced by CheckTemplateArgumentAddressOfObjectOrFunction(), and MarkExprReferenced().

void Sema::MarkAsLateParsedTemplate ( FunctionDecl FD,
bool  Flag = true 
)

Definition at line 6981 of file SemaTemplate.cpp.

References clang::FunctionDecl::setLateTemplateParsed().

void Sema::MarkBaseAndMemberDestructorsReferenced ( SourceLocation  Loc,
CXXRecordDecl Record 
)
void Sema::MarkBlockDeclRefReferenced ( BlockDeclRefExpr E)

Perform reference-marking and odr-use handling for a BlockDeclRefExpr.

Definition at line 9866 of file SemaExpr.cpp.

References clang::BlockDeclRefExpr::getDecl(), clang::BlockDeclRefExpr::getLocation(), and MarkExprReferenced().

Referenced by BuildBlockDeclRefExpr().

void Sema::MarkDeclarationsReferencedInExpr ( Expr E)

Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".

Definition at line 10008 of file SemaExpr.cpp.

void Sema::MarkDeclarationsReferencedInType ( SourceLocation  Loc,
QualType  T 
)
void Sema::MarkDeclRefReferenced ( DeclRefExpr E)

Perform reference-marking and odr-use handling for a DeclRefExpr.

Definition at line 9871 of file SemaExpr.cpp.

References clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), and MarkExprReferenced().

Referenced by BuildImplicitBaseInitializer(), and BuildImplicitMemberInitializer().

void clang::Sema::MarkDeducedTemplateParameters ( FunctionTemplateDecl FunctionTemplate,
llvm::SmallBitVector &  Deduced 
) [inline]

Definition at line 4739 of file Sema.h.

References Context.

Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().

void Sema::MarkDeducedTemplateParameters ( ASTContext Ctx,
FunctionTemplateDecl FunctionTemplate,
llvm::SmallBitVector &  Deduced 
) [static]
void Sema::MarkFunctionReferenced ( SourceLocation  Loc,
FunctionDecl Func 
)

Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)

Definition at line 9367 of file SemaExpr.cpp.

References CurContext, DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), clang::ExternalLinkage, clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getLinkage(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::FunctionDecl::hasBody(), InstantiateFunctionDefinition(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isImplicitlyInstantiable(), clang::SourceLocation::isInvalid(), IsPotentiallyEvaluatedContext(), clang::FunctionDecl::isPure(), clang::Decl::isUsed(), MarkVTableUsed(), PendingInstantiations, PendingLocalImplicitInstantiations, clang::Redeclarable< decl_type >::redecls_begin(), clang::Redeclarable< decl_type >::redecls_end(), clang::Decl::setReferenced(), clang::Decl::setUsed(), clang::TSK_ImplicitInstantiation, and UndefinedInternals.

Referenced by BuildCXXConstructExpr(), CheckDestructor(), CopyObject(), FinalizeVarWithDestructor(), FindConditionalOverload(), clang::FindConversionForRefInit(), handleCleanupAttr(), InitializeVarWithConstructor(), clang::IsUserDefinedConversion(), MarkAnyDeclReferenced(), MarkBaseAndMemberDestructorsReferenced(), MarkVirtualMembersReferenced(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), SetDelegatingInitializer(), SetIvarInitializers(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

void Sema::MarkMemberReferenced ( MemberExpr E)

Perform reference-marking and odr-use handling for a MemberExpr.

Definition at line 9876 of file SemaExpr.cpp.

References clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), and MarkExprReferenced().

Referenced by BuildMemberExpr().

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

References clang::Redeclarable< decl_type >::getFirstDeclaration().

void Sema::MarkUsedTemplateParameters ( const TemplateArgumentList TemplateArgs,
bool  OnlyDeduced,
unsigned  Depth,
llvm::SmallBitVector &  Used 
)

Mark the template parameters can be deduced by the given template argument list.

Parameters:
TemplateArgsthe template argument list from which template parameters will be deduced.
Deduceda bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced.

Definition at line 4370 of file SemaTemplateDeduction.cpp.

References clang::TemplateArgumentList::data(), hasPackExpansionBeforeEnd(), MarkUsedTemplateParameters(), and clang::TemplateArgumentList::size().

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

References DoMarkVarDeclReferenced().

Referenced by MarkAnyDeclReferenced().

void Sema::MarkVirtualMembersReferenced ( SourceLocation  Loc,
const CXXRecordDecl RD 
)
void Sema::MarkVTableUsed ( SourceLocation  Loc,
CXXRecordDecl Class,
bool  DefinitionRequired = false 
)
void Sema::MatchAllMethodDeclarations ( const SelectorSet InsMap,
const SelectorSet ClsMap,
SelectorSet InsMapSeen,
SelectorSet ClsMapSeen,
ObjCImplDecl IMPDecl,
ObjCContainerDecl IDecl,
bool &  IncompleteImpl,
bool  ImmediateClass,
bool  WarnExactMatch = false 
)
void Sema::MatchOneProtocolPropertiesInClass ( Decl CDecl,
ObjCProtocolDecl PDecl 
)

MatchOneProtocolPropertiesInClass - This routine goes thru the list of properties declared in a protocol and compares their attribute against the same property declared in the class or category.

Definition at line 1070 of file SemaObjCProperty.cpp.

References DiagnosePropertyMismatch(), clang::NamedDecl::getIdentifier(), clang::ObjCCategoryDecl::IsClassExtension(), P, clang::ObjCContainerDecl::prop_begin(), and clang::ObjCContainerDecl::prop_end().

Referenced by CompareProperties().

TemplateParameterList * Sema::MatchTemplateParametersToScopeSpecifier ( SourceLocation  DeclStartLoc,
SourceLocation  DeclLoc,
const CXXScopeSpec SS,
TemplateParameterList **  ParamLists,
unsigned  NumParamLists,
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.

Parameters:
DeclStartLocthe start of the declaration that has a scope specifier or a template parameter list.
DeclLocThe location of the declaration itself.
SSthe scope specifier that will be matched to the given template parameter lists. This scope specifier precedes a qualified name that is being declared.
ParamListsthe template parameter lists, from the outermost to the innermost template parameter lists.
NumParamListsthe number of template parameter lists in ParamLists.
IsFriendWhether to apply the slightly different rules for matching template parameters to scope specifiers in friend declarations.
IsExplicitSpecializationwill be set true if the entity being declared is an explicit specialization, false otherwise.
Returns:
the template parameter list, if any, that corresponds to the name that is preceded by the scope specifier SS. This template parameter list may have template parameters (if we're declaring a template) or may have no template parameters (if we're declaring a template specialization), or may be NULL (if what we're declaring isn't itself a template).

Definition at line 1539 of file SemaTemplate.cpp.

References clang::FixItHint::CreateInsertion(), DependsOnTemplateParameters(), Diag(), clang::NestedNameSpecifier::getAsType(), clang::DeclContext::getParent(), getRangeOfTypeInNestedNameSpecifier(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateParameterList::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), clang::QualType::isNull(), clang::SourceLocation::isValid(), 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 1903 of file SemaDeclObjC.cpp.

References Context, getLangOptions(), clang::ObjCMethodDecl::getResultType(), clang::Decl::hasAttr(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by ActOnAtEnd(), addMethodToGlobalList(), and DiagnoseClassExtensionDupMethods().

ExprResult Sema::MaybeBindToTemporary ( Expr E)
ExprResult Sema::MaybeConvertParenListExprToParenExpr ( Scope S,
Expr OrigExpr 
)

This is not an AltiVec-style cast, so turn the ParenListExpr into a sequence of comma binary operators.

Definition at line 4247 of file SemaExpr.cpp.

References clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getLParenLoc(), clang::ParenListExpr::getNumExprs(), and clang::ParenListExpr::getRParenLoc().

Expr * Sema::MaybeCreateExprWithCleanups ( Expr SubExpr)
ExprResult Sema::MaybeCreateExprWithCleanups ( ExprResult  SubExpr)
Stmt * Sema::MaybeCreateStmtWithCleanups ( Stmt SubStmt)

Definition at line 4273 of file SemaExprCXX.cpp.

bool Sema::MergeCompatibleFunctionDecls ( FunctionDecl New,
FunctionDecl Old 
)

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 form the old declaration to the new declaration, once we know that New is in fact a redeclaration of Old.

Returns:
false

Definition at line 2091 of file SemaDecl.cpp.

References clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::isPure(), mergeParamDeclAttributes(), clang::SC_Extern, clang::SC_None, clang::FunctionDecl::setPure(), and clang::FunctionDecl::setStorageClass().

bool Sema::MergeCXXFunctionDecl ( FunctionDecl New,
FunctionDecl Old 
)
void Sema::mergeDeclAttributes ( Decl New,
Decl Old,
bool  MergeDeprecation = true 
)
bool Sema::MergeFunctionDecl ( FunctionDecl New,
Decl OldD 
)

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

References canRedefineFunction(), clang::CC_Default, clang::frontend::CPlusPlus, clang::ParmVarDecl::Create(), Diag(), clang::FunctionDecl::getBuiltinID(), clang::QualType::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::NamedDecl::getDeclName(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionType::getNameForCallConv(), clang::FunctionType::ExtInfo::getNoReturn(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getRegParmType(), clang::FunctionType::getResultType(), clang::FunctionDecl::getStorageClass(), clang::ValueDecl::getType(), clang::FunctionDecl::hasPrototype(), clang::QualType::isCanonical(), clang::NamedDecl::isCXXClassMember(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isImplicit(), clang::QualType::isNull(), clang::FunctionDecl::isOutOfLine(), clang::CXXMethodDecl::isStatic(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isTrivial(), clang::Builtin::NotBuiltin, Param, clang::SC_None, clang::SC_Static, clang::IdentifierInfo::setBuiltinID(), clang::FunctionDecl::setHasInheritedPrototype(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::ParmVarDecl::setScopeInfo(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), Warnings, clang::FunctionType::ExtInfo::withCallingConv(), clang::FunctionType::ExtInfo::withNoReturn(), clang::FunctionType::ExtInfo::withProducesResult(), and clang::FunctionType::ExtInfo::withRegParm().

void Sema::mergeObjCMethodDecls ( ObjCMethodDecl New,
ObjCMethodDecl Old 
)
void Sema::MergeTypedefNameDecl ( TypedefNameDecl New,
LookupResult OldDecls 
)
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 2205 of file SemaDecl.cpp.

References clang::VarDecl::Definition, Diag(), clang::Decl::dropAttr(), clang::Decl::getAccess(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::NamedDecl::getLinkage(), clang::Decl::getLocation(), clang::LookupResult::getRepresentativeDecl(), clang::VarDecl::getStorageClass(), clang::VarDecl::hasExternalStorage(), clang::NamedDecl::hasLinkage(), clang::InternalLinkage, clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarDecl::isThreadSpecified(), clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDeclaration(), and clang::VarDecl::setStorageClass().

void Sema::MergeVarDeclExceptionSpecs ( VarDecl New,
VarDecl Old 
)

Merge the exception specifications of two variable declarations.

This is called when there's a redeclaration of a VarDecl. The function checks if the redeclaration might have an exception specification and validates compatibility and merges the specs if necessary.

Definition at line 531 of file SemaDeclCXX.cpp.

References CheckEquivalentExceptionSpec(), Context, getLangOptions(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), P, and clang::Decl::setInvalidDecl().

void Sema::MergeVarDeclTypes ( VarDecl New,
VarDecl Old 
)

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 and AddCXXDirectInitializerToDecl. We can't check them before the initializer is attached.

Definition at line 2145 of file SemaDecl.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::AutoType::isDeduced(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().

Referenced by AddCXXDirectInitializerToDecl().

void Sema::NoteAllFoundTemplates ( TemplateName  Name)
void clang::Sema::NoteAllOverloadCandidates ( Expr E,
QualType  DestType = QualType() 
)
void clang::Sema::NoteOverloadCandidate ( FunctionDecl Fn,
QualType  DestType = QualType() 
)
ExprResult clang::Sema::Owned ( Expr E) [inline]
ExprResult clang::Sema::Owned ( ExprResult  R) [inline]

Definition at line 724 of file Sema.h.

StmtResult clang::Sema::Owned ( Stmt S) [inline]

Definition at line 725 of file Sema.h.

References S.

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

Decl * Sema::ParsedFreeStandingDeclSpec ( Scope S,
AccessSpecifier  AS,
DeclSpec DS,
MultiTemplateParamsArg  TemplateParams 
)

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. "struct foo;") is parsed. It also accopts template parameters to cope with template friend declarations.

Definition at line 2350 of file SemaDecl.cpp.

References clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::ParsedAttributes::empty(), clang::OpaquePtr< PtrTy >::get(), clang::DeclSpec::getAttributes(), clang::SourceRange::getBegin(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::ParsedAttributes::getList(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::AttributeList::getName(), clang::AttributeList::getNext(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getRestrictSpecLoc(), clang::AttributeList::getScopeLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TagDecl::getTagKind(), clang::DeclSpec::getThreadSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getVirtualSpecLoc(), clang::TagDecl::isCompleteDefinition(), clang::DeclSpec::isConstexprSpecified(), clang::DeclSpec::isExplicitSpecified(), clang::DeclSpec::isExternInLinkageSpec(), clang::DeclSpec::isFriendSpecified(), clang::DeclContext::isFunctionOrMethod(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isMissingDeclaratorOk(), clang::DeclSpec::isModulePrivateSpecified(), clang::DeclSpec::isThreadSpecified(), clang::DeclSpec::isVirtualSpecified(), clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TagDecl::setFreeStanding(), clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_volatile, clang::DeclSpec::TST_class, clang::TST_enum, clang::DeclSpec::TST_enum, clang::TST_error, 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 
)
ExprResult Sema::ParseObjCProtocolExpression ( IdentifierInfo ProtocolName,
SourceLocation  AtLoc,
SourceLocation  ProtoLoc,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc 
)
ExprResult Sema::ParseObjCSelectorExpression ( Selector  Sel,
SourceLocation  AtLoc,
SourceLocation  SelLoc,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc 
)
ExprResult Sema::ParseObjCStringLiteral ( SourceLocation AtLocs,
Expr **  Strings,
unsigned  NumStrings 
)
TypedefDecl * Sema::ParseTypedefDecl ( Scope S,
Declarator D,
QualType  T,
TypeSourceInfo TInfo 
)
PartialDiagnostic clang::Sema::PDiag ( unsigned  DiagID = 0) [inline]

Build a partial diagnostic.

Definition at line 24 of file SemaInternal.h.

References Context, and clang::ASTContext::getDiagAllocator().

Referenced by ActOnStartCategoryInterface(), ActOnStartClassInterface(), ActOnStaticAssertDeclaration(), AdjustFunctionParmAndArgTypesForDeduction(), BuildClassMessage(), BuildCXXCastArgument(), BuildInstanceMessage(), checkArithmeticIncompletePointerType(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCompletedCXXClass(), CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), CheckCXX98CompatAccessibleCopy(), CheckEquivalentExceptionSpec(), CheckExceptionSpecCompatibility(), CheckExplicitlyDefaultedCopyAssignment(), CheckExplicitlyDefaultedCopyConstructor(), CheckExplicitlyDefaultedDefaultConstructor(), CheckExplicitlyDefaultedDestructor(), CheckExplicitlyDefaultedMoveAssignment(), CheckExplicitlyDefaultedMoveConstructor(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckMessageArgumentTypes(), CheckOverridingFunctionExceptionSpec(), CheckOverridingFunctionReturnType(), CheckParamExceptionSpec(), CheckPlaceholderExpr(), CheckSpecifiedExceptionType(), CompareReferenceRelationship(), CopyObject(), clang::InitializationSequence::Diagnose(), DiagnoseAssignmentResult(), DiagnoseBadShiftValues(), DiagnoseBitwisePrecedence(), DiagnoseConditionalPrecedence(), EmitDiagnosticForBitwiseAndInBitwiseOr(), EmitDiagnosticForLogicalAndInLogicalOr(), EvaluateArrayTypeTrait(), FinalizeVarWithDestructor(), GetFullTypeForDeclarator(), HandleExprPropertyRefExpr(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), isArraySizeVLA(), clang::IsUserDefinedConversion(), LookupMemberExprInRecord(), MarkBaseAndMemberDestructorsReferenced(), clang::InitializationSequence::Perform(), RequireCompleteDeclContext(), RequireCompleteType(), RequireNonAbstractType(), SetIvarInitializers(), ShouldDeleteCopyAssignmentOperator(), ShouldDeleteDestructor(), ShouldDeleteMoveAssignmentOperator(), ShouldDeleteSpecialMember(), clang::TryListConversion(), TryStaticDowncast(), and VerifyIntegerConstantExpression().

ExprResult clang::Sema::PerformContextuallyConvertToBool ( Expr From)
ExprResult clang::Sema::PerformContextuallyConvertToObjCPointer ( Expr From)

PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.

Definition at line 4754 of file SemaOverload.cpp.

References AA_Converting, clang::checkPlaceholderForOverload(), Context, clang::ExprError(), clang::ASTContext::getObjCIdType(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and clang::TryContextuallyConvertToObjCPointer().

Referenced by BuildInstanceMessage().

ExprResult Sema::PerformCopyInitialization ( const InitializedEntity Entity,
SourceLocation  EqualLoc,
ExprResult  Init,
bool  TopLevelOfInitList = false 
)
void Sema::PerformDependentDiagnostics ( const DeclContext Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)
ExprResult clang::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 1168 of file SemaOverload.cpp.

Referenced by CheckConvertedConstantExpression(), FindConditionalOverload(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), and PerformContextuallyConvertToObjCPointer().

ExprResult clang::Sema::PerformImplicitConversion ( Expr From,
QualType  ToType,
AssignmentAction  Action,
bool  AllowExplicit,
ImplicitConversionSequence ICS 
)
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 2198 of file SemaExprCXX.cpp.

References clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), clang::CK_ConstructorConversion, clang::CK_UserDefinedConversion, clang::UserDefinedConversionSequence::ConversionFunction, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), clang::UserDefinedConversionSequence::EllipsisConversion, clang::ImplicitConversionSequence::EllipsisConversion, clang::ExprError(), clang::UserDefinedConversionSequence::FoundConversionFunction, clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::Stmt::getLocStart(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ActionResult< PtrTy, CompressInvalid >::take(), 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 2288 of file SemaExprCXX.cpp.

References clang::CK_ArrayToPointerDecay, 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_IntegralToFloating, CK_Invalid, clang::CK_NoOp, clang::CK_VectorSplat, Compatible, clang::StandardConversionSequence::CopyConstructor, clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, Diag(), clang::ExprError(), clang::StandardConversionSequence::First, clang::SourceRange::getBegin(), clang::ComplexType::getElementType(), getElementType(), clang::Stmt::getLocStart(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::ICK_Array_To_Pointer, clang::ICK_Block_Pointer_Conversion, clang::ICK_Boolean_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::StandardConversionSequence::IncompatibleObjC, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::move_arg(), clang::OK_ObjCProperty, clang::StandardConversionSequence::Second, clang::ActionResult< PtrTy, CompressInvalid >::take(), 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 1004 of file SemaExprMember.cpp.

References clang::Expr::getType().

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

References clang::CK_LValueToRValue, clang::ImplicitCastExpr::Create(), clang::InitializationKind::CreateCopy(), clang::ExprError(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ImplicitCastExpr::OnStack, clang::InitializationSequence::SK_ConstructorInitialization, and clang::VK_XValue.

ExprResult clang::Sema::PerformObjectArgumentInitialization ( Expr From,
NestedNameSpecifier Qualifier,
NamedDecl FoundDecl,
CXXMethodDecl Method 
)
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:

First we cast from the base type to the naming class. The naming class is the class into which we were looking when we found the member; it's the qualifier type if a qualifier was provided, and otherwise it's the base type.

Next we cast from the naming class to the declaring class. If the member we found was brought into a class's scope by a using declaration, this is that class; otherwise it's the class declaring the member.

Finally we cast from the declaring class to the "true" declaring class of the member. This conversion does not obey access control.

Definition at line 1823 of file SemaExpr.cpp.

References clang::CK_UncheckedDerivedToBase, clang::ExprError(), clang::NestedNameSpecifier::getAsType(), clang::SourceRange::getBegin(), clang::QualType::getCanonicalType(), clang::Decl::getDeclContext(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), and clang::QualType::isNull().

Referenced by BuildFieldReferenceExpr(), and PerformObjectArgumentInitialization().

void Sema::PerformPendingInstantiations ( bool  LocalOnly = false)
void Sema::PopDeclContext ( )
void Sema::PopExpressionEvaluationContext ( )
void Sema::PopFunctionScopeInfo ( const sema::AnalysisBasedWarnings::Policy WP = 0,
const Decl D = 0,
const BlockExpr blkExpr = 0 
)
void clang::Sema::PopParsingClass ( ParsingClassState  state) [inline]

Definition at line 2230 of file Sema.h.

References clang::Sema::DelayedDiagnostics::popContext().

void clang::Sema::PopParsingDeclaration ( ParsingDeclState  state,
Decl decl 
) [inline]

Definition at line 2222 of file Sema.h.

References clang::Sema::DelayedDiagnostics::popParsingDecl().

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 395 of file SemaAttr.cpp.

References Diag(), FreeVisContext(), NoVisibility, and VisContext.

Referenced by ActOnFinishNamespaceDef(), and ActOnPragmaVisibility().

CastKind Sema::PrepareCastToObjCObjectPointer ( ExprResult E)
CastKind Sema::PrepareScalarCast ( ExprResult Src,
QualType  DestTy 
)
void Sema::PrintInstantiationStack ( )
void Sema::PrintStats ( ) const

Print out statistics about the semantic analysis.

Definition at line 224 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 
)
void Sema::ProcessDeclAttributeList ( Scope S,
Decl D,
const AttributeList AttrList,
bool  NonInheritable = true,
bool  Inheritable = true 
)

ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes.

Definition at line 3789 of file SemaDeclAttr.cpp.

References Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getNext(), clang::Decl::hasAttr(), and ProcessDeclAttribute().

Referenced by ActOnEnumBody(), ActOnEnumConstant(), ActOnForwardProtocolDeclaration(), ActOnMethodDeclaration(), ActOnStartClassInterface(), ActOnStartNamespaceDef(), and ActOnStartProtocolInterface().

void Sema::ProcessDeclAttributes ( Scope S,
Decl D,
const Declarator PD,
bool  NonInheritable = true,
bool  Inheritable = true 
)

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 3927 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 ActOnExceptionDeclarator(), ActOnObjCExceptionDecl(), CreatePropertyDecl(), and HandlePropertyInClassExtension().

void Sema::ProcessPropertyDecl ( ObjCPropertyDecl property,
ObjCContainerDecl CD,
ObjCPropertyDecl redeclaredProperty = 0,
ObjCContainerDecl lexicalDC = 0 
)

Process the specified property declaration and create decls for the setters and getters as needed.

Parameters:
propertyThe property declaration being processed
DCThe semantic container for the property
redeclaredPropertyDeclaration for property if redeclared in class extension.
lexicalDCContainer for redeclaredProperty.

ProcessPropertyDecl - Make sure that any user-defined setter/getter methods have the property type and issue diagnostics if they don't. Also synthesize a getter/setter method if none exist (and update the appropriate lookup tables. FIXME: Should reconsider if adding synthesized methods is the "right" thing to do.

Definition at line 1584 of file SemaObjCProperty.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), Diag(), DiagnosePropertyAccessorMismatch(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getResultType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCPropertyDecl::getSetterName(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCMethodDecl::Optional, clang::ObjCPropertyDecl::Optional, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_size(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::Decl::setLexicalDeclContext(), clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setSynthesized(), and clang::ASTContext::VoidTy.

Referenced by ActOnAtEnd(), and HandlePropertyInClassExtension().

void Sema::PushBlockScope ( Scope BlockScope,
BlockDecl Block 
)

Definition at line 829 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

void Sema::PushDeclContext ( Scope S,
DeclContext DC 
)

Set the current declaration context until it gets popped.

Definition at line 805 of file SemaDecl.cpp.

References clang::Scope::setEntity().

Referenced by ActOnStartDelayedMemberDeclarations(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), and ActOnStartOfObjCMethodDef().

void Sema::PushExpressionEvaluationContext ( ExpressionEvaluationContext  NewContext)
void Sema::pushExternalDeclIntoScope ( NamedDecl D,
DeclarationName  Name 
)

Make the given externally-produced declaration visible at the top level scope.

Parameters:
DThe externally-produced declaration to push.
NameThe name of the externally-produced declaration.

Definition at line 970 of file SemaDecl.cpp.

Referenced by clang::ASTReader::SetGloballyVisibleDecls().

void Sema::PushFunctionScope ( )

Enter a new function scope.

Definition at line 817 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

Referenced by ActOnStartOfObjCMethodDef().

void Sema::PushLambdaScope ( CXXRecordDecl Lambda)

Definition at line 834 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

void Sema::PushNamespaceVisibilityAttr ( const VisibilityAttr *  Attr,
SourceLocation  Loc 
)

PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.

Definition at line 386 of file SemaAttr.cpp.

References NoVisibility, and PushPragmaVisibility().

Referenced by ActOnStartNamespaceDef().

void Sema::PushOnScopeChains ( NamedDecl D,
Scope S,
bool  AddToContext = true 
)
ParsingClassState clang::Sema::PushParsingClass ( ) [inline]

Definition at line 2227 of file Sema.h.

References clang::Sema::DelayedDiagnostics::pushContext().

ParsingDeclState clang::Sema::PushParsingDeclaration ( ) [inline]

Definition at line 2219 of file Sema.h.

References clang::Sema::DelayedDiagnostics::pushParsingDecl().

void Sema::PushUsingDirective ( Scope S,
UsingDirectiveDecl UDir 
)

Definition at line 6067 of file SemaDeclCXX.cpp.

References clang::Scope::getEntity(), 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 1979 of file SemaDeclObjC.cpp.

References ExternalSource, and clang::ExternalSemaSource::ReadMethodPool().

Referenced by AddClassMessageCompletions().

ExprResult Sema::RebuildExprInCurrentInstantiation ( Expr E)

Definition at line 6879 of file SemaTemplate.cpp.

References clang::Expr::getExprLoc().

Referenced by RebuildDeclaratorInCurrentInstantiation().

bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation ( CXXScopeSpec SS)
bool Sema::RebuildTemplateParamsInCurrentInstantiation ( TemplateParameterList Params)
TypeSourceInfo * Sema::RebuildTypeInCurrentInstantiation ( TypeSourceInfo T,
SourceLocation  Loc,
DeclarationName  Name 
)

Rebuilds a type within the context of the current instantiation.

The type T is part of the type of an out-of-line member definition of a class template (or class template partial specialization) that was parsed and constructed before we entered the scope of the class template (or partial specialization thereof). This routine will rebuild that type now that we have entered the declarator's scope, which may produce different canonical types, e.g.,

 template<typename T>
 struct X {
   typedef T* pointer;
   pointer data();
 };

 template<typename T>
 typename X<T>::pointer X<T>::data() { ... }

Here, the type "typename X<T>::pointer" will be created as a DependentNameType, since we do not know that we can look into X<T> when we parsed the type. This function will rebuild the type, performing the lookup of "pointer" in X<T> and returning an ElaboratedType whose canonical type is the same as the canonical type of T*, allowing the return types of the out-of-line definition and the declaration to match.

Definition at line 6869 of file SemaTemplate.cpp.

References clang::TypeSourceInfo::getType().

Referenced by RebuildDeclaratorInCurrentInstantiation().

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 800 of file SemaPseudoObject.cpp.

References clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), and stripOpaqueValuesFromPseudoObjectRef().

void Sema::RegisterLocallyScopedExternCDecl ( NamedDecl ND,
const LookupResult Previous,
Scope S 
)
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 208 of file SemaCXXScopeSpec.cpp.

References Context, Diag(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getTypeDeclType(), clang::TagType::isBeingDefined(), clang::SourceLocation::isInvalid(), PDiag(), RequireCompleteType(), and clang::CXXScopeSpec::SetInvalid().

Referenced by ActOnCXXEnterDeclaratorScope(), ActOnFriendFunctionDecl(), BuildCXXNestedNameSpecifier(), BuildUsingDeclaration(), CheckUsingDeclQualifier(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

bool Sema::RequireCompleteExprType ( Expr E,
const PartialDiagnostic PD,
std::pair< SourceLocation, PartialDiagnostic Note 
)

Ensure that the type of the given expression is complete.

This routine checks whether the expression E has a complete type. If the expression refers to an instantiable construct, that instantiation is performed as needed to complete its type. Furthermore Sema::RequireCompleteType is called for the expression's type (or in the case of a reference type, the referred-to type).

Parameters:
EThe expression whose type is required to be complete.
PDThe partial diagnostic that will be printed out if the type cannot be completed.
Returns:
true if the type of E is incomplete and diagnosed, false otherwise.

Definition at line 4001 of file SemaType.cpp.

References getASTMutationListener(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::Stmt::getLocStart(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::Expr::getType(), clang::Expr::IgnoreParens(), InstantiateStaticDataMemberDefinition(), clang::SourceLocation::isInvalid(), RequireCompleteType(), clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::Expr::setType(), and clang::TSK_ExplicitSpecialization.

Referenced by AdjustFunctionParmAndArgTypesForDeduction().

bool Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
const PartialDiagnostic PD,
std::pair< SourceLocation, PartialDiagnostic Note 
)

Ensure that the type T is a complete type.

This routine checks whether the type T is complete in any context where a complete type is required. If T is a complete type, returns false. If T is a class template specialization, this routine then attempts to perform class template instantiation. If instantiation fails, or if T is incomplete and cannot be completed, issues the diagnostic diag (giving it the type T) and returns true.

Parameters:
LocThe location in the source that the incomplete type diagnostic should refer to.
TThe type that this routine is examining for completeness.
PDThe partial diagnostic that will be printed out if T is not a complete type.
Returns:
true if T is incomplete and a diagnostic was emitted, false otherwise.

Definition at line 4083 of file SemaType.cpp.

References clang::ExternalASTSource::CompleteType(), Context, Diag(), clang::ASTContext::getAsConstantArrayType(), clang::TagType::getDecl(), clang::PartialDiagnostic::getDiagID(), clang::ASTContext::getExternalSource(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::DeclContext::hasExternalLexicalStorage(), HiddenDefinitions, InstantiateClass(), InstantiateClassTemplateSpecialization(), clang::TagType::isBeingDefined(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), isSFINAEContext(), clang::LookupResult::isVisible(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by ActOnEndOfTranslationUnit(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartOfObjCMethodDef(), AddCXXDirectInitializerToDecl(), BuildArrayType(), BuildClassMessage(), BuildExceptionDeclaration(), BuildInstanceMessage(), BuildMemberPointerType(), checkArithmeticIncompletePointerType(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCommaOperands(), CheckForModifiableLvalue(), CheckMessageArgumentTypes(), CheckOverridingFunctionReturnType(), CheckSpecifiedExceptionType(), CheckUnaryTypeTraitTypeCompleteness(), CompareReferenceRelationship(), ConvertToIntegralOrEnumerationType(), CopyObject(), DeduceTemplateArgumentsByTypeMatch(), clang::InitializationSequence::Diagnose(), EvaluateBinaryTypeTrait(), FindInstantiatedDecl(), HandleExprPropertyRefExpr(), clang::IsUserDefinedConversion(), LookupMemberExprInRecord(), RequireCompleteDeclContext(), RequireCompleteExprType(), RequireCompleteType(), RequireLiteralType(), SetParamDefaultArgument(), TryConstructorInitialization(), clang::TryListConversion(), clang::TryReferenceInit(), TryRefInitWithConversionFunction(), TryStaticDowncast(), TryStaticImplicitCast(), and TryUserDefinedConversion().

bool Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
const PartialDiagnostic PD 
)

Definition at line 4198 of file SemaType.cpp.

References PDiag(), and RequireCompleteType().

bool Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID 
)

Definition at line 4204 of file SemaType.cpp.

References PDiag(), and RequireCompleteType().

bool Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
const PartialDiagnostic PD,
bool  AllowIncompleteType = false 
)

Ensure that the type T is a literal type.

This routine checks whether the type T is a literal type. If T is an incomplete type, an attempt is made to complete it. If T is a literal type, or AllowIncompleteType is true and T is an incomplete type, returns false. Otherwise, this routine issues the diagnostic PD (giving it the type T), along with notes explaining why the type is not a literal type, and returns true.

Parameters:
LocThe location in the source that the non-literal type diagnostic should refer to.
TThe type that this routine is examining for literalness.
PDThe partial diagnostic that will be printed out if T is not a literal type.
AllowIncompleteTypeIf true, an incomplete type will be considered acceptable.
Returns:
true if T is not a literal type and a diagnostic was emitted, false otherwise.

Definition at line 4232 of file SemaType.cpp.

References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), CCK_NoteNonConstexprInstantiation, CheckConstexprFunctionDecl(), clang::CXXRecordDecl::ctor_begin(), clang::CXXRecordDecl::ctor_end(), Diag(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDestructor(), clang::PartialDiagnostic::getDiagID(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::TagDecl::getSourceRange(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::hasConstexprNonCopyMoveConstructor(), clang::CXXRecordDecl::hasNonLiteralTypeFieldsOrBases(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::isAggregate(), clang::FunctionDecl::isConstexpr(), clang::TagDecl::isStruct(), clang::CXXMethodDecl::isUserProvided(), RequireCompleteType(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, clang::CXXRecordDecl::vbases_begin(), and clang::CXXRecordDecl::vbases_end().

Referenced by CheckCompletedCXXClass(), CheckConstexprFunctionDecl(), and CheckConstexprParameterTypes().

bool Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
const PartialDiagnostic PD 
)
bool Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
AbstractDiagSelID  SelID = AbstractNone 
)

Definition at line 3360 of file SemaDeclCXX.cpp.

References PDiag(), and RequireNonAbstractType().

FunctionDecl * clang::Sema::ResolveAddressOfOverloadedFunction ( Expr AddressOfExpr,
QualType  TargetType,
bool  Complain,
DeclAccessPair FoundResult,
bool *  pHadMultipleCandidates = 0 
)

ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to. For example:

 int f(double);
 int f(int);

 int (*pfd)(double) = f; // selects f(double)

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 8814 of file SemaOverload.cpp.

References clang::Stmt::getLocStart(), and clang::Expr::getType().

Referenced by clang::InitializationSequence::Diagnose(), clang::InitializationSequence::InitializationSequence(), clang::IsStandardConversion(), ResolveOverloadedFunctionForReferenceBinding(), clang::TryListConversion(), clang::TryReferenceInit(), and TryStaticMemberPointerUpcast().

bool clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization ( ExprResult SrcExpr,
bool  DoFunctionPointerConverion = false,
bool  Complain = false,
const SourceRange OpRangeForComplaining = SourceRange(),
QualType  DestTypeForComplaining = QualType(),
unsigned  DiagIDForComplaining = 0 
)
FunctionDecl * clang::Sema::ResolveSingleFunctionTemplateSpecialization ( OverloadExpr ovl,
bool  Complain = false,
DeclAccessPair FoundResult = 0 
)

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.

Definition at line 8855 of file SemaOverload.cpp.

References clang::ASTTemplateArgumentListInfo::copyInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceTemplateArguments(), Diag(), clang::OverloadExpr::getExplicitTemplateArgs(), clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::getNameLoc(), and clang::OverloadExpr::hasExplicitTemplateArgs().

Referenced by clang::AddressOfFunctionResolver::AddressOfFunctionResolver(), 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.

Parameters:
AnnotationThe annotation pointer, produced by SaveNestedNameSpecifierAnnotation().
AnnotationRangeThe source range corresponding to the annotation.
SSThe nested-name-specifier that will be updated with the contents of the annotation pointer.

Definition at line 853 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.

Parameters:
SSA nested-name-specifier.
Returns:
A pointer containing all of the information in the nested-name-specifier SS.

Definition at line 839 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().

CastKind Sema::ScalarTypeToBooleanCastKind ( QualType  ScalarTy) [static]
ExprResult Sema::SemaBuiltinShuffleVector ( CallExpr TheCall)
bool Sema::SetCtorInitializers ( CXXConstructorDecl Constructor,
CXXCtorInitializer **  Initializers,
unsigned  NumInitializers,
bool  AnyErrors 
)
void Sema::SetDeclDefaulted ( Decl dcl,
SourceLocation  DefaultLoc 
)
void Sema::SetDeclDeleted ( Decl dcl,
SourceLocation  DelLoc 
)
bool Sema::SetDelegatingInitializer ( CXXConstructorDecl Constructor,
CXXCtorInitializer Initializer 
)
void Sema::SetIvarInitializers ( ObjCImplementationDecl ObjCImplementation)
void clang::Sema::SetLateTemplateParser ( LateTemplateParserCB LTP,
void *  P 
) [inline]

Definition at line 341 of file Sema.h.

References LateTemplateParser, and OpaqueParser.

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 
)
bool Sema::ShouldDeleteCopyAssignmentOperator ( CXXMethodDecl MD)
bool Sema::ShouldDeleteDestructor ( CXXDestructorDecl DD)
bool Sema::ShouldDeleteMoveAssignmentOperator ( CXXMethodDecl MD)
bool Sema::ShouldDeleteSpecialMember ( CXXMethodDecl MD,
CXXSpecialMember  CSM 
)
bool Sema::ShouldEnterDeclaratorScope ( Scope S,
const CXXScopeSpec SS 
)
bool Sema::ShouldWarnIfUnusedFileScopedDecl ( const DeclaratorDecl D) const
Expr * Sema::stripARCUnbridgedCast ( Expr e)

stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.

Definition at line 2106 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 
)
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 1565 of file SemaTemplateInstantiate.cpp.

References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), CheckBaseSpecifier(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), Context, and SubstType().

Referenced by InstantiateClass().

Decl * Sema::SubstDecl ( Decl D,
DeclContext Owner,
const MultiLevelTemplateArgumentList TemplateArgs 
)
DeclarationNameInfo Sema::SubstDeclarationNameInfo ( const DeclarationNameInfo NameInfo,
const MultiLevelTemplateArgumentList TemplateArgs 
)
TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable ( TemplateDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  RAngleLoc,
Decl Param,
SmallVectorImpl< TemplateArgument > &  Converted 
)
ExprResult Sema::SubstExpr ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs 
)
bool Sema::SubstExprs ( Expr **  Exprs,
unsigned  NumExprs,
bool  IsCall,
const MultiLevelTemplateArgumentList TemplateArgs,
SmallVectorImpl< Expr * > &  Outputs 
)

Substitute the given template arguments into a list of expressions, expanding pack expansions if required.

Parameters:
ExprsThe list of expressions to substitute into.
NumExprsThe number of expressions in Exprs.
IsCallWhether this is some form of call, in which case default arguments will be dropped.
TemplateArgsThe set of template arguments to substitute.
OutputsWill receive all of the substituted arguments.
Returns:
true if an error occurred, false otherwise.

Definition at line 2270 of file SemaTemplateInstantiate.cpp.

Referenced by InstantiateInitializer().

TypeSourceInfo * Sema::SubstFunctionDeclType ( TypeSourceInfo T,
const MultiLevelTemplateArgumentList Args,
SourceLocation  Loc,
DeclarationName  Entity 
)

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.

Definition at line 1427 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations, Context, clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::isNull(), NeedsInstantiationAsFunctionType(), and clang::TypeLocBuilder::reserve().

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().

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

Parameters:
FunctionTemplatethe function template into which the explicit template arguments will be substituted.
ExplicitTemplateArgumentsthe explicitly-specified template arguments.
Deducedthe deduced template arguments, which will be populated with the converted and checked explicit template arguments.
ParamTypeswill be populated with the instantiated function parameters.
FunctionTypeif non-NULL, the result type of the function template will also be instantiated and the pointed-to value will be updated with the instantiated function type.
Infoif substitution fails for any reason, this object will be populated with more information about the failure.
Returns:
TDK_Success if substitution was successful, or some failure condition.

Definition at line 2209 of file SemaTemplateDeduction.cpp.

References Arg, clang::TemplateArgumentList::CreateCopy(), clang::TemplateArgumentList::get(), clang::NamedDecl::getDeclName(), clang::FunctionType::getExtInfo(), clang::TemplateArgument::getKind(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::FunctionProtoType::getRefQualifier(), clang::FunctionType::getResultType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::FunctionProtoType::getTypeQuals(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Sema::SFINAETrap::hasErrorOccurred(), Index, clang::QualType::isNull(), clang::FunctionType::isVariadic(), makeTemplateParameter(), P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::sema::TemplateDeductionInfo::reset(), clang::TemplateParameterList::size(), clang::TemplateArgumentList::size(), clang::TemplateArgumentListInfo::size(), and Unevaluated.

NestedNameSpecifierLoc Sema::SubstNestedNameSpecifierLoc ( NestedNameSpecifierLoc  NNS,
const MultiLevelTemplateArgumentList TemplateArgs 
)
bool Sema::SubstParmTypes ( SourceLocation  Loc,
ParmVarDecl **  Params,
unsigned  NumParams,
const MultiLevelTemplateArgumentList TemplateArgs,
SmallVectorImpl< QualType > &  ParamTypes,
SmallVectorImpl< ParmVarDecl * > *  OutParams = 0 
)

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 1543 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

ParmVarDecl * Sema::SubstParmVarDecl ( ParmVarDecl D,
const MultiLevelTemplateArgumentList TemplateArgs,
int  indexAdjustment,
llvm::Optional< unsigned >  NumExpansions,
bool  ExpectParameterPack 
)
StmtResult Sema::SubstStmt ( Stmt S,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 2249 of file SemaTemplateInstantiate.cpp.

References Owned().

Referenced by InstantiateFunctionDefinition().

TemplateName Sema::SubstTemplateName ( NestedNameSpecifierLoc  QualifierLoc,
TemplateName  Name,
SourceLocation  Loc,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 2303 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.

Parameters:
Tthe type into which the template arguments will be substituted. If this type is not dependent, it will be returned immediately.
TemplateArgsthe template arguments that will be substituted for the top-level template parameters within T.
Locthe location in the source code where this substitution is being performed. It will typically be the location of the declarator (if we're instantiating the type of some declaration) or the location of the type in the source code (if, e.g., we're instantiating the type of a cast expression).
Entitythe name of the entity associated with a declaration being instantiated (if any). May be empty to indicate that there is no such entity (if, e.g., this is a type that occurs as part of a cast expression) or that the entity has no name (e.g., an unnamed function parameter).
Returns:
If the instantiation succeeds, the instantiated type. Otherwise, produces diagnostics and returns a NULL type.

Definition at line 1332 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations, and clang::TypeSourceInfo::getType().

Referenced by FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InstantiateAttrs(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), SubstBaseSpecifiers(), SubstDefaultTemplateArgument(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

QualType Sema::SubstType ( QualType  T,
const MultiLevelTemplateArgumentList TemplateArgs,
SourceLocation  Loc,
DeclarationName  Entity 
)

Deprecated form of the above.

Definition at line 1379 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations.

TypeSourceInfo * Sema::SubstType ( TypeLoc  TL,
const MultiLevelTemplateArgumentList TemplateArgs,
SourceLocation  Loc,
DeclarationName  Entity 
)
bool Sema::TemplateParameterListsAreEqual ( TemplateParameterList New,
TemplateParameterList Old,
bool  Complain,
TemplateParameterListEqualKind  Kind,
SourceLocation  TemplateArgLoc = SourceLocation() 
)

Determine whether the given template parameter lists are equivalent.

Parameters:
NewThe new template parameter list, typically written in the source code as part of a new template declaration.
OldThe old template parameter list, typically found via name lookup of the template declared with this template parameter list.
ComplainIf true, this routine will produce a diagnostic if the template parameter lists are not equivalent.
Kinddescribes how we are to match the template parameter lists.
TemplateArgLocIf this source location is valid, then we are actually checking the template parameter list of a template argument (New) against the template parameter list of its corresponding template template parameter (Old). We produce slightly different diagnostics in this scenario.
Returns:
True if the template parameter lists are equal, false otherwise.

Definition at line 4519 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), MatchTemplateParameterKind(), and clang::TemplateParameterList::size().

Referenced by ActOnAliasDeclaration(), MatchTemplateParameterKind(), and clang::TemplateDeclInstantiator::VisitClassTemplateDecl().

ExprResult Sema::TranformToPotentiallyEvaluated ( Expr E)

Definition at line 9278 of file SemaExpr.cpp.

References ExprEvalContexts, and Unevaluated.

Referenced by HandleExprEvaluationContextForTypeof().

void Sema::translateTemplateArguments ( const ASTTemplateArgsPtr In,
TemplateArgumentListInfo Out 
)

Translates template arguments as provided by the parser into template arguments used by semantic analysis.

Definition at line 515 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::LangAS::Last, clang::ASTTemplateArgsPtr::size(), and translateTemplateArgument().

Referenced by ActOnCXXNestedNameSpecifier().

ObjCMethodDecl * Sema::tryCaptureObjCSelf ( SourceLocation  Loc)

Try to capture an implicit reference to 'self'.

Definition at line 240 of file SemaExprObjC.cpp.

References getFunctionLevelDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), and TryCaptureVar().

Referenced by ActOnClassPropertyRefExpr(), and ActOnSuperMessage().

void Sema::TryCaptureVar ( VarDecl var,
SourceLocation  loc,
TryCaptureKind  Kind = TryCapture_Implicit 
)

Definition at line 9530 of file SemaExpr.cpp.

References clang::sema::CapturingScopeInfo::AddCapture(), clang::QualType::addConst(), clang::AS_private, clang::sema::CapturingScopeInfo::CaptureMap, Context, clang::frontend::CPlusPlus, clang::FieldDecl::Create(), clang::InitializationKind::CreateDirect(), CurContext, Diag(), clang::InitializationSequence::Diagnose(), diagnoseUncapturableValueReference(), FinalizeVarWithDestructor(), FunctionScopes, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getLangOptions(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::DeclContext::getParent(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasLocalStorage(), clang::sema::CapturingScopeInfo::ImpCap_Block, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::InitializedEntity::InitializeBlock(), clang::InitializedEntity::InitializeMember(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), MaybeCreateExprWithCleanups(), Owned(), clang::InitializationSequence::Perform(), PerformCopyInitialization(), clang::Decl::setAccess(), clang::Decl::setImplicit(), shouldAddConstForScope(), clang::ActionResult< PtrTy, CompressInvalid >::take(), TryCapture_ExplicitByRef, TryCapture_ExplicitByVal, and clang::VK_LValue.

Referenced by MarkVarDeclODRUsed(), and tryCaptureObjCSelf().

ImplicitConversionSequence clang::Sema::TryImplicitConversion ( Expr From,
QualType  ToType,
bool  SuppressUserConversions,
bool  AllowExplicit,
bool  InOverloadResolution,
bool  CStyle,
bool  AllowObjCWritebackConversion 
)
bool Sema::tryToRecoverWithCall ( ExprResult E,
const PartialDiagnostic PD,
bool  ForceComplain = false,
bool(*)(QualType IsPlausibleResult = 0 
)
void Sema::UpdateMarkingForLValueToRValue ( Expr E)

Definition at line 9768 of file SemaExpr.cpp.

References clang::Expr::IgnoreParens(), and MaybeODRUseExprs.

bool Sema::UseArgumentDependentLookup ( const CXXScopeSpec SS,
const LookupResult R,
bool  HasTrailingLParen 
)
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. FIXME: verify the conversion rules for "complex int" are consistent with GCC.

Definition at line 894 of file SemaExpr.cpp.

References clang::CK_IntegralCast, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getCanonicalType(), clang::Expr::getType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleFloatConversion(), handleIntegerConversion(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

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

References clang::CK_FloatingCast, clang::CK_IntegralCast, clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

Referenced by BuildObjCBridgedCast(), and CheckIndirectionOperand().

ExprResult Sema::VerifyBitField ( SourceLocation  FieldLoc,
IdentifierInfo FieldName,
QualType  FieldTy,
Expr BitWidth,
bool *  ZeroWidth = 0 
)

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

References Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::ActionResult< PtrTy, CompressInvalid >::take().

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
PartialDiagnostic  Diag,
bool  AllowFold,
PartialDiagnostic  FoldDiag 
)
ExprResult clang::Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
PartialDiagnostic  Diag,
bool  AllowFold = true 
) [inline]

Definition at line 6123 of file Sema.h.

References PDiag(), and VerifyIntegerConstantExpression().

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result = 0 
)

Definition at line 9123 of file SemaExpr.cpp.

References LangOpts, PDiag(), and VerifyIntegerConstantExpression().

void Sema::WarnConflictingTypedMethods ( ObjCMethodDecl Method,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)
void Sema::WarnExactTypedMethods ( ObjCMethodDecl ImpMethodDecl,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)
void Sema::WarnUndefinedMethod ( SourceLocation  ImpLoc,
ObjCMethodDecl method,
bool &  IncompleteImpl,
unsigned  DiagID 
)
SmallVector<Decl*,2>& clang::Sema::WeakTopLevelDecls ( ) [inline]

WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.

Definition at line 752 of file Sema.h.

References WeakTopLevelDecl.

Referenced by clang::ParseAST().


Friends And Related Function Documentation

friend class ArgumentPackSubstitutionRAII [friend]

Definition at line 4925 of file Sema.h.

friend class ASTReader [friend]

Definition at line 6405 of file Sema.h.

friend class ASTWriter [friend]

Definition at line 6406 of file Sema.h.

friend class InitializationSequence [friend]

Definition at line 6404 of file Sema.h.

friend class Parser [friend]

Definition at line 6403 of file Sema.h.


Member Data Documentation

When true, access checking violations are treated as SFINAE failures rather than hard errors.

Definition at line 3840 of file Sema.h.

Referenced by clang::Sema::SFINAETrap::SFINAETrap(), clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder(), and clang::Sema::SFINAETrap::~SFINAETrap().

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

Referenced by CheckFriendTypeDecl(), CheckTemplateSpecializationScope(), DiagnoseSelfAssignment(), clang::DiagnoseTwoPhaseLookup(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), isSFINAEContext(), makeUnavailableInSystemHeader(), PrintInstantiationStack(), SubstFunctionDeclType(), SubstParmTypes(), SubstType(), and clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().

Worker object for performing CFG-based warnings.

Definition at line 5106 of file Sema.h.

Referenced by PopFunctionScopeInfo(), and PrintStats().

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

Referenced by clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII(), FindInstantiatedDecl(), and clang::Sema::ArgumentPackSubstitutionIndexRAII::~ArgumentPackSubstitutionIndexRAII().

llvm::BumpPtrAllocator clang::Sema::BumpAlloc

Definition at line 620 of file Sema.h.

Referenced by addMethodToGlobalList(), CreateParsedType(), and PrintStats().

The stack of calls expression undergoing template instantiation.

The top of this stack is used by a fixit instantiating unresolved function calls to fix the AST to match the textual change it prints.

Definition at line 4931 of file Sema.h.

Code-completion consumer.

Definition at line 205 of file Sema.h.

Flag indicating whether or not to collect detailed statistics.

Definition at line 199 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings(), and clang::ParseAST().

Definition at line 193 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAtEnd(), ActOnClassMessage(), ActOnClassPropertyRefExpr(), ActOnCompatiblityAlias(), ActOnConversionDeclarator(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnExceptionDeclarator(), ActOnFileScopeAsmDecl(), ActOnFinishDelayedMemberInitializers(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnNamespaceAliasDef(), ActOnObjCBridgedCast(), ActOnObjCInstanceType(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaUnused(), ActOnPragmaWeakID(), ActOnPropertyImplDecl(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStaticAssertDeclaration(), ActOnSuperMessage(), ActOnTemplatedFriendTag(), ActOnUsingDirective(), AddAlignmentAttributesForRecord(), clang::AddBuiltinAssignmentOperatorCandidates(), AddCFAuditedAttribute(), AddCXXDirectInitializerToDecl(), AddFunctionCandidates(), AddMsStructLayoutForRecord(), AddOrdinaryNameResults(), AddOverloadCandidate(), AddPropertyAttrs(), AddPushedVisibilityAttribute(), AddSuperSendCompletion(), AdjustDestructorExceptionSpec(), AdjustFunctionParmAndArgTypesForDeduction(), AttachBaseSpecifiers(), BuildArrayType(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockDeclRefExpr(), BuildBlockPointerType(), BuildClassMessage(), BuildClassMessageImplicit(), BuildCStyleCastExpr(), BuildCXXCastArgument(), BuildCXXConstructExpr(), BuildCXXFunctionalCastExpr(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildExceptionDeclaration(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFunctionType(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildMemberInitializer(), BuildMemberPointerType(), BuildMemInitializer(), BuildObjCBridgedCast(), BuildObjCExceptionDecl(), BuildParenType(), BuildPointerType(), BuildQualifiedType(), BuildReferenceType(), BuildSingleCopyAssign(), BuildStdInitializerList(), BuildTypeofExprType(), BuildUnaryTransformType(), BuildUsingDeclaration(), BuildUsingShadowDecl(), clang::Sema::ImplicitExceptionSpecification::CalledExpr(), CastForMoving(), CastsAwayConstness(), CheckAddressOfOperand(), CheckARCMethodDecl(), CheckAsmLValue(), CheckBaseSpecifier(), checkBlockPointerTypesForAssignment(), checkBuiltinArgument(), CheckCaseExpression(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), CheckDerivedToBaseConversion(), CheckDestructor(), CheckDestructorDeclarator(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitlyDefaultedCopyAssignment(), CheckExplicitlyDefaultedCopyConstructor(), CheckExplicitlyDefaultedDefaultConstructor(), CheckExplicitlyDefaultedDestructor(), CheckExplicitlyDefaultedMoveAssignment(), CheckExplicitlyDefaultedMoveConstructor(), CheckExtVectorComponent(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckFriendTypeDecl(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), CheckLiteralOperatorDeclaration(), CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckObjCARCConversion(), CheckObjCARCUnavailableWeakConversion(), CheckObjCMethodOverride(), checkObjCPointerTypesForAssignment(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckRealImagOperand(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckUnaryTypeTraitTypeCompleteness(), checkUndefinedInternals(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CloneDesignatedInitExpr(), CollectFieldInitializer(), CollectIvarsToConstructOrDestruct(), clang::CompareDerivedToBaseConversions(), CompareMethodParamsInBaseAndSuper(), clang::CompareQualificationConversions(), CompareReferenceRelationship(), clang::CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), computeDeclContext(), ComputeDefaultedCopyAssignmentExceptionSpecAndConst(), ComputeDefaultedCopyCtorExceptionSpecAndConst(), ComputeDefaultedDefaultCtorExceptionSpec(), ComputeDefaultedDtorExceptionSpec(), ComputeDefaultedMoveAssignmentExceptionSpec(), ComputeDefaultedMoveCtorExceptionSpec(), ConvertDeclSpecToType(), ConvertDeducedTemplateArgument(), ConvertToIntegralOrEnumerationType(), CopyObject(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CreateFunctionRefExpr(), CreateNewFunctionDecl(), CreatePropertyDecl(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeclareInheritedConstructors(), DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineUsedVTables(), DelayDependentAccess(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseAssignmentResult(), DiagnoseBadAccess(), diagnoseBadCast(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseEqualityWithExtraParens(), DiagnoseInvalidRedeclaration(), DiagnoseNarrowingInInitList(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), clang::DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), DiagnoseUseOfUnimplementedSelectors(), doesUsualArrayDeleteWantSize(), EmitRelatedResultTypeNote(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), ExpandAnonymousFieldDesignator(), FindBaseInitializer(), findCapturingExpr(), FindInstantiatedDecl(), FindOverriddenMethod(), FinishArgumentPackDeduction(), FinishTemplateArgumentDeduction(), getAmbiguousPathsDisplayString(), getASTContext(), getCompletionPrintingPolicy(), GetDeclSpecTypeForDeclarator(), getDefaultedDefaultConstructorUnsafe(), getElaboratedType(), GetFullTypeForDeclarator(), getMessageSendResultType(), getObjCMessageKind(), getOrCreateStdNamespace(), getPrintingPolicy(), getStdBadAlloc(), getStdNamespace(), getTargetAttributesSema(), getTrivialTemplateArgumentLoc(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), GetTypeSourceInfoForDeclarator(), handleAcquireOrderAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArcWeakrefUnavailableAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallConvAttr(), handleCFTransferAttr(), handleCleanupAttr(), handleCommonAttr(), handleComplexFloatToComplexFloatConverstion(), handleComplexIntConversion(), handleConstantAttr(), handleConstAttr(), handleConstructorAttr(), handleDelayedForbiddenType(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), HandleExprPropertyRefExpr(), handleExtVectorTypeAttr(), handleFloatConversion(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleIBAction(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleIntegerConversion(), handleIntToFloatConversion(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMallocAttr(), handleMayAliasAttr(), HandleMBlazeInterruptHandlerAttr(), HandleMBlazeSaveVolatilesAttr(), handleModeAttr(), HandleMSP430InterruptAttr(), handleMsStructAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNothrowAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCExceptionAttr(), handleObjCGCTypeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresPropertyDefsAttr(), handleObjCReturnsInnerPointerAttr(), HandleOpenCLImageAccessAttribute(), handleOpenCLKernelAttr(), handleOtherComplexFloatConversion(), handleOverloadableAttr(), handleOwnershipAttr(), handlePackedAttr(), HandlePropertyInClassExtension(), handlePureAttr(), handleRegparmAttr(), handleReqdWorkGroupSize(), handleReturnsTwiceAttr(), handleSectionAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnavailableAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), hasDeducibleTemplateParameters(), ImpCastExprToType(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::InitializationSequence::InitializationSequence(), Initialize(), InjectAnonymousStructOrUnionMembers(), InstantiateAttrs(), InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isAcceptableNestedNameSpecifier(), isAtLeastAsSpecializedAs(), isExprCallable(), isForbiddenTypeAllowed(), IsProvablyNotDerivedFrom(), clang::IsStandardConversion(), clang::IsUserDefinedConversion(), isValidSubjectOfNSAttribute(), KnownName(), LookupBuiltin(), LookupDirect(), LookupMethodInReceiverType(), LookupVisibleDecls(), makeUnavailableInSystemHeader(), MarkBaseAndMemberDestructorsReferenced(), MarkDeclarationsReferencedInType(), MarkDeducedTemplateParameters(), MatchesFriend(), MatchTemplateParameterKind(), MatchTwoMethodDeclarations(), MaybeAddOverrideCalls(), maybeExtendBlockObject(), MergeVarDeclExceptionSpecs(), MightInstantiateTo(), ParseObjCEncodeExpression(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), PDiag(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformObjectArgumentInitialization(), PrintInstantiationStack(), ProcessPropertyDecl(), RebuildDeclaratorInCurrentInstantiation(), RequireCompleteDeclContext(), RequireCompleteType(), RequireNonAbstractType(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), SaveNestedNameSpecifierAnnotation(), Sema(), SetCtorInitializers(), SetDelegatingInitializer(), SetIvarInitializers(), SetParamDefaultArgument(), ShouldDeleteCopyAssignmentOperator(), ShouldDeleteDestructor(), ShouldDeleteMoveAssignmentOperator(), ShouldDeleteSpecialMember(), ShouldTryAgainWithRedefinitionType(), stripARCUnbridgedCast(), SubstBaseSpecifiers(), SubstFunctionDeclType(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), SubstType(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), translateTemplateArgument(), TryCaptureVar(), TryClassUnification(), TryConstCast(), clang::TryContextuallyConvertToBool(), clang::TryContextuallyConvertToObjCPointer(), TryDefaultInitialization(), TryDiagnoseProtectedAccess(), clang::TryImplicitConversion(), TryListConstructionSpecialCases(), clang::TryListConversion(), tryObjCWritebackConversion(), clang::TryObjectArgumentInitialization(), clang::TryReferenceInit(), TryReferenceInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::TryUserDefinedConversion(), TryValueInitialization(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitAccessSpecDecl(), clang::TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitLabelDecl(), clang::TemplateDeclInstantiator::VisitNamespaceAliasDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTypeParmDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::TemplateDeclInstantiator::VisitUsingDirectiveDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), WarnExactTypedMethods(), clang::ASTWriter::WriteAST(), ~Sema(), and clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().

CurContext - This is the current declaration context of parsing.

Definition at line 208 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAtEnd(), ActOnCompatiblityAlias(), ActOnCXXMemberDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFileScopeAsmDecl(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMethodDeclaration(), ActOnNamespaceAliasDef(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnStaticAssertDeclaration(), ActOnTemplatedFriendTag(), ActOnUsingDirective(), AddClassMessageCompletions(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverloadCandidate(), BuildBaseInitializer(), BuildCXXNestedNameSpecifier(), BuildExceptionDeclaration(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildMemberInitializer(), BuildObjCExceptionDecl(), BuildSingleCopyAssign(), BuildUsingDeclaration(), BuildUsingShadowDecl(), CheckAccess(), CheckExplicitInstantiationScope(), CheckFriendTypeDecl(), CheckInheritedConstructorUsingDecl(), CheckObjCDeclScope(), CheckTemplateSpecializationScope(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), clang::Sema::ContextRAII::ContextRAII(), CreateNewFunctionDecl(), clang::InitializationSequence::Diagnose(), DiagnoseInstanceReference(), clang::DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReference(), FindInstantiatedDecl(), getCurLexicalContext(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getFunctionLevelDeclContext(), getFunctionStorageClass(), getObjCContainerKind(), getObjCDeclContext(), HandlePropertyInClassExtension(), InstantiateMemInitializers(), isCurrentClassName(), IsPotentiallyEvaluatedContext(), isPropertyReadonly(), isSelfExpr(), LookupMethodInReceiverType(), makeUnavailableInSystemHeader(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkVTableUsed(), MaybeAddOverrideCalls(), clang::Sema::ContextRAII::pop(), shouldAddConstQualToVarRef(), shouldBuildBlockDeclRef(), ShouldEnterDeclaratorScope(), SubstParmVarDecl(), TryCaptureVar(), and clang::TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl().

The C++ "type_info" declaration, which is defined in <typeinfo>.

Definition at line 500 of file Sema.h.

All the overriding destructors seen during a class definition (there could be multiple due to nested classes) that had their exception spec checks delayed, plus the overridden destructor.

Definition at line 334 of file Sema.h.

Referenced by CheckOverridingFunctionExceptionSpec().

All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.

Definition at line 327 of file Sema.h.

Referenced by CheckDelegatingCtorCycles(), and SetDelegatingInitializer().

A list of all of the dynamic classes in this translation unit.

Definition at line 3632 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and CheckCompletedCXXClass().

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

Referenced by DiscardCleanupsInEvaluationContext(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().

ExprNeedsCleanups - True if the current evaluation context requires cleanups to be run at its conclusion.

Definition at line 229 of file Sema.h.

Referenced by BuildObjCBridgedCast(), CheckObjCARCConversion(), DiscardCleanupsInEvaluationContext(), maybeExtendBlockObject(), clang::InitializationSequence::Perform(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().

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

Referenced by CheckExtVectorComponent(), and handleExtVectorTypeAttr().

FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.

Definition at line 262 of file Sema.h.

Referenced by ActOnCXXMemberDeclarator(), ActOnFinishCXXMemberSpecification(), and Sema().

Definition at line 189 of file Sema.h.

Referenced by ActOnPragmaFPContract(), and getFPOptions().

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

Referenced by DiagRuntimeBehavior(), getCurBlock(), getCurFunction(), getCurLambda(), PopFunctionScopeInfo(), PushBlockScope(), PushFunctionScope(), PushLambdaScope(), Sema(), TryCaptureVar(), and ~Sema().

A flag to remember whether the implicit forms of operator new and delete have been declared.

Definition at line 507 of file Sema.h.

llvm::SmallPtrSet<NamedDecl *, 4> clang::Sema::HiddenDefinitions

The set of types for which we have already complained about the definitions being hidden.

This set is used to suppress redundant diagnostics.

Definition at line 259 of file Sema.h.

Referenced by RequireCompleteType().

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

Referenced by clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), isSFINAEContext(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

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

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

Definition at line 338 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and SetLateTemplateParser().

A mapping from external names to the most recent locally-scoped external declaration with that name.

This map contains external declarations introduced in local scoped, e.g.,

 void f() {
   void foo(int, int);
 }

Here, the name "foo" will be associated with the declaration on "foo" within f. This name is not visible outside of "f". However, we still find it in two cases:

  • If we are declaring another external with the name "foo", we can find "foo" as a previous declaration, so that the types of this external declaration can be checked for compatibility.
  • If we would implicitly declare "foo" (e.g., due to a call to "foo" in C when no prototype or definition is visible), then we find this declaration of "foo" and complain that it is not visible.

Definition at line 300 of file Sema.h.

llvm::SmallPtrSet<Expr*, 8> clang::Sema::MaybeODRUseExprs

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

Definition at line 652 of file Sema.h.

Referenced by AddClassMessageCompletions(), LookupImplementedMethodInGlobalPool(), and clang::ASTReader::ReadMethodPool().

Definition at line 222 of file Sema.h.

Referenced by ActOnPragmaMSStruct(), AddMsStructLayoutForRecord(), and ~Sema().

The MSVC "_GUID" struct, which is defined in MSVC header files.

Definition at line 503 of file Sema.h.

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

Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::Sema::InstantiatingTemplate::InstantiatingTemplate().

The number of SFINAE diagnostics that have been trapped.

Definition at line 623 of file Sema.h.

Referenced by clang::Sema::SFINAETrap::hasErrorOccurred(), PrintStats(), clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder(), and clang::Sema::SFINAETrap::~SFINAETrap().

A flag that is set when parsing a -dealloc method and no [super dealloc] call was found yet.

Definition at line 512 of file Sema.h.

Referenced by ActOnStartOfObjCMethodDef(), and ActOnSuperMessage().

A flag that is set when parsing a -finalize method and no [super finalize] call was found yet.

Definition at line 515 of file Sema.h.

Referenced by ActOnStartOfObjCMethodDef(), and ActOnSuperMessage().

Definition at line 339 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and SetLateTemplateParser().

Definition at line 188 of file Sema.h.

Referenced by getOpenCLOptions().

Generally null except when we temporarily switch decl contexts, like in.

See also:
ActOnObjCTemporaryExitContainerContext.

Definition at line 212 of file Sema.h.

Referenced by getCurLexicalContext().

PackContext - Manages the stack for #pragma pack. An alignment of 0 indicates default alignment.

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

Referenced by ActOnEndOfTranslationUnit().

The queue of implicit template instantiations that are required but have not yet been performed.

Definition at line 5120 of file Sema.h.

Referenced by DoMarkVarDeclReferenced(), InstantiateFunctionDefinition(), InstantiateStaticDataMemberDefinition(), MarkFunctionReferenced(), and PerformPendingInstantiations().

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

Referenced by MarkFunctionReferenced(), PerformPendingInstantiations(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

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

Referenced by DiagnoseAbstractType().

Method selectors used in a expression. Used for implementation of -Wselector.

Definition at line 656 of file Sema.h.

Referenced by DiagnoseUseOfUnimplementedSelectors(), and ParseObjCSelectorExpression().

A cache of special member function overload resolution results for C++ records.

Definition at line 609 of file Sema.h.

The C++ "std::bad_alloc" class, which is defined by the C++ standard library.

Definition at line 493 of file Sema.h.

Referenced by getStdBadAlloc().

The C++ "std::initializer_list" template, which is defined in <initializer_list>.

Definition at line 497 of file Sema.h.

Referenced by BuildStdInitializerList(), and isStdInitializerList().

The C++ "std" namespace, where the standard library resides.

Definition at line 489 of file Sema.h.

Referenced by ActOnStartNamespaceDef(), getOrCreateStdNamespace(), getStdNamespace(), and isStdInitializerList().

A flag to suppress access checking.

Definition at line 3836 of file Sema.h.

Referenced by CheckAccess().

llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> > clang::Sema::SuppressedDiagnostics

For each declaration that involved template argument deduction, the set of diagnostics that were suppressed during that template argument deduction.

FIXME: Serialize this structure to the AST file.

Definition at line 4939 of file Sema.h.

All the tentative definitions encountered in the TU.

Definition at line 311 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

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

Referenced by ActOnEndOfTranslationUnit().

The number of typos corrected by CorrectTypo.

Definition at line 5092 of file Sema.h.

UndefinedInternals - all the used, undefined objects with internal linkage in this translation unit.

Definition at line 643 of file Sema.h.

Referenced by checkUndefinedInternals(), MarkFunctionReferenced(), and MarkVarDeclODRUsed().

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

Referenced by SetParamDefaultArgument(), and SubstParmVarDecl().

A cache containing the results of typo correction for unqualified name lookup.

The string is the string that we corrected to (which may be empty, if there was no correction), while the boolean will be true when the string represents a keyword.

Definition at line 5103 of file Sema.h.

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

Referenced by ActOnEndOfTranslationUnit().

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

VisContext - Manages the stack for #pragma GCC visibility.

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

Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().

The list of vtables that are required but have not yet been materialized.

Definition at line 3615 of file Sema.h.

Referenced by DefineUsedVTables(), InstantiateFunctionDefinition(), InstantiateStaticDataMemberDefinition(), LoadExternalVTableUses(), and MarkVTableUsed().

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

Referenced by WeakTopLevelDecls().

WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared. rare. may alias another identifier, declared or undeclared

Definition at line 469 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), and LoadExternalWeakUndeclaredIdentifiers().


The documentation for this class was generated from the following files: