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...
struct  ActOnMemberAccessExtraArgs
class  ArgumentPackSubstitutionIndexRAII
 RAII object used to change the argument pack substitution index within a Sema object. More...
class  BoundTypeDiagnoser1
class  BoundTypeDiagnoser2
class  BoundTypeDiagnoser3
struct  CodeCompleteExpressionData
class  CompoundScopeRAII
 A RAII object to enter scope of a compound statement. More...
class  ContextRAII
 A RAII object to temporarily push a declaration context. More...
class  ContextualImplicitConverter
 Abstract base class used to perform a contextual implicit conversion from an expression to any type passing a filter. More...
class  CXXThisScopeRAII
 RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers on the current class type. More...
class  DelayedDiagnostics
class  DelayedDiagnosticsState
struct  ExpressionEvaluationContextRecord
 Data structure used to record current or nested expression evaluation contexts. More...
struct  FormatStringInfo
class  FPContractStateRAII
class  FullExprArg
class  ICEConvertDiagnoser
class  ImplicitExceptionSpecification
 Helper class that collects exception specifications for implicitly-declared special member functions. More...
struct  InstantiatingTemplate
 A stack object to be created when performing template instantiation. More...
struct  LateInstantiatedAttribute
class  NameClassification
struct  ObjCArgInfo
struct  OffsetOfComponent
struct  OriginalCallArg
 brief A function argument from which we performed template argument More...
struct  PragmaStack
class  SavePendingInstantiationsAndVTableUsesRAII
class  SavePendingLocalImplicitInstantiationsRAII
class  SemaDiagnosticBuilder
 Helper class that creates diagnostics with optional template instantiation stacks. More...
class  SFINAETrap
 RAII class used to determine whether SFINAE has trapped any errors that occur during template argument deduction. More...
class  SpecialMemberOverloadResult
class  SynthesizedFunctionScope
 RAII object to handle the state changes required to synthesize a function body. More...
class  TentativeAnalysisScope
 RAII class used to indicate that we are performing provisional semantic analysis to determine the validity of a construct, so typo-correction and diagnostics in the immediate context (not within implicitly-instantiated templates) should be suppressed. More...
struct  TypeDiagnoser
 Abstract class used to diagnose incomplete types. More...
struct  TypeTagData
struct  TypoExprState
class  VerifyICEDiagnoser
 Abstract base class used for diagnosing integer constant expression violations. More...

Public Types

enum  PragmaVtorDispKind { PVDK_Push, PVDK_Set, PVDK_Pop, PVDK_Reset }
enum  PragmaMsStackAction {
  PSK_Reset, PSK_Set, PSK_Push, PSK_Push_Set,
  PSK_Pop, PSK_Pop_Set
}
enum  ExpressionEvaluationContext {
  Unevaluated, UnevaluatedAbstract, ConstantEvaluated, PotentiallyEvaluated,
  PotentiallyEvaluatedIfUsed
}
 Describes how the expressions currently being parsed are evaluated at run-time, if at all. More...
enum  CXXSpecialMember {
  CXXDefaultConstructor, CXXCopyConstructor, CXXMoveConstructor, CXXCopyAssignment,
  CXXMoveAssignment, CXXDestructor, CXXInvalid
}
 Kinds of C++ special members. More...
enum  NameClassificationKind {
  NC_Unknown, NC_Error, NC_Keyword, NC_Type,
  NC_Expression, NC_NestedNameSpecifier, NC_TypeTemplate, NC_VarTemplate,
  NC_FunctionTemplate
}
 Describes the result of the name lookup and resolution performed by ClassifyName(). More...
enum  TagUseKind { TUK_Reference, TUK_Declaration, TUK_Definition, TUK_Friend }
enum  AvailabilityMergeKind { AMK_None, AMK_Redeclaration, AMK_Override }
 Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability"). More...
enum  AssignmentAction {
  AA_Assigning, AA_Passing, AA_Returning, AA_Converting,
  AA_Initializing, AA_Sending, AA_Casting, AA_Passing_CFAudited
}
enum  OverloadKind { Ovl_Overload, Ovl_Match, Ovl_NonFunction }
 C++ Overloading. More...
enum  CCEKind { CCEK_CaseValue, CCEK_Enumerator, CCEK_TemplateArg, CCEK_NewExpr }
 Contexts in which a converted constant expression is required. More...
enum  ObjCSubscriptKind { OS_Array, OS_Dictionary, OS_Error }
enum  ObjCLiteralKind {
  LK_Array, LK_Dictionary, LK_Numeric, LK_Boxed,
  LK_String, LK_Block, LK_None
}
enum  ForRangeStatus { FRS_Success, FRS_NoViableFunction, FRS_DiagnosticIssued }
enum  BeginEndFunction { BEF_begin, BEF_end }
enum  MethodMatchStrategy { MMS_loose, MMS_strict }
enum  BuildForRangeKind { BFRK_Build, BFRK_Rebuild, BFRK_Check }
enum  AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable }
enum  ReuseLambdaContextDecl_t { ReuseLambdaContextDecl }
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, AbstractIvarType, AbstractSynthesizedIvarType, AbstractArrayType
}
enum  TemplateParamListContext {
  TPC_ClassTemplate, TPC_VarTemplate, TPC_FunctionTemplate, TPC_ClassTemplateMember,
  TPC_FriendClassTemplate, 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, UPPC_Lambda, UPPC_Block
}
 The context in which an unexpanded parameter pack is being diagnosed. More...
enum  TemplateDeductionResult {
  TDK_Success = 0, TDK_Invalid, TDK_InstantiationDepth, TDK_Incomplete,
  TDK_Inconsistent, TDK_Underqualified, TDK_SubstitutionFailure, TDK_NonDeducedMismatch,
  TDK_TooManyArguments, TDK_TooFewArguments, TDK_InvalidExplicitArguments, TDK_FailedOverloadResolution,
  TDK_MiscellaneousDeductionFailure
}
 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  ResultTypeCompatibilityKind { RTC_Compatible, RTC_Incompatible, RTC_Unknown }
 Describes the compatibility of a result type with its method. 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  PragmaMSCommentKind {
  PCK_Unknown, PCK_Linker, PCK_Lib, PCK_Compiler,
  PCK_ExeStr, PCK_User
}
enum  PragmaSectionKind { PSK_DataSeg, PSK_BSSSeg, PSK_ConstSeg, PSK_CodeSeg }
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  VarArgKind {
  VAK_Valid, VAK_ValidInCXX11, VAK_Undefined, VAK_MSVCUndefined,
  VAK_Invalid
}
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,
  CFT_InvalidTarget
}
enum  FormatStringType {
  FST_Scanf, FST_Printf, FST_NSString, FST_Strftime,
  FST_Strfmon, FST_Kprintf, FST_Unknown
}
typedef OpaquePtr< DeclGroupRefDeclGroupPtrTy
typedef OpaquePtr< TemplateNameTemplateTy
typedef OpaquePtr< QualTypeTypeTy
typedef LazyVector
< TypedefNameDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadExtVectorDecls, 2, 2 > 
ExtVectorDeclsType
typedef llvm::SmallSetVector
< const NamedDecl *, 16 > 
NamedDeclSetType
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 llvm::DenseMap< const
FunctionDecl
*, LateParsedTemplate * > 
LateParsedTemplateMapT
typedef void LateTemplateParserCB (void *P, LateParsedTemplate &LPT)
 Callback to the parser to parse templated functions when needed.
typedef void LateTemplateParserCleanupCB (void *P)
typedef DelayedDiagnosticsState ParsingDeclState
typedef DelayedDiagnosticsState ProcessingContextState
typedef llvm::DenseMap
< ParmVarDecl
*, llvm::TinyPtrVector
< ParmVarDecl * > > 
UnparsedDefaultArgInstantiationsMap
typedef std::pair
< ObjCMethodList,
ObjCMethodList
GlobalMethods
typedef llvm::DenseMap
< Selector, GlobalMethods
GlobalMethodPool
typedef std::pair
< CXXRecordDecl
*, CXXSpecialMember
SpecialMemberDecl
typedef llvm::SmallPtrSet
< DeclContext *, 16 > 
AssociatedNamespaceSet
typedef llvm::SmallPtrSet
< CXXRecordDecl *, 16 > 
AssociatedClassSet
typedef llvm::SmallPtrSet
< Selector, 8 > 
SelectorSet
typedef llvm::DenseMap
< Selector, ObjCMethodDecl * > 
ProtocolsMethodsMap
typedef std::pair< StringRef,
QualType
CapturedParamNameType
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< Decl
*, SmallVector
< PartialDiagnosticAt, 1 > > 
SuppressedDiagnosticsMap
 For each declaration that involved template argument deduction, the set of diagnostics that were suppressed during that template argument deduction.
typedef llvm::DenseMap
< IdentifierInfo
*, TypoCorrection
UnqualifiedTyposCorrectedMap
typedef llvm::SmallSet
< SourceLocation, 2 > 
SrcLocSet
typedef llvm::DenseMap
< IdentifierInfo *, SrcLocSet
IdentifierSourceLocations
typedef std::pair< ValueDecl
*, SourceLocation
PendingImplicitInstantiation
 An entity for which implicit template instantiation is required.
typedef SmallVector
< LateInstantiatedAttribute, 16 > 
LateInstantiatedAttrVec
typedef std::pair< const
IdentifierInfo *, uint64_t > 
TypeTagMagicValue

Public Member Functions

NamedDeclfindLocallyScopedExternCDecl (DeclarationName Name)
 Look for a locally scoped extern "C" declaration by the given name.
void SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
void LoadExternalWeakUndeclaredIdentifiers ()
 Load weak undeclared identifiers from the external source.
MangleNumberingContextgetCurrentMangleNumberContext (const DeclContext *DC, Decl *&ManglingContextDecl)
 Compute the mangling number context for a lambda expression or block literal.
void getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
 Obtain a sorted list of functions that are undefined but ODR-used.
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'.
bool isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)
void EmitCurrentDiagnostic (unsigned DiagID)
 Cause the active diagnostic on the DiagosticsEngine to be emitted. This is closely coupled to the SemaDiagnosticBuilder class and should not be used elsewhere.
void addImplicitTypedef (StringRef Name, QualType T)
 Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr)
 ~Sema ()
void Initialize ()
 Perform initialization that occurs after the parser has been initialized but before it parses anything.
const LangOptionsgetLangOpts () const
OpenCLOptionsgetOpenCLOptions ()
FPOptionsgetFPOptions ()
DiagnosticsEnginegetDiagnostics () const
SourceManagergetSourceManager () const
PreprocessorgetPreprocessor () const
ASTContextgetASTContext () const
ASTConsumergetASTConsumer () const
ASTMutationListenergetASTMutationListener () const
ExternalSemaSourcegetExternalSource () const
void addExternalSource (ExternalSemaSource *E)
 Registers an external source. If an external source already exists, creates a multiplex external source and appends to it.
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.
std::string getFixItZeroInitializerForType (QualType T, SourceLocation Loc) const
 Get a string to suggest for zero-initialization of a type.
std::string getFixItZeroLiteralForType (QualType T, SourceLocation Loc) const
SourceLocation getLocForEndOfToken (SourceLocation Loc, unsigned Offset=0)
 Calls Lexer::getLocForEndOfToken()
ModuleLoadergetModuleLoader () const
 Retrieve the module loader associated with the preprocessor.
void emitAndClearUnusedLocalTypedefWarnings ()
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)
sema::LambdaScopeInfoPushLambdaScope ()
void RecordParsingTemplateParameterDepth (unsigned Depth)
 This is used to inform Sema what the current TemplateParameterDepth is during Parsing. Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.
void PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K)
void PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, const BlockExpr *blkExpr=nullptr)
sema::FunctionScopeInfogetCurFunction () const
sema::FunctionScopeInfogetEnclosingFunction () const
template<typename ExprT >
void recordUseOfEvaluatedWeak (const ExprT *E, bool IsRead=true)
void PushCompoundScope ()
void PopCompoundScope ()
sema::CompoundScopeInfogetCurCompoundScope () 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 scope info, if any.
sema::LambdaScopeInfogetCurGenericLambda ()
 Retrieve the current generic lambda info, if any.
sema::CapturedRegionScopeInfogetCurCapturedRegion ()
 Retrieve the current captured region, if any.
SmallVectorImpl< Decl * > & WeakTopLevelDecls ()
 WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
void ActOnComment (SourceRange Comment)
QualType BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
QualType BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVRA, const DeclSpec *DS=nullptr)
QualType BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a pointer type.
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.
bool CheckFunctionReturnType (QualType T, SourceLocation Loc)
QualType BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
 Build a function type.
QualType BuildMemberPointerType (QualType T, 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.
CanThrowResult canThrow (const Expr *E)
const FunctionProtoTypeResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT)
void UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
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=nullptr, bool *MissingEmptyExceptionSpecification=nullptr, 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, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a complete type.
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename T1 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
bool RequireCompleteExprType (Expr *E, TypeDiagnoser &Diagnoser)
 Ensure that the type of the given expression is complete.
bool RequireCompleteExprType (Expr *E, unsigned DiagID)
template<typename T1 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
bool RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a literal type.
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename T1 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
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=nullptr)
void DiagnoseUseOfUnimplementedSelectors ()
bool isSimpleTypeSpecifier (tok::TokenKind Kind) const
 Determine whether the token kind starts a simple-type-specifier.
ParsedType getTypeName (const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=ParsedType(), bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, IdentifierInfo **CorrectedII=nullptr)
 If the identifier refers to a type name within this scope, return the declaration of that type.
TypeSpecifierType isTagName (IdentifierInfo &II, Scope *S)
bool isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S)
void DiagnoseUnknownTypeName (IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool AllowClassTemplates=false)
ParsedType ActOnDelayedDefaultTemplateArg (const IdentifierInfo &II, SourceLocation NameLoc)
 For compatibility with MSVC, we delay parsing of some default template type arguments until instantiation time. Emits a warning and returns a synthesized DependentNameType that isn't really dependent on any other template arguments.
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, bool IsAddressOfOperand, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr)
 Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
DeclActOnDeclarator (Scope *S, Declarator &D)
NamedDeclHandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
void RegisterLocallyScopedExternCDecl (NamedDecl *ND, Scope *S)
 Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations. We include any extern "C" declaration that is not visible in the translation unit here, not just function-scope declarations.
bool DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info)
bool diagnoseQualifiedDeclaration (CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc)
 Diagnose a declaration whose declarator-id has the given nested-name-specifier.
void diagnoseIgnoredQualifiers (unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation())
void DiagnoseFunctionSpecifiers (const DeclSpec &DS)
 Diagnose function specifiers on a declaration of an identifier that does not identify a function.
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 &AddToScope)
bool CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
 Perform semantic checking on a newly-created variable declaration.
void CheckVariableDeclarationType (VarDecl *NewVD)
void CheckCompleteVariableDeclaration (VarDecl *var)
void MaybeSuggestAddingStaticToDecl (const FunctionDecl *D)
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)
bool CheckConstexprFunctionBody (const FunctionDecl *FD, Stmt *Body)
void DiagnoseHiddenVirtualMethods (CXXMethodDecl *MD)
 Diagnose methods which overload virtual methods in a base class without overriding any.
void FindHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
 Check if a method overloads virtual methods in a base class without overriding any.
void NoteHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
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)
void CheckMSVCRTEntryPoint (FunctionDecl *FD)
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)
void ActOnParamDefaultArgument (Decl *param, SourceLocation EqualLoc, Expr *defarg)
void ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
void ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc)
bool SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto)
void ActOnUninitializedDecl (Decl *dcl, bool TypeMayContainAuto)
void ActOnInitializerError (Decl *Dcl)
void ActOnCXXForRangeDecl (Decl *D)
StmtResult ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs, SourceLocation AttrEnd)
void SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
void SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
void FinalizeDeclaration (Decl *D)
DeclGroupPtrTy FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
DeclGroupPtrTy BuildDeclaratorGroup (MutableArrayRef< Decl * > Group, bool TypeMayContainAuto=true)
void ActOnDocumentableDecl (Decl *D)
void ActOnDocumentableDecls (ArrayRef< Decl * > Group)
void ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr)
DeclActOnStartOfFunctionDef (Scope *S, Declarator &D)
DeclActOnStartOfFunctionDef (Scope *S, Decl *D)
void ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
bool isObjCMethodDecl (Decl *D)
bool canDelayFunctionBody (const Declarator &D)
 Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function.
bool canSkipFunctionBody (Decl *D)
 Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function.
void computeNRVO (Stmt *Body, sema::FunctionScopeInfo *Scope)
 Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body)
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation)
DeclActOnSkippedFunctionBody (Decl *Decl)
void ActOnFinishInlineMethodDef (CXXMethodDecl *D)
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)
DeclActOnEmptyDeclaration (Scope *S, AttributeList *AttrList, SourceLocation SemiLoc)
 Handle a C++11 empty-declaration and attribute-declaration.
DeclResult ActOnModuleImport (SourceLocation AtLoc, SourceLocation ImportLoc, ModuleIdPath Path)
 The parser has processed a module import declaration.
void ActOnModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
 The parser has processed a module import translated from a #include or similar preprocessing directive.
void createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod)
 Create an implicit import of the given module at the given source location, for error recovery, if possible.
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, bool IsExplicitInstantiation=false)
DeclBuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
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, bool IsTypeSpecifier)
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, InClassInitStyle InitStyle, AccessSpecifier AS)
MSPropertyDeclHandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, AttributeList *MSPropertyAttr)
FieldDeclCheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
 Build a new FieldDecl and check its well-formedness.
bool CheckNontrivialField (FieldDecl *FD)
void DiagnoseNontrivial (const CXXRecordDecl *Record, CXXSpecialMember CSM)
bool SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
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, 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, bool IsFinalSpelledSealed, 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)
bool CheckEnumUnderlyingType (TypeSourceInfo *TI)
 Check that this is a valid underlying type for an enum declaration.
bool CheckEnumRedeclaration (SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, const EnumDecl *Prev)
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, ArrayRef< Decl * > Elements, 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=nullptr, bool AllowInlineNamespace=false)
TypedefDeclParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
 Subroutines of ActOnDeclarator().
bool isIncompatibleTypedef (TypeDecl *Old, TypedefNameDecl *New)
AvailabilityAttr * mergeAvailabilityAttr (NamedDecl *D, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool Override, unsigned AttrSpellingListIndex)
 Attribute merging methods. Return true if a new attribute was added.
TypeVisibilityAttr * mergeTypeVisibilityAttr (Decl *D, SourceRange Range, TypeVisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
VisibilityAttr * mergeVisibilityAttr (Decl *D, SourceRange Range, VisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
DLLImportAttr * mergeDLLImportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
DLLExportAttr * mergeDLLExportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
MSInheritanceAttr * mergeMSInheritanceAttr (Decl *D, SourceRange Range, bool BestCase, unsigned AttrSpellingListIndex, MSInheritanceAttr::Spelling SemanticSpelling)
FormatAttr * mergeFormatAttr (Decl *D, SourceRange Range, IdentifierInfo *Format, int FormatIdx, int FirstArg, unsigned AttrSpellingListIndex)
SectionAttr * mergeSectionAttr (Decl *D, SourceRange Range, StringRef Name, unsigned AttrSpellingListIndex)
void mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
 mergeDeclAttributes - Copy attributes from the Old decl to the New one.
void MergeTypedefNameDecl (TypedefNameDecl *New, LookupResult &OldDecls)
bool MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
bool MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
 Completes the merge of two function declarations that are known to be compatible.
void mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old)
void MergeVarDecl (VarDecl *New, LookupResult &Previous)
void MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
void MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
 Merge the exception specifications of two variable declarations.
bool MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old, Scope *S)
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 FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
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)
bool isSameOrCompatibleFunctionType (CanQualType Param, CanQualType Arg)
 Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions). If any of parameter and argument is not a function, just perform type comparison.
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, bool AllowExplicit=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 PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
 Perform a contextual implicit conversion.
ObjCSubscriptKind CheckSubscriptingKind (Expr *FromE)
ObjCLiteralKind CheckLiteralKind (Expr *FromE)
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, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=false)
void AddFunctionCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 Add all of the function declarations in the given function set to the overload candidate set.
void AddMethodCandidate (DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false)
void AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
void AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, 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, ArrayRef< Expr * > Args, 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, bool AllowObjCConversionOnExplicit)
void AddTemplateConversionCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit)
 Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]).
void AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
void AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, SourceRange OpRange=SourceRange())
 Add overload candidates for overloaded operators that are member functions.
void AddBuiltinCandidate (QualType ResultTy, QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
void AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
void AddArgumentDependentLookupCandidates (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add function candidates found via argument-dependent lookup to the set of overloading candidates.
void NoteOverloadCandidate (FunctionDecl *Fn, QualType DestType=QualType())
void NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType())
EnableIfAttr * CheckEnableIf (FunctionDecl *Function, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
QualType ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
FunctionDeclResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
FunctionDeclResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
 Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.
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, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
ForRangeStatus BuildForRangeBeginEndCall (Scope *S, SourceLocation Loc, SourceLocation RangeLoc, VarDecl *Decl, BeginEndFunction BEF, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
ExprResult BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true)
bool buildOverloadedCallSet (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
 Constructs and populates an OverloadedCandidateSet from the given function.
ExprResult 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, MultiExprArg Args, SourceLocation RParenLoc)
ExprResult BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
ExprResult BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
bool CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
bool CheckParmsForFunctionDef (ParmVarDecl *const *Param, ParmVarDecl *const *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 ProcessPragmaWeak (Scope *S, Decl *D)
void ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD)
void ProcessDeclAttributeList (Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true)
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const AttributeList *AttrList)
void checkUnusedDeclAttributes (Declarator &D)
bool isValidPointerAttrType (QualType T, bool RefOkay=false)
bool CheckRegparmAttr (const AttributeList &attr, unsigned &value)
bool CheckCallingConvAttr (const AttributeList &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
bool CheckNoReturnAttr (const AttributeList &attr)
bool checkStringLiteralArgumentAttr (const AttributeList &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument ArgNum of Attr is a ASCII string literal. If not emit an error and return false. If the argument is an identifier it will emit an error with a fixit hint and treat it as if it was a string literal.
bool checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceAttr::Spelling SemanticSpelling)
void CheckAlignasUnderalignment (Decl *D)
void adjustMemberFunctionCC (QualType &T, bool IsStatic)
bool hasExplicitCallingConv (QualType &T)
const AttributedTypegetCallingConvAttributedType (QualType T) const
StmtResult ProcessStmtAttributes (Stmt *Stmt, AttributeList *Attrs, SourceRange Range)
 Stmt attributes - this routine is the top level dispatcher.
void WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
void CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
void WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
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, bool SynthesizeProperties)
void DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
 Default synthesizes all properties which must be synthesized in class's @implementation.
void DefaultSynthesizeProperties (Scope *S, Decl *D)
bool IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
void DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD)
ObjCIvarDeclGetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
ObjCPropertyDeclHandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, 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, SourceLocation LParenLoc, 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=nullptr)
void AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl)
void DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D)
void DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
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 WarnCategoryMethodImpl=false)
void CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP)
void addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
 Add the given method to the list of globally-known methods.
bool CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool instance)
 
  • Returns instance or factory methods in global method pool for given selector. If no such method or only one method found, function returns false; otherwise, it returns true

bool AreMultipleMethodsInGlobalPool (Selector Sel, bool instance)
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)
const ObjCMethodDeclSelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType())
ObjCMethodDeclLookupImplementedMethodInGlobalPool (Selector Sel)
void CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
FullExprArg MakeFullExpr (Expr *Arg)
FullExprArg MakeFullExpr (Expr *Arg, SourceLocation CC)
FullExprArg MakeFullDiscardedValueExpr (Expr *Arg)
StmtResult ActOnExprStmt (ExprResult Arg)
StmtResult ActOnExprStmtError ()
StmtResult ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
void ActOnStartOfCompoundStmt ()
void ActOnFinishOfCompoundStmt ()
StmtResult ActOnCompoundStmt (SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
StmtResult ActOnDeclStmt (DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
void ActOnForEachDeclStmt (DeclGroupPtrTy Decl)
StmtResult ActOnForEachLValueExpr (Expr *E)
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 ActOnAttributedStmt (SourceLocation AttrLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
StmtResult ActOnIfStmt (SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, Expr *Cond, Decl *CondVar)
StmtResult ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
StmtResult ActOnWhileStmt (SourceLocation WhileLoc, FullExprArg Cond, Decl *CondVar, Stmt *Body)
StmtResult ActOnDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
StmtResult ActOnForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, FullExprArg Second, Decl *SecondVar, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
ExprResult CheckObjCForCollectionOperand (SourceLocation forLoc, Expr *collection)
StmtResult ActOnObjCForCollectionStmt (SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
StmtResult FinishObjCForCollectionStmt (Stmt *ForCollection, Stmt *Body)
StmtResult ActOnCXXForRangeStmt (SourceLocation ForLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
StmtResult BuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *BeginEndDecl, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
 BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
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 BreakLoc, Scope *CurScope)
void ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
void ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, ArrayRef< CapturedParamNameType > Params)
StmtResult ActOnCapturedRegionEnd (Stmt *S)
void ActOnCapturedRegionError ()
RecordDeclCreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
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.
bool isCopyElisionCandidate (QualType ReturnType, const VarDecl *VD, bool AllowFunctionParameters)
StmtResult ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
StmtResult BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc)
ExprResult LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, llvm::InlineAsmIdentifierInfo &Info, bool IsUnevaluatedContext)
bool LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
StmtResult ActOnMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
LabelDeclGetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
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, ArrayRef< Stmt * > 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)
StmtResult ActOnSEHLeaveStmt (SourceLocation Loc, Scope *CurScope)
void DiagnoseReturnInConstructorExceptionHandler (CXXTryStmt *TryBlock)
bool ShouldWarnIfUnusedFileScopedDecl (const DeclaratorDecl *D) const
void MarkUnusedFileScopedDecl (const DeclaratorDecl *D)
 If it's a file scoped decl that must warn if not used, keep track of it.
void DiagnoseUnusedExprResult (const Stmt *S)
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D)
void DiagnoseUnusedDecl (const NamedDecl *ND)
void DiagnoseEmptyStmtBody (SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
void DiagnoseEmptyLoopBody (const Stmt *S, const Stmt *PossibleBody)
ParsingDeclState PushParsingDeclaration (sema::DelayedDiagnosticPool &pool)
void PopParsingDeclaration (ParsingDeclState state, Decl *decl)
ParsingClassState PushParsingClass ()
void PopParsingClass (ParsingClassState state)
void redelayDiagnostics (sema::DelayedDiagnosticPool &pool)
void EmitAvailabilityWarning (AvailabilityDiagnostic AD, NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess)
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=nullptr, bool ObjCPropertyAccess=false)
 Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
void NoteDeletedFunction (FunctionDecl *FD)
 Emit a note explaining that this function is deleted.
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, ArrayRef< Expr * > Args)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, bool IsDecltype=false)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, bool IsDecltype=false)
void PopExpressionEvaluationContext ()
void DiscardCleanupsInEvaluationContext ()
ExprResult TransformToPotentiallyEvaluated (Expr *E)
ExprResult HandleExprEvaluationContextForTypeof (Expr *E)
ExprResult ActOnConstantExpression (ExprResult Res)
void MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool OdrUse)
 Perform marking for a reference to an arbitrary declaration. It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building a normal expression which refers to a variable.
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func, bool OdrUse=true)
 Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
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 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 ()
bool tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
 Try to capture the given variable.
bool tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation())
 Try to capture the given variable.
QualType getCapturedDeclRefType (VarDecl *Var, SourceLocation Loc)
 Given a variable, determine the type that a reference to that variable will have in the given scope.
void MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T)
void MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false)
 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)=nullptr)
 Try to recover by turning the given expression into a call. Returns true if recovery was attempted or an error was emitted; this may also leave the ExprResult invalid.
bool tryExprAsCall (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, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr, bool IsInlineAsmIdentifier=false)
void DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, std::unique_ptr< CorrectionCandidateCallback > CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None)
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=nullptr)
ExprResult BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr)
ExprResult BuildAnonymousStructUnionMemberReference (const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
ExprResult BuildPossibleImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs)
 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, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI=nullptr)
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, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr)
 Complete semantic analysis for a reference to the given declaration.
ExprResult BuildLiteralOperatorCall (LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
ExprResult BuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentType IT)
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
bool CheckLoopHintExpr (Expr *E, SourceLocation Loc)
ExprResult ActOnNumericConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult ActOnCharacterConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E)
ExprResult ActOnParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val)
ExprResult ActOnStringLiteral (ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
ExprResult ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
ExprResult CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
ExprResult CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
ExprResult BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
ExprResult ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
QualType CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc)
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 constraints 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, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool SuppressQualifierCheck=false, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult PerformMemberExprBaseConversion (Expr *Base, bool IsArrow)
 Perform conversions on the LHS of a member access expression.
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, ArrayRef< Expr * > Args, 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=nullptr, bool IsExecConfig=false)
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, 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".
void ActOnStartStmtExpr ()
ExprResult ActOnStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
void ActOnStmtExprError ()
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 (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
void ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope)
ExprResult ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ExprResult ActOnConvertVectorExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_convertvector(...)
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, UsingShadowDecl *&PrevShadow)
UsingShadowDeclBuildUsingShadowDecl (Scope *S, UsingDecl *UD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
 Builds a shadow declaration corresponding to a 'using' declaration.
bool CheckUsingDeclRedeclaration (SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
bool CheckUsingDeclQualifier (SourceLocation UsingLoc, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc)
NamedDeclBuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, AttributeList *AttrList, bool IsInstantiation, bool HasTypenameKeyword, SourceLocation TypenameLoc)
bool CheckInheritingConstructorUsingDecl (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 HasTypenameKeyword, SourceLocation TypenameLoc)
DeclActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, AttributeList *AttrList, TypeResult Type)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
void FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
ImplicitExceptionSpecification ComputeDefaultedDefaultCtorExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted copy constructor of a class will have.
ImplicitExceptionSpecification ComputeDefaultedCopyCtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const.
ImplicitExceptionSpecification ComputeDefaultedCopyAssignmentExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defautled copy assignment operator of a class will have, and whether the parameter will be const.
ImplicitExceptionSpecification ComputeDefaultedMoveCtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted move constructor of a class will have.
ImplicitExceptionSpecification ComputeDefaultedMoveAssignmentExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted move assignment operator of a class will have.
ImplicitExceptionSpecification ComputeDefaultedDtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted destructor of a class will have.
ImplicitExceptionSpecification ComputeInheritingCtorExceptionSpec (CXXConstructorDecl *CD)
 Determine what sort of exception specification an inheriting constructor of a class will have.
void EvaluateImplicitExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD)
 Evaluate the implicit exception specification for a defaulted special member function.
void checkExceptionSpecification (bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
 Check the given exception-specification and update the exception specification information with the results.
bool isLibstdcxxEagerExceptionSpecHack (const Declarator &D)
 Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification to work around a libstdc++ bug.
void actOnDelayedExceptionSpecification (Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
 Add an exception-specification to the given member function (or member function template). The exception-specification was parsed after the method itself was declared.
bool ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
 Determine if a special member function should have a deleted definition when it is defaulted.
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 DeclareInheritingConstructors (CXXRecordDecl *ClassDecl)
 Declare all inheriting constructors for the given class.
void DefineInheritingConstructor (SourceLocation UseLoc, CXXConstructorDecl *Constructor)
 Define the specified inheriting constructor.
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.
bool isImplicitlyDeleted (FunctionDecl *FD)
 Determine whether the given function is an implicitly-deleted special member function.
bool checkThisInStaticMemberFunctionType (CXXMethodDecl *Method)
 Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.
bool checkThisInStaticMemberFunctionExceptionSpec (CXXMethodDecl *Method)
 Whether this' shows up in the exception specification of a static member function.
bool checkThisInStaticMemberFunctionAttributes (CXXMethodDecl *Method)
 Check whether 'this' shows up in the attributes of the given static member function.
ExprResult MaybeBindToTemporary (Expr *E)
bool CompleteConstructorCall (CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
 Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor.
ParsedType getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
 Handle the result of the special case name lookup for inheriting constructor declarations. 'NS::X::X' and 'NS::X<...>X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.
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 ActOnCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
 Handle a C++1z fold-expression: ( expr op ... op expr ).
ExprResult BuildCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
ExprResult BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
ExprResult ActOnCXXThis (SourceLocation loc)
QualType getCurrentThisType ()
 Try to retrieve the type of the 'this' pointer.
bool CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr)
 Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.
bool isThisOutsideMemberFunctionBody (QualType BaseType)
 Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.
ExprResult ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnCXXBoolLiteral - Parse {true,false} literals.
ExprResult ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} 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, Expr *Initializer)
 ActOnCXXNew - Parsed a C++ 'new' expression.
ExprResult BuildCXXNew (SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Expr *ArraySize, SourceRange DirectInitRange, Expr *Initializer, bool TypeMayContainAuto=true)
bool CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R)
 Checks that a type is suitable as the allocated type in a new-expression.
bool FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, bool UseGlobal, QualType AllocType, bool IsArray, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete)
bool FindAllocationOverload (SourceLocation StartLoc, SourceRange Range, DeclarationName Name, MultiExprArg Args, DeclContext *Ctx, bool AllowMissing, FunctionDecl *&Operator, bool Diagnose=true)
 Find an fitting overload for the allocation function in the specified scope.
void DeclareGlobalNewDelete ()
void DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, QualType Param1, QualType Param2=QualType(), bool addMallocAttr=false)
bool FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
FunctionDeclFindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, DeclarationName Name)
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 ActOnTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
 Parsed one of the type trait support pseudo-functions.
ExprResult BuildTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
ExprResult ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
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)
ExprResult ActOnFinishFullExpr (Expr *Expr, SourceLocation CC, bool DiscardedValue=false, bool IsConstexpr=false, bool IsLambdaInitCaptureInitializer=false)
StmtResult ActOnFinishFullStmt (Stmt *Stmt)
bool RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC)
 Require that the context specified by SS be complete.
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 ActOnCXXGlobalScopeSpecifier (SourceLocation CCLoc, CXXScopeSpec &SS)
 The parser has parsed a global nested-name-specifier '::'.
bool ActOnSuperScopeSpecifier (SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
 The parser has parsed a '__super' nested-name-specifier.
bool isAcceptableNestedNameSpecifier (const NamedDecl *SD)
 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, bool *IsCorrectedToColon=nullptr)
 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, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr)
 The parser has parsed a nested-name-specifier 'identifier::'.
ExprResult ActOnDecltypeExpression (Expr *E)
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 TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, SourceLocation CCLoc, bool EnteringContext)
 The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'.
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)
CXXRecordDeclcreateLambdaClosureType (SourceRange IntroducerRange, TypeSourceInfo *Info, bool KnownDependent, LambdaCaptureDefault CaptureDefault)
 Create a new lambda closure type.
CXXMethodDeclstartLambdaDefinition (CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params)
 Start the definition of a lambda expression.
void buildLambdaScope (sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
 Endow the lambda scope info with the relevant properties.
QualType performLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, IdentifierInfo *Id, Expr *&Init)
 Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference.
VarDeclcreateLambdaInitCaptureVarDecl (SourceLocation Loc, QualType InitCaptureType, IdentifierInfo *Id, Expr *Init)
 Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.
FieldDeclbuildInitCaptureField (sema::LambdaScopeInfo *LSI, VarDecl *Var)
 Build the implicit field for an init-capture.
void finishLambdaExplicitCaptures (sema::LambdaScopeInfo *LSI)
 Note that we have finished the explicit captures for the given lambda.
void addLambdaParameters (CXXMethodDecl *CallOperator, Scope *CurScope)
 Introduce the lambda parameters into scope.
void deduceClosureReturnType (sema::CapturingScopeInfo &CSI)
 Deduce a block or lambda's return type based on the return statements present in the body.
void ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
void ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
ExprResult ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope, bool IsInstantiation=false)
void DefineImplicitLambdaToFunctionPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a function pointer.
void DefineImplicitLambdaToBlockPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a block pointer.
ExprResult BuildBlockForLambdaConversion (SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
ExprResult ParseObjCStringLiteral (SourceLocation *AtLocs, Expr **Strings, unsigned NumStrings)
ExprResult BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S)
ExprResult BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number)
ExprResult ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value)
ExprResult BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements)
ExprResult BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
ExprResult BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
ExprResult BuildObjCDictionaryLiteral (SourceRange SR, ObjCDictionaryElement *Elements, unsigned NumElements)
ExprResult BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
ExprResult BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *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, bool WarnMultipleSelectors)
 ParseObjCSelectorExpression - Build selector expression for @selector.
ExprResult ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
 ParseObjCProtocolExpression - Build protocol expression for @protocol.
DeclActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
DeclActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
bool isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
bool isCurrentClassNameTypo (IdentifierInfo *&II, const CXXScopeSpec *SS)
 Determine whether the identifier II is a typo for the name of the class type currently being defined. If so, update it to the identifier that should have been used.
bool ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, AttributeList *Attrs=nullptr)
 ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
NamedDeclActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
void ActOnStartCXXInClassMemberInitializer ()
 Enter a new C++ default initializer scope. After calling this, the caller must call ActOnFinishCXXInClassMemberInitializer, even if parsing or instantiating the initializer failed.
void ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
 This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. Such actions are deferred until the class is complete.
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using parentheses syntax.
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using braced-init-list syntax.
MemInitResult BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
 Handle a C++ member initializer.
MemInitResult BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
MemInitResult BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
MemInitResult BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
bool SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
bool SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None)
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 MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD)
 Mark the exception specifications of all virtual member functions in the given class as needed.
void MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD)
bool 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, ArrayRef< CXXCtorInitializer * > MemInits, 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 ActOnFinishCXXMemberDecls ()
 Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.
void ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param)
unsigned ActOnReenterTemplateScope (Scope *S, Decl *Template)
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, Decl *FnD, CachedTokens &Toks)
void UnmarkAsLateParsedTemplate (FunctionDecl *FD)
bool IsInsideALocalClassWithinATemplateFunction ()
DeclActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
DeclBuildStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
FriendDeclCheckFriendTypeDecl (SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
 Perform semantic analysis of the given friend type declaration.
DeclActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
NamedDeclActOnFriendFunctionDecl (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 CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD)
void CheckExplicitlyDefaultedMemberExceptionSpec (CXXMethodDecl *MD, const FunctionProtoType *T)
void CheckDelayedMemberExceptionSpecs ()
CXXBaseSpecifierCheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
 ActOnBaseSpecifier - Parsed a base specifier.
BaseResult ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, ParsedAttributes &Attrs, 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=nullptr, 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 CheckOverridingFunctionAttributes (const CXXMethodDecl *New, const CXXMethodDecl *Old)
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 (NamedDecl *D)
 CheckOverrideControl - Check C++11 override control semantics.
void DiagnoseAbsenceOfOverrideControl (NamedDecl *D)
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, const InitializedEntity &Entity, AccessSpecifier Access, const PartialDiagnostic &PDiag)
 Checks access to a constructor.
AccessResult CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
AccessResult CheckFriendAccess (NamedDecl *D)
 Checks access to the target of a friend declaration.
AccessResult CheckMemberAccess (SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
 Checks access to a member.
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)
bool isSpecialMemberAccessibleForDeletion (CXXMethodDecl *decl, AccessSpecifier access, QualType objectType)
void HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
void PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
void HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool RequireNonAbstractType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
template<typename T1 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
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 AllowFunctionTemplates=true)
bool hasAnyAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true)
void LookupTemplateName (LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization)
TemplateNameKind isTemplateName (Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization)
bool DiagnoseUnknownTemplateName (const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
void DiagnoseTemplateParameterShadow (SourceLocation Loc, Decl *PrevDecl)
TemplateDeclAdjustDeclIfTemplate (Decl *&Decl)
DeclActOnTypeParameter (Scope *S, bool Typename, 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, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsExplicitSpecialization, bool &Invalid)
 Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name.
DeclResult CheckClassTemplate (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists)
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>.
DeclResult ActOnVarTemplateSpecialization (Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
DeclResult CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
ExprResult CheckVarTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, VarTemplateDecl *Template, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildTemplateIdExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildQualifiedTemplateIdExpr (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
TemplateNameKind ActOnDependentTemplateName (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template)
 Form a dependent template name.
DeclResult ActOnClassTemplateSpecialization (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, TemplateIdAnnotation &TemplateId, 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.
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, bool &HasDefaultArg)
 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, 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)
 Check that the given template arguments can be be provided to the given template, converting the arguments along the way.
bool CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
bool CheckTemplateArgument (TemplateTypeParmDecl *Param, TypeSourceInfo *Arg)
 Check a template argument against its corresponding template type parameter.
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, TemplateArgumentLoc &Arg, unsigned ArgumentPackIndex)
 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 TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc)
 Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>".
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)
bool isUnexpandedParameterPackPermitted ()
 Determine whether it's possible for an unexpanded parameter pack to be valid in this location. This only happens when we're in a declaration that is nested within an expression that could be expanded, such as a lambda-expression within a function call.
bool DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
 Diagnose unexpanded parameter packs.
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
 If the given type contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression)
 If the given expression contains an unexpanded parameter pack, diagnose the error.
bool 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, Optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
QualType CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, 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, Optional< unsigned > NumExpansions)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
bool CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
 Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.
Optional< unsignedgetNumArgumentsInExpansion (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.
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
 Returns the pattern of the pack expansion for a template argument.
QualType adjustCCAndNoReturn (QualType ArgFunctionType, QualType FunctionType)
TemplateDeductionResult DeduceTemplateArguments (ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match].
TemplateDeductionResult DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match]. TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type.
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=nullptr)
 Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction from a function call (C++ [temp.deduct.call]).
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false)
 Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false)
 Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).
QualType SubstAutoType (QualType TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
TypeSourceInfoSubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
DeduceAutoResult DeduceAutoType (TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result)
DeduceAutoResult DeduceAutoType (TypeLoc AutoTypeLoc, Expr *&Initializer, QualType &Result)
 Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)
void DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init)
bool DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
TypeLoc getReturnTypeLoc (FunctionDecl *FD) const
bool DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT)
FunctionTemplateDeclgetMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2)
 Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
UnresolvedSetIterator getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
 Retrieve the most specialized of the given function template specializations.
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]).
VarTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (VarTemplatePartialSpecializationDecl *PS1, VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
void MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
 Mark which template parameters can be deduced from a given template argument list.
void MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
MultiLevelTemplateArgumentList getTemplateInstantiationArgs (NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
 Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
llvm::DenseSet< Module * > & getLookupModules ()
 Get the set of additional modules that should be checked during name lookup. A module and its imports become visible when instanting a template defined within it.
void PrintInstantiationStack ()
 Prints the current instantiation stack through a series of notes.
Optional
< sema::TemplateDeductionInfo * > 
isSFINAEContext () const
 Determines whether we are currently in a context where template argument substitution failures are not considered errors.
bool isUnevaluatedContext () const
 Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
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, CXXRecordDecl *ThisContext, unsigned ThisTypeQuals)
void SubstExceptionSpec (FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
ParmVarDeclSubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
bool SubstParmTypes (SourceLocation Loc, ParmVarDecl **Params, unsigned NumParams, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams=nullptr)
 Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution.
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)
ExprResult SubstInitializer (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
bool SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Perform substitution on the base class specifiers of the given class template specialization.
bool InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
 Instantiate the definition of a class from a given pattern.
bool InstantiateEnum (SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiate the definition of an enum from a given pattern.
bool InstantiateInClassInitializer (SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the definition of a field from the given pattern.
void InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
bool InstantiateClassTemplateSpecialization (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
void InstantiateClassMembers (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.
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 InstantiateExceptionSpec (SourceLocation PointOfInstantiation, FunctionDecl *Function)
void InstantiateFunctionDefinition (SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false)
 Instantiate the definition of the given function from its template.
VarTemplateSpecializationDeclBuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, void *InsertPos, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
VarTemplateSpecializationDeclCompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiates a variable template specialization by completing it with appropriate type information and initializer.
void BuildVariableInstantiation (VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false)
void InstantiateVariableInitializer (VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the initializer of a variable.
void InstantiateVariableDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
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)
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)
void ActOnTypedefedProtocols (SmallVectorImpl< Decl * > &ProtocolRefs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
DeclActOnCompatibilityAlias (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 ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
DeclGroupPtrTy ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, unsigned NumElts)
 ActOnForwardClassDeclaration -.
DeclGroupPtrTy ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, const IdentifierLocPair *IdentList, unsigned NumElts, AttributeList *attrList)
 ActOnForwardProtocolDeclaration - Handle @protocol foo;.
void FindProtocolDeclaration (bool WarnOnDeclarations, const IdentifierLocPair *ProtocolId, unsigned NumProtocols, SmallVectorImpl< Decl * > &Protocols)
void CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
void ProcessPropertyDecl (ObjCPropertyDecl *property, ObjCContainerDecl *CD, ObjCPropertyDecl *redeclaredProperty=nullptr, ObjCContainerDecl *lexicalDC=nullptr)
void DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
void DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
DeclActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
DeclActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, bool *OverridingProperty, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
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)
ObjCMethodDeclLookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
ObjCMethodDeclLookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
 LookupMethodInType - Look up a method in an ObjCObjectType.
bool CheckARCMethodDecl (ObjCMethodDecl *method)
 Check a method declaration for compatibility with the Objective-C ARC conventions.
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)
void CheckTollFreeBridgeCast (QualType castType, Expr *castExpr)
void CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr)
bool CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind)
bool checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs)
bool CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr)
bool ConversionToObjCStringLiteralCheck (QualType DstType, Expr *&SrcExpr)
bool checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
void CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
 Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
void CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
void ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
 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 #pragma ms_struct [on|off].
void ActOnPragmaMSComment (PragmaMSCommentKind Kind, StringRef Arg)
void ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
void ActOnPragmaMSVtorDisp (PragmaVtorDispKind Kind, SourceLocation PragmaLoc, MSVtorDispAttr::Mode Value)
 Called on well formed #pragma vtordisp().
bool UnifySection (StringRef SectionName, int SectionFlags, DeclaratorDecl *TheDecl)
bool UnifySection (StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation)
void ActOnPragmaMSSeg (SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
 Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
void ActOnPragmaMSSection (SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
 Called on well formed #pragma section().
void ActOnPragmaMSInitSeg (SourceLocation PragmaLocation, StringLiteral *SegmentName)
 Called on well-formed #pragma init_seg().
void ActOnPragmaDetectMismatch (StringRef Name, StringRef Value)
 ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
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 ActOnPragmaRedefineExtname (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
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 ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc)
 Called on well formed #pragma clang optimize.
SourceLocation getOptimizeOffPragmaLocation () const
 Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".
void AddRangeBasedOptnone (FunctionDecl *FD)
 Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.
void AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc)
 Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).
void AddAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion)
 AddAlignedAttr - Adds an aligned attribute to a particular declaration.
void AddAlignedAttr (SourceRange AttrRange, Decl *D, TypeSourceInfo *T, unsigned SpellingListIndex, bool IsPackExpansion)
void AddAssumeAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, Expr *OE, unsigned SpellingListIndex)
void AddAlignValueAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex)
ExprResult PerformOpenMPImplicitIntegerConversion (SourceLocation OpLoc, Expr *Op)
void StartOpenMPDSABlock (OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
 Called on start of new data sharing attribute block.
void EndOpenMPDSABlock (Stmt *CurDirective)
 Called on end of data sharing attribute block.
ExprResult ActOnOpenMPIdExpression (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
 Called on correct id-expression from the '#pragma omp threadprivate'.
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Called on well-formed '#pragma omp threadprivate'.
OMPThreadPrivateDeclCheckOMPThreadPrivateDecl (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Builds a new OpenMPThreadPrivateDecl and checks its correctness.
void ActOnOpenMPRegionStart (OpenMPDirectiveKind DKind, Scope *CurScope)
 Initialization of captured region for OpenMP region.
StmtResult ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
StmtResult ActOnOpenMPParallelDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
StmtResult ActOnOpenMPSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp simd' after parsing of the associated statement.
StmtResult ActOnOpenMPForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp for' after parsing of the associated statement.
StmtResult ActOnOpenMPForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
StmtResult ActOnOpenMPSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp sections' after parsing of the associated statement.
StmtResult ActOnOpenMPSectionDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp section' after parsing of the associated statement.
StmtResult ActOnOpenMPSingleDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp single' after parsing of the associated statement.
StmtResult ActOnOpenMPMasterDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp master' after parsing of the associated statement.
StmtResult ActOnOpenMPCriticalDirective (const DeclarationNameInfo &DirName, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp critical' after parsing of the associated statement.
StmtResult ActOnOpenMPParallelForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
StmtResult ActOnOpenMPParallelForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
StmtResult ActOnOpenMPParallelSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp task' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskyieldDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskyield'.
StmtResult ActOnOpenMPBarrierDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp barrier'.
StmtResult ActOnOpenMPTaskwaitDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskwait'.
StmtResult ActOnOpenMPFlushDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp flush'.
StmtResult ActOnOpenMPOrderedDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
StmtResult ActOnOpenMPAtomicDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp target' after parsing of the associated statement.
StmtResult ActOnOpenMPTeamsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp teams' after parsing of the associated statement.
OMPClauseActOnOpenMPSingleExprClause (OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPIfClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'if' clause.
OMPClauseActOnOpenMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'final' clause.
OMPClauseActOnOpenMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'num_threads' clause.
OMPClauseActOnOpenMPSafelenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'safelen' clause.
OMPClauseActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'collapse' clause.
OMPClauseActOnOpenMPSimpleClause (OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPDefaultClause (OpenMPDefaultClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'default' clause.
OMPClauseActOnOpenMPProcBindClause (OpenMPProcBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'proc_bind' clause.
OMPClauseActOnOpenMPSingleExprWithArgClause (OpenMPClauseKind Kind, unsigned Argument, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ArgumentLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPScheduleClause (OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
 Called on well-formed 'schedule' clause.
OMPClauseActOnOpenMPClause (OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'ordered' clause.
OMPClauseActOnOpenMPNowaitClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'nowait' clause.
OMPClauseActOnOpenMPUntiedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'untied' clause.
OMPClauseActOnOpenMPMergeableClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'mergeable' clause.
OMPClauseActOnOpenMPReadClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'read' clause.
OMPClauseActOnOpenMPWriteClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'write' clause.
OMPClauseActOnOpenMPUpdateClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'update' clause.
OMPClauseActOnOpenMPCaptureClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'capture' clause.
OMPClauseActOnOpenMPSeqCstClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'seq_cst' clause.
OMPClauseActOnOpenMPVarListClause (OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *TailExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId)
OMPClauseActOnOpenMPPrivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'private' clause.
OMPClauseActOnOpenMPFirstprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'firstprivate' clause.
OMPClauseActOnOpenMPLastprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'lastprivate' clause.
OMPClauseActOnOpenMPSharedClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'shared' clause.
OMPClauseActOnOpenMPReductionClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId)
 Called on well-formed 'reduction' clause.
OMPClauseActOnOpenMPLinearClause (ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'linear' clause.
OMPClauseActOnOpenMPAlignedClause (ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'aligned' clause.
OMPClauseActOnOpenMPCopyinClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyin' clause.
OMPClauseActOnOpenMPCopyprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyprivate' clause.
OMPClauseActOnOpenMPFlushClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'flush' pseudo clause.
ExprResult ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ExprResult IgnoredValueConversions (Expr *E)
ExprResult UsualUnaryConversions (Expr *E)
ExprResult CallExprUnaryConversions (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)
VariadicCallType getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
VarArgKind isValidVarArgType (const QualType &Ty)
void checkVariadicArgument (const Expr *E, VariadicCallType CT)
bool hasCStrMethod (const Expr *E)
 Check to see if a given expression could have '.c_str()' called on it.
bool GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
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=nullptr)
void DiagnoseAssignmentEnum (QualType DstType, QualType SrcType, Expr *SrcExpr)
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, bool DiagnoseCFAudited=false)
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, unsigned Opc, QualType *CompLHSTy=nullptr)
QualType CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
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=nullptr)
 Find a merged pointer type and convert the two expressions to it.
QualType FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool *NonStandardCompositeType=nullptr)
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.
void DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
 Diagnose pointers that are always non-null.
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 isLaxVectorConversion (QualType srcType, QualType destType)
 Is this a legal conversion between two known vector types?
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.
ExprResult checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType &paramType)
 Type-check an expression that's being passed to an __unknown_anytype parameter.
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, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
 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.
void checkRetainCycles (VarDecl *Var, Expr *Init)
bool checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS)
void checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
bool CheckMessageArgumentTypes (QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
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.
void EmitRelatedResultTypeNoteForReturn (QualType destType)
 Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.
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, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, bool AllowFold=true)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr)
ExprResult VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
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)
bool inferCUDATargetForImplicitSpecialMember (CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
SourceLocation getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const
ExprResult SemaBuiltinShuffleVector (CallExpr *TheCall)
 SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
ExprResult SemaConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 SemaConvertVectorExpr - Handle __builtin_convertvector.
void CheckFormatString (const StringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, bool inFunctionCall, VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs)
bool FormatStringHasSArg (const StringLiteral *FExpr)
bool GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx)
void RegisterTypeTagForDatatype (const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
 Register a magic integral constant to be used as a type tag.
ScopegetCurScope () const
 Retrieve the parser's current scope.
void incrementMSLocalManglingNumber () const
IdentifierInfogetSuperIdentifier () const
IdentifierInfogetFloat128Identifier () const
DeclgetObjCDeclContext () const
DeclContextgetCurLexicalContext () const
AvailabilityResult getCurContextAvailability () const
const DeclContextgetCurObjCLexicalContext () const

Static Public Member Functions

static QualType GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
static int getPrintable (int I)
static unsigned getPrintable (unsigned I)
static bool getPrintable (bool B)
static const char * getPrintable (const char *S)
static StringRef getPrintable (StringRef S)
static const std::string & getPrintable (const std::string &S)
static const IdentifierInfogetPrintable (const IdentifierInfo *II)
static DeclarationName getPrintable (DeclarationName N)
static QualType getPrintable (QualType T)
static SourceRange getPrintable (SourceRange R)
static SourceRange getPrintable (SourceLocation L)
static SourceRange getPrintable (Expr *E)
static SourceRange getPrintable (TypeLoc TL)
static bool adjustContextForLocalExternDecl (DeclContext *&DC)
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, const 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)
static FormatStringType GetFormatStringType (const FormatAttr *Format)

Public Attributes

OpenCLOptions OpenCLFeatures
FPOptions FPFeatures
const LangOptionsLangOpts
PreprocessorPP
ASTContextContext
ASTConsumerConsumer
DiagnosticsEngineDiags
SourceManagerSourceMgr
bool CollectStats
 Flag indicating whether or not to collect detailed statistics.
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
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
 Controls member pointer representation format under the MS ABI.
SmallVector
< MSVtorDispAttr::Mode, 2 > 
VtorDispModeStack
 Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. Possible values are 0, 1, and 2, which mean:
SourceLocation ImplicitMSInheritanceAttrLoc
 Source location for newly created implicit MSInheritanceAttrs.
PragmaStack< StringLiteral * > DataSegStack
PragmaStack< StringLiteral * > BSSSegStack
PragmaStack< StringLiteral * > ConstSegStack
PragmaStack< StringLiteral * > CodeSegStack
StringLiteralCurInitSeg
 Last section used with #pragma init_seg.
SourceLocation CurInitSegLoc
void * VisContext
 VisContext - Manages the stack for #pragma GCC visibility.
SourceLocation OptimizeOffPragmaLocation
 This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet. If optimizations are currently "on", this is set to an invalid location.
bool IsBuildingRecoveryCallExpr
 Flag indicating if Sema is building a recovery call expression.
bool ExprNeedsCleanups
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
llvm::SmallPtrSet< Expr *, 2 > MaybeODRUseExprs
 Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression. This is cleared at the end of each full expression.
SmallVector
< sema::FunctionScopeInfo *, 4 > 
FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
ExtVectorDeclsType ExtVectorDecls
std::unique_ptr
< CXXFieldCollector
FieldCollector
 FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
NamedDeclSetType UnusedPrivateFields
 Set containing all declared private fields that are not used.
llvm::SmallSetVector< const
TypedefNameDecl *, 4 > 
UnusedLocalTypedefNameCandidates
 Set containing all typedefs that are likely unused.
std::unique_ptr< RecordDeclSetTyPureVirtualClassDiagSet
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
llvm::DenseMap
< DeclarationName, NamedDecl * > 
LocallyScopedExternCDecls
 A mapping from external names to the most recent locally-scoped extern "C" 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.
SmallVector< std::pair
< CXXMethodDecl *, const
FunctionProtoType * >, 2 > 
DelayedDefaultedMemberExceptionSpecs
 All the members seen during a class definition which were both explicitly defaulted and had explicitly-specified exception specifications, along with the function type containing their user-specified exception specification. Those exception specifications were overridden with the default specifications, but we still need to check whether they are compatible with the default specification, and we can't do that until the nesting set of class definitions is complete.
LateParsedTemplateMapT LateParsedTemplateMap
LateTemplateParserCBLateTemplateParser
LateTemplateParserCleanupCBLateTemplateParserCleanup
void * OpaqueParser
class
clang::Sema::DelayedDiagnostics 
DelayedDiagnostics
llvm::DenseMap< IdentifierInfo
*, WeakInfo
WeakUndeclaredIdentifiers
llvm::DenseMap< IdentifierInfo
*, AsmLabelAttr * > 
ExtnameUndeclaredIdentifiers
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.
std::unique_ptr< NSAPINSAPIObj
 Caches identifiers/selectors for NSFoundation APIs.
ObjCInterfaceDeclNSNumberDecl
 The declaration of the Objective-C NSNumber class.
QualType NSNumberPointer
 Pointer to NSNumber type (NSNumber *).
ObjCMethodDeclNSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods]
 The Objective-C NSNumber methods used to create NSNumber literals.
ObjCInterfaceDeclNSStringDecl
 The declaration of the Objective-C NSString class.
QualType NSStringPointer
 Pointer to NSString type (NSString *).
ObjCMethodDeclStringWithUTF8StringMethod
 The declaration of the stringWithUTF8String: method.
ObjCInterfaceDeclNSArrayDecl
 The declaration of the Objective-C NSArray class.
ObjCMethodDeclArrayWithObjectsMethod
 The declaration of the arrayWithObjects:count: method.
ObjCInterfaceDeclNSDictionaryDecl
 The declaration of the Objective-C NSDictionary class.
ObjCMethodDeclDictionaryWithObjectsMethod
 The declaration of the dictionaryWithObjects:forKeys:count: method.
QualType QIDNSCopying
 id<NSCopying> type.
Selector RespondsToSelectorSel
 will hold 'respondsToSelector:'
unsigned MSAsmLabelNameCounter
 counter for internal MS Asm label names.
bool GlobalNewDeleteDeclared
bool AllowAbstractFieldReference
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
UndefinedButUsed
GlobalMethodPool MethodPool
llvm::DenseMap< Selector,
SourceLocation
ReferencedSelectors
llvm::SmallSet
< SpecialMemberDecl, 4 > 
SpecialMembersBeingDeclared
std::vector< NamedDecl * > DeclsInPrototypeScope
QualType CXXThisTypeOverride
 When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function. In such cases, this provides the type used for 'this'.
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 AccessCheckingSFINAE
 When true, access checking violations are treated as SFINAE failures rather than hard errors.
SmallVector
< ActiveTemplateInstantiation, 16 > 
ActiveTemplateInstantiations
 List of active template instantiations.
SmallVector< Module *, 16 > ActiveTemplateInstantiationLookupModules
 Extra modules inspected when performing a lookup during a template instantiation. Computed lazily.
llvm::DenseSet< Module * > LookupModulesCache
 Cache of additional modules that should be used for name lookup within the current template instantiation. Computed lazily; use getLookupModules() to get a complete set.
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.
SuppressedDiagnosticsMap SuppressedDiagnostics
LocalInstantiationScopeCurrentInstantiationScope
 The current instantiation scope used to store local variables.
bool DisableTypoCorrection
 Tracks whether we are in a context where typo correction is disabled.
unsigned TyposCorrected
 The number of typos corrected by CorrectTypo.
UnqualifiedTyposCorrectedMap UnqualifiedTyposCorrected
 A cache containing the results of typo correction for unqualified name lookup.
IdentifierSourceLocations TypoCorrectionFailures
 A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.
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, LookupLocalFriendName, LookupObjCProtocolName, LookupObjCImplicitSelfParam,
  LookupAnyName
}
 Describes the kind of name lookup to perform. More...
enum  RedeclarationKind { NotForRedeclaration = 0, ForRedeclaration }
 Specifies whether (or how) name lookup is being performed for a redeclaration (vs. a reference). More...
enum  LiteralOperatorLookupResult {
  LOLR_Error, LOLR_Cooked, LOLR_Raw, LOLR_Template,
  LOLR_StringTemplate
}
 The possible outcomes of name lookup for a literal operator. More...
enum  CorrectTypoKind { CTK_NonError, CTK_ErrorRecovery }
typedef std::function< void(const
TypoCorrection &)> 
TypoDiagnosticGenerator
typedef std::function
< ExprResult(Sema &, TypoExpr
*, TypoCorrection
TypoRecoveryCallback )
SpecialMemberOverloadResultLookupSpecialMember (CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
const TypoExprState & getTypoExprState (TypoExpr *TE) const
void clearDelayedTypo (TypoExpr *TE)
 Clears the state of the given TypoExpr.
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.
bool LookupInSuper (LookupResult &R, CXXRecordDecl *Class)
 Perform qualified name lookup into all base classes of the given class.
void LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions)
void addOverloadedOperatorToUnresolvedSet (UnresolvedSetImpl &Functions, DeclAccessPair Operator, QualType T1, QualType T2)
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)
 Look up the copying constructor for the given class.
CXXMethodDeclLookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the copying assignment operator for the given class.
CXXConstructorDeclLookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the moving constructor for the given class.
CXXMethodDeclLookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, 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.
bool checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id)
LiteralOperatorLookupResult LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate)
bool isKnownName (StringRef name)
void ArgumentDependentLookup (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
void LookupVisibleDecls (Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true)
void LookupVisibleDecls (DeclContext *Ctx, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true)
TypoCorrection CorrectTypo (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
TypoExprCorrectTypoDelayed (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, std::unique_ptr< CorrectionCandidateCallback > CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
ExprResult CorrectDelayedTyposInExpr (Expr *E, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E)-> ExprResult{return E;})
ExprResult CorrectDelayedTyposInExpr (ExprResult ER, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E)-> ExprResult{return E;})
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, const PartialDiagnostic &PrevNote, bool ErrorRecovery=true)
 Diagnose a successfully-corrected typo. Separated from the correction itself to allow external validation of the result, etc.
void FindAssociatedClassesAndNamespaces (SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
 Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
void FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
void 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, ArrayRef< Expr * > Args)
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, ArrayRef< CXXCtorInitializer * > Initializers)
void CodeCompleteLambdaIntroducer (Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
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, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
void CodeCompleteObjCClassMessage (Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
void CodeCompleteObjCInstanceMessage (Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
void CodeCompleteObjCForCollection (Scope *S, DeclGroupPtrTy IterationVar)
void CodeCompleteObjCSelector (Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
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, ArrayRef< IdentifierInfo * > SelIdents)
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, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)

Detailed Description

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

Definition at line 208 of file Sema.h.


Member Typedef Documentation

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

Definition at line 2259 of file Sema.h.

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

Definition at line 2258 of file Sema.h.

typedef std::pair<StringRef, QualType> clang::Sema::CapturedParamNameType

Definition at line 3187 of file Sema.h.

Definition at line 232 of file Sema.h.

Definition at line 455 of file Sema.h.

Definition at line 5030 of file Sema.h.

Definition at line 378 of file Sema.h.

Definition at line 895 of file Sema.h.

Definition at line 894 of file Sema.h.

Definition at line 6677 of file Sema.h.

Definition at line 6850 of file Sema.h.

Definition at line 479 of file Sema.h.

Callback to the parser to parse templated functions when needed.

Definition at line 483 of file Sema.h.

Definition at line 484 of file Sema.h.

typedef llvm::SmallSetVector<const NamedDecl*, 16> clang::Sema::NamedDeclSetType

Definition at line 388 of file Sema.h.

Definition at line 3313 of file Sema.h.

Definition at line 503 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 6695 of file Sema.h.

Definition at line 504 of file Sema.h.

Definition at line 2827 of file Sema.h.

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

Definition at line 397 of file Sema.h.

typedef llvm::SmallPtrSet<Selector, 8> clang::Sema::SelectorSet

Definition at line 2826 of file Sema.h.

Definition at line 920 of file Sema.h.

typedef llvm::SmallSet<SourceLocation, 2> clang::Sema::SrcLocSet

Definition at line 6676 of file Sema.h.

typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> > clang::Sema::SuppressedDiagnosticsMap

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 6457 of file Sema.h.

Definition at line 233 of file Sema.h.

Definition at line 440 of file Sema.h.

typedef std::pair<const IdentifierInfo *, uint64_t> clang::Sema::TypeTagMagicValue

A pair of ArgumentKind identifier and magic value. This uniquely identifies the magic value.

Definition at line 8639 of file Sema.h.

Definition at line 234 of file Sema.h.

typedef std::function<void(const TypoCorrection &)> clang::Sema::TypoDiagnosticGenerator

Definition at line 2582 of file Sema.h.

Definition at line 2584 of file Sema.h.

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

Definition at line 871 of file Sema.h.

Definition at line 6666 of file Sema.h.

Definition at line 447 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 5013 of file Sema.h.


Member Enumeration Documentation

Enumerator:
AbstractNone 
AbstractReturnType 
AbstractParamType 
AbstractVariableType 
AbstractFieldType 
AbstractIvarType 
AbstractSynthesizedIvarType 
AbstractArrayType 

Definition at line 5264 of file Sema.h.

Enumerator:
AR_accessible 
AR_inaccessible 
AR_dependent 
AR_delayed 

Definition at line 5197 of file Sema.h.

Enumerator:
ACR_okay 
ACR_unbridged 

Definition at line 8153 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 7874 of file Sema.h.

Enumerator:
AA_Assigning 
AA_Passing 
AA_Returning 
AA_Converting 
AA_Initializing 
AA_Sending 
AA_Casting 
AA_Passing_CFAudited 

Definition at line 2038 of file Sema.h.

Enumerator:
AD_Deprecation 
AD_Unavailable 

Definition at line 3323 of file Sema.h.

Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability").

Enumerator:
AMK_None 

Don't merge availability attributes at all.

AMK_Redeclaration 

Merge availability attributes for a redeclaration, which requires an exact match.

AMK_Override 

Merge availability attributes for an override, which requires an exact match or a weakening of constraints.

Definition at line 2012 of file Sema.h.

Enumerator:
BEF_begin 
BEF_end 

Definition at line 2401 of file Sema.h.

Enumerator:
BFRK_Build 

Initial building of a for-range statement.

BFRK_Rebuild 

Instantiation or recovery rebuild of a for-range statement. Don't attempt any typo-correction.

BFRK_Check 

Determining whether a for-range statement could be built. Avoid any unnecessary or irreversible actions.

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

CCEK_NewExpr 

Constant expression in a noptr-new-declarator.

Definition at line 2144 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 7756 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 5550 of file Sema.h.

Enumerator:
CTK_NonError 
CTK_ErrorRecovery 

Definition at line 2696 of file Sema.h.

Enumerator:
CFT_Device 
CFT_Global 
CFT_Host 
CFT_HostDevice 
CFT_InvalidTarget 

Definition at line 8282 of file Sema.h.

Kinds of C++ special members.

Enumerator:
CXXDefaultConstructor 
CXXCopyConstructor 
CXXMoveConstructor 
CXXCopyAssignment 
CXXMoveAssignment 
CXXDestructor 
CXXInvalid 

Definition at line 910 of file Sema.h.

Result type of DeduceAutoType.

Enumerator:
DAR_Succeeded 
DAR_Failed 
DAR_FailedAlreadyDiagnosed 

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

UnevaluatedAbstract 

The current expression occurs within an unevaluated operand that unconditionally permits abstract references to fields, such as a SIZE operator in MS-style inline assembly.

ConstantEvaluated 

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

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 710 of file Sema.h.

Enumerator:
FST_Scanf 
FST_Printf 
FST_NSString 
FST_Strftime 
FST_Strfmon 
FST_Kprintf 
FST_Unknown 

Definition at line 8541 of file Sema.h.

Enumerator:
FRS_Success 
FRS_NoViableFunction 
FRS_DiagnosticIssued 

Definition at line 2393 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 3801 of file Sema.h.

The possible outcomes of name lookup for a literal operator.

Enumerator:
LOLR_Error 

The lookup resulted in an error.

LOLR_Cooked 

The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and passed to it.

LOLR_Raw 

The lookup found a single 'raw' literal operator, which expects a string literal containing the spelling of the literal token.

LOLR_Template 

The lookup found an overload set of literal operator templates, which expect the characters of the spelling of the literal token to be passed as a non-type template argument pack.

LOLR_StringTemplate 

The lookup found an overload set of literal operator templates, which expect the character type and characters of the spelling of the string literal token to be passed as template arguments.

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

LookupLocalFriendName 

Look up a friend of a local class. This lookup does not look outside the innermost non-class scope. See C++11 [class.friend]p11.

LookupObjCProtocolName 

Look up the name of an Objective-C protocol.

LookupObjCImplicitSelfParam 

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

LookupAnyName 

Look up any declaration with any name.

Definition at line 2498 of file Sema.h.

Enumerator:
MMS_loose 
MMS_strict 

Definition at line 2917 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_VarTemplate 
NC_FunctionTemplate 

Definition at line 1450 of file Sema.h.

Enumerator:
OCK_None 
OCK_Interface 
OCK_Protocol 
OCK_Category 
OCK_ClassExtension 
OCK_Implementation 
OCK_CategoryImplementation 

Definition at line 6934 of file Sema.h.

Enumerator:
LK_Array 
LK_Dictionary 
LK_Numeric 
LK_Boxed 
LK_String 
LK_Block 
LK_None 

Definition at line 2240 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 7130 of file Sema.h.

Enumerator:
OSMK_None 
OSMK_Alloc 
OSMK_New 
OSMK_Copy 
OSMK_RetainingInit 
OSMK_NonRetainingInit 

Definition at line 7067 of file Sema.h.

Enumerator:
OS_Array 
OS_Dictionary 
OS_Error 

Definition at line 2231 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 2050 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 8317 of file Sema.h.

Enumerator:
PCK_Unknown 
PCK_Linker 
PCK_Lib 
PCK_Compiler 
PCK_ExeStr 
PCK_User 

Definition at line 7284 of file Sema.h.

Enumerator:
PSK_Reset 
PSK_Set 
PSK_Push 
PSK_Push_Set 
PSK_Pop 
PSK_Pop_Set 

Definition at line 280 of file Sema.h.

Enumerator:
PMSST_OFF 
PMSST_ON 

Definition at line 7279 of file Sema.h.

Enumerator:
POAK_Native 
POAK_Natural 
POAK_Packed 
POAK_Power 
POAK_Mac68k 
POAK_Reset 

Definition at line 7259 of file Sema.h.

Enumerator:
PPK_Default 
PPK_Show 
PPK_Push 
PPK_Pop 

Definition at line 7272 of file Sema.h.

Enumerator:
PSK_DataSeg 
PSK_BSSSeg 
PSK_ConstSeg 
PSK_CodeSeg 

Definition at line 7319 of file Sema.h.

Enumerator:
PVDK_Push 

#pragma vtordisp(push, mode)

PVDK_Set 

#pragma vtordisp(mode)

PVDK_Pop 

#pragma vtordisp(pop)

PVDK_Reset 

#pragma vtordisp()

Definition at line 273 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 2545 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 8096 of file Sema.h.

Describes the compatibility of a result type with its method.

Enumerator:
RTC_Compatible 
RTC_Incompatible 
RTC_Unknown 

Definition at line 7249 of file Sema.h.

Enumerator:
ReuseLambdaContextDecl 

Definition at line 3353 of file Sema.h.

Enumerator:
TUK_Reference 
TUK_Declaration 
TUK_Definition 
TUK_Friend 

Definition at line 1791 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_Invalid 

The declaration was invalid; do nothing.

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 

A non-depnedent component of the parameter did not match the corresponding component of the argument.

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.

TDK_MiscellaneousDeductionFailure 

Deduction failed; that's all we know.

Definition at line 6075 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 5624 of file Sema.h.

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

Enumerator:
TPC_ClassTemplate 
TPC_VarTemplate 
TPC_FunctionTemplate 
TPC_ClassTemplateMember 
TPC_FriendClassTemplate 
TPC_FriendFunctionTemplate 
TPC_FriendFunctionTemplateDefinition 
TPC_TypeAliasTemplate 

Definition at line 5380 of file Sema.h.

Enumerator:
TryCapture_Implicit 
TryCapture_ExplicitByVal 
TryCapture_ExplicitByRef 

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

UPPC_Lambda 

Lambda expression.

UPPC_Block 

Block expression,.

Definition at line 5738 of file Sema.h.

Enumerator:
VAK_Valid 
VAK_ValidInCXX11 
VAK_Undefined 
VAK_MSVCUndefined 
VAK_Invalid 

Definition at line 7828 of file Sema.h.

Enumerator:
VariadicFunction 
VariadicBlock 
VariadicMethod 
VariadicConstructor 
VariadicDoesNotApply 

Definition at line 7814 of file Sema.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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

ActOnAccessSpecifier - Parsed an access specifier followed by a colon.

Definition at line 1820 of file SemaDeclCXX.cpp.

References clang::DeclContext::addHiddenDecl(), clang::AS_none, Context, clang::AccessSpecDecl::Create(), CurContext, and ProcessAccessDeclAttributeList().

ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".

Definition at line 10073 of file SemaExpr.cpp.

References Context, clang::ASTContext::getPointerType(), clang::Decl::markUsed(), and clang::ASTContext::VoidTy.

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

Definition at line 8330 of file SemaDeclCXX.cpp.

References ActOnDocumentableDecl(), ActOnTypedefNameDecl(), CheckTemplateParameterList(), CheckTypedefForVariablyModifiedType(), clang::LookupResult::clear(), Context, clang::TypeAliasTemplateDecl::Create(), clang::TypeAliasDecl::Create(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), clang::LookupResult::empty(), FilterLookupForScope(), ForRedeclaration, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::TypeLoc::getBeginLoc(), clang::Scope::getFlags(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), GetNameFromUnqualifiedId(), clang::Scope::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypedefNameDecl::getUnderlyingType(), 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, Previous, ProcessDeclAttributeList(), PushOnScopeChains(), clang::Decl::setAccess(), clang::TypeAliasDecl::setDescribedAliasTemplate(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), 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 3922 of file SemaExprCXX.cpp.

References BuildArrayTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().

ExprResult Sema::ActOnAsTypeExpr ( Expr E,
ParsedType  ParsedDestTy,
SourceLocation  BuiltinLoc,
SourceLocation  RParenLoc 
)

__builtin_astype(...)

ActOnAsTypeExpr - create a new asType (bitcast) from the arguments.

__builtin_astype( value, dst type )

Definition at line 4602 of file SemaExpr.cpp.

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

Decl * Sema::ActOnAtEnd ( Scope S,
SourceRange  AtEnd,
ArrayRef< Decl * >  allMethods = None,
ArrayRef< DeclGroupPtrTy allTUVars = None 
)

Check for instance method of the same name with incompatible types

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

Check for class method of the same name with incompatible types

Definition at line 2583 of file SemaDeclObjC.cpp.

References ActOnDocumentableDecl(), ActOnObjCContainerFinishDefinition(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AtomicPropertySetterGetterRules(), clang::DeclGroupRef::begin(), AttributeLangSupport::C, clang::NSAPI::ClassId_NSObject, Consumer, Context, clang::FixItHint::CreateInsertion(), CurContext, Diag(), DiagnoseClassExtensionDupMethods(), DiagnoseDuplicateIvars(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseUnusedBackingIvarInAccessor(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclGroupRef::end(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), getLocForEndOfToken(), getObjCContainerKind(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSourceManager(), clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(), ImplMethodsVsClassMethods(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceManager::isInSystemHeader(), clang::ObjCRuntime::isNonFragile(), clang::SourceRange::isValid(), LangOpts, LookupOrdinaryName, LookupSingleName(), clang::ast_matchers::match(), MatchTwoMethodDeclarations(), NSAPIObj, clang::LangOptions::ObjCRuntime, OCK_None, ProcessPropertyDecl(), clang::ObjCMethodDecl::setAsRedeclaration(), clang::Decl::setInvalidDecl(), SetIvarInitializers(), and TUScope.

StmtResult Sema::ActOnAttributedStmt ( SourceLocation  AttrLoc,
ArrayRef< const Attr * >  Attrs,
Stmt SubStmt 
)

Definition at line 450 of file SemaStmt.cpp.

References Context, and clang::AttributedStmt::Create().

BaseResult Sema::ActOnBaseSpecifier ( Decl classdecl,
SourceRange  SpecifierRange,
ParsedAttributes Attributes,
bool  Virtual,
AccessSpecifier  Access,
ParsedType  basetype,
SourceLocation  BaseLoc,
SourceLocation  EllipsisLoc 
)

ActOnBaseSpecifier - Parsed a base specifier. A base specifier is one entry in the base class list of a class specifier, for example: class foo : public bar, virtual private baz { 'public bar' and 'virtual private baz' are each base-specifiers.

Definition at line 1493 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), CheckBaseSpecifier(), Diag(), DiagnoseUnexpandedParameterPack(), clang::ParsedAttributes::empty(), clang::SourceRange::getBegin(), clang::Attr::getKind(), clang::ParsedAttributes::getList(), GetTypeFromParser(), clang::SourceLocation::isInvalid(), clang::Decl::setInvalidDecl(), clang::CXXRecordDecl::setIsParsingBaseSpecifiers(), 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 1615 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), and AttachBaseSpecifiers().

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

Definition at line 9704 of file SemaExpr.cpp.

References DiagnoseBinOpPrecedence().

void Sema::ActOnBlockArguments ( SourceLocation  CaretLoc,
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 10581 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 10436 of file SemaExpr.cpp.

References Context, clang::BlockDecl::Create(), clang::Decl::getDeclContext(), and clang::BlockDecl::setBlockMangling().

ExprResult Sema::ActOnBlockStmtExpr ( SourceLocation  CaretLoc,
Stmt Body,
Scope CurScope 
)

ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed. ^(int x){...}

Definition at line 10593 of file SemaExpr.cpp.

References clang::sema::CapturingScopeInfo::Captures, clang::BlockDecl::captures(), Context, clang::frontend::CPlusPlus, clang::sema::CapturingScopeInfo::CXXThisCaptureIndex, Diag(), clang::QualType::DK_none, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::sema::BlockScopeInfo::FunctionType, clang::Type::getAs(), clang::BlockExpr::getBlockDecl(), clang::ASTContext::getBlockPointerType(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::sema::CapturingScopeInfo::Capture::getInitExpr(), clang::FunctionType::getNoReturnAttr(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::sema::CapturingScopeInfo::Capture::getVariable(), clang::Decl::hasAttr(), clang::BlockDecl::hasCaptures(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::sema::CapturingScopeInfo::Capture::isBlockCapture(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::sema::CapturingScopeInfo::Capture::isNested(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::sema::CapturingScopeInfo::Capture::isThisCapture(), clang::BlockDecl::param_begin(), clang::BlockDecl::param_end(), clang::sema::CapturingScopeInfo::ReturnType, clang::BlockDecl::setBody(), clang::BlockDecl::setCaptures(), clang::sema::BlockScopeInfo::TheDecl, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::ASTContext::VoidTy, and clang::FunctionType::ExtInfo::withNoReturn().

Definition at line 12997 of file SemaExpr.cpp.

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

Referenced by ActOnOpenMPFinalClause(), and ActOnOpenMPIfClause().

StmtResult Sema::ActOnBreakStmt ( SourceLocation  BreakLoc,
Scope CurScope 
)
ExprResult Sema::ActOnBuiltinOffsetOf ( Scope S,
SourceLocation  BuiltinLoc,
SourceLocation  TypeLoc,
ParsedType  ParsedArgTy,
OffsetOfComponent CompPtr,
unsigned  NumComponents,
SourceLocation  RParenLoc 
)
ExprResult Sema::ActOnCallExpr ( Scope S,
Expr Fn,
SourceLocation  LParenLoc,
MultiExprArg  ArgExprs,
SourceLocation  RParenLoc,
Expr ExecConfig = nullptr,
bool  IsExecConfig = false 
)
StmtResult Sema::ActOnCapScopeReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp 
)
void Sema::ActOnCapturedRegionStart ( SourceLocation  Loc,
Scope CurScope,
CapturedRegionKind  Kind,
unsigned  NumParams 
)
void Sema::ActOnCapturedRegionStart ( SourceLocation  Loc,
Scope CurScope,
CapturedRegionKind  Kind,
ArrayRef< CapturedParamNameType Params 
)
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 404 of file SemaStmt.cpp.

References clang::ast_matchers::caseStmt, and clang::CaseStmt::setSubStmt().

ExprResult Sema::ActOnCastExpr ( Scope S,
SourceLocation  LParenLoc,
Declarator D,
ParsedType Ty,
SourceLocation  RParenLoc,
Expr CastExpr 
)
ExprResult Sema::ActOnCharacterConstant ( const Token Tok,
Scope UDLScope = nullptr 
)
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,
TemplateIdAnnotation TemplateId,
AttributeList Attr,
MultiTemplateParamsArg  TemplateParameterLists 
)

Definition at line 5920 of file SemaTemplate.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::AS_none, clang::AS_public, CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::FriendDecl::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::ClassTemplateDecl::findSpecialization(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getCanonicalTemplateName(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::CXXRecordDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTypeDeclType(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::ASTContext::hasSameType(), clang::TemplateName::isDependent(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), MarkUsedTemplateParameters(), clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization(), SetNestedNameSpecifier(), clang::ClassTemplateSpecializationDecl::setSpecializationKind(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::TagDecl::setTemplateParameterListsInfo(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::TemplateParameterList::size(), clang::TemplateArgumentListInfo::size(), clang::TemplateIdAnnotation::SS, clang::TagDecl::startDefinition(), clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateNameLoc, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TTK_Enum.

void Sema::ActOnComment ( SourceRange  Comment)
Decl * Sema::ActOnCompatibilityAlias ( SourceLocation  AtLoc,
IdentifierInfo AliasName,
SourceLocation  AliasLocation,
IdentifierInfo ClassName,
SourceLocation  ClassLocation 
)

ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration. It sets up the alias relationships.

Definition at line 627 of file SemaDeclObjC.cpp.

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

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

Definition at line 4816 of file SemaExpr.cpp.

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

StmtResult Sema::ActOnCompoundStmt ( SourceLocation  L,
SourceLocation  R,
ArrayRef< Stmt * >  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 2399 of file SemaStmt.cpp.

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

ExprResult Sema::ActOnConvertVectorExpr ( Expr E,
ParsedType  ParsedDestTy,
SourceLocation  BuiltinLoc,
SourceLocation  RParenLoc 
)

__builtin_convertvector(...)

ActOnConvertVectorExpr - create a new convert-vector expression from the provided arguments.

__builtin_convertvector( value, dst type )

Definition at line 4623 of file SemaExpr.cpp.

ActOnCXXBoolLiteral - Parse {true,false} literals.

Definition at line 568 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, and Context.

Referenced by BuildEmptyCXXFoldExpr().

StmtResult Sema::ActOnCXXCatchBlock ( SourceLocation  CatchLoc,
Decl ExDecl,
Stmt HandlerBlock 
)

ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them.

Definition at line 3196 of file SemaStmt.cpp.

References Context.

ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement. e.g: "if (int x = f()) {...}"

Definition at line 12875 of file SemaDeclCXX.cpp.

References ActOnDeclarator(), Diag(), clang::Declarator::getDeclSpec(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), and clang::DeclSpec::SCS_typedef.

ExprResult Sema::ActOnCXXDelete ( SourceLocation  StartLoc,
bool  UseGlobal,
bool  ArrayForm,
Expr ExE 
)

ActOnCXXDelete - Parsed a C++ 'delete' expression.

ActOnCXXDelete - Parsed a C++ 'delete' expression (C++ 5.3.5), as in:

 ::delete ptr; 

or

 delete [] ptr; 

Definition at line 2238 of file SemaExprCXX.cpp.

References CheckDestructorAccess(), Context, clang::FixItHint::CreateInsertion(), clang::ASTContext::DeclarationNames, DefaultLvalueConversion(), Diag(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::Preprocessor::getLocForEndOfToken(), clang::Stmt::getLocStart(), clang::FunctionDecl::getNumParams(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::CXXRecordDecl::isAbstract(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXRecordDecl::isPolymorphic(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::CXXMethodDecl::isVirtual(), clang::Type::isVoidType(), LookupDestructor(), MarkFunctionReferenced(), clang::ast_matchers::match(), PDiag(), PerformContextualImplicitConversion(), PP, RequireCompleteType(), S, and clang::ASTContext::VoidTy.

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

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

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

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

void Sema::ActOnCXXExitDeclaratorScope ( Scope S,
const CXXScopeSpec SS 
)

ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well. Used to indicate that names should revert to being looked up in the defining scope.

Definition at line 1034 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 12860 of file SemaDeclCXX.cpp.

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

ExprResult Sema::ActOnCXXFoldExpr ( SourceLocation  LParenLoc,
Expr LHS,
tok::TokenKind  Operator,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  RParenLoc 
)

Handle a C++1z fold-expression: ( expr op ... op expr ).

Definition at line 952 of file SemaTemplateVariadic.cpp.

References BuildCXXFoldExpr(), CheckFoldOperand(), clang::Expr::containsUnexpandedParameterPack(), Diag(), and clang::Stmt::getSourceRange().

StmtResult Sema::ActOnCXXForRangeStmt ( SourceLocation  ForLoc,
Stmt First,
SourceLocation  ColonLoc,
Expr Range,
SourceLocation  RParenLoc,
BuildForRangeKind  Kind 
)

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

C++11 [stmt.ranged]: A range-based for statement is equivalent to

{ auto && __range = range-init; for ( auto __begin = begin-expr, __end = end-expr; __begin != __end; ++__begin ) { for-range-declaration = *__begin; statement } }

The body of the loop is not available yet, since it cannot be analysed until we have determined the type of the for-range-declaration.

Definition at line 1900 of file SemaStmt.cpp.

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

Referenced by RebuildForRangeWithDereference().

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

Parameters:
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 246 of file SemaCXXScopeSpec.cpp.

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

NamedDecl * Sema::ActOnCXXMemberDeclarator ( Scope S,
AccessSpecifier  AS,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists,
Expr BW,
const VirtSpecifiers VS,
InClassInitStyle  InitStyle 
)

ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed. 'AS' is the access specifier, 'BW' specifies the bitfield width if there is one, 'InitExpr' specifies the initializer if one has been parsed, and 'InitStyle' is set if an in-class initializer is present (but parsing it has been deferred).

Definition at line 1964 of file SemaDeclCXX.cpp.

References clang::Decl::addAttr(), clang::AS_private, clang::AS_public, CheckOverrideControl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearConstexprSpec(), clang::DeclSpec::ClearStorageClassSpecs(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXOperatorName, Diag(), diagnoseQualifiedDeclaration(), Diags, FieldCollector, clang::Decl::getAccess(), clang::DeclarationName::getAsIdentifierInfo(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VirtSpecifiers::getFinalLoc(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::VirtSpecifiers::getLastLocation(), clang::ParsedAttributes::getList(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), getMSPropertyAttr(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::VirtSpecifiers::getOverrideLoc(), clang::FieldDecl::getParent(), clang::ASTContext::getPrintingPolicy(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::Stmt::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclSpec::getTypeQualifiers(), HandleDeclarator(), HandleField(), HandleMSProperty(), clang::Decl::hasAttr(), clang::ICIS_NoInit, InitializationHasSideEffects(), clang::DeclSpec::isConstexprSpecified(), clang::Declarator::isDeclarationOfFunction(), clang::DeclContext::isDependentContext(), clang::VirtSpecifiers::isFinalSpecified(), clang::VirtSpecifiers::isFinalSpelledSealed(), clang::DeclSpec::isFriendSpecified(), clang::DeclarationName::isIdentifier(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::VirtSpecifiers::isOverrideSpecified(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::DeclSpec::SetStorageClassSpec(), clang::DeclSpec::SetTypeQual(), clang::TemplateParameterList::size(), clang::DeclSpec::TQ_const, and UnusedPrivateFields.

ExprResult Sema::ActOnCXXNamedCast ( SourceLocation  OpLoc,
tok::TokenKind  Kind,
SourceLocation  LAngleBracketLoc,
Declarator D,
SourceLocation  RAngleBracketLoc,
SourceLocation  LParenLoc,
Expr E,
SourceLocation  RParenLoc 
)

ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.

Definition at line 216 of file SemaCast.cpp.

References BuildCXXNamedCast(), CheckExtraCXXDefaultArguments(), clang::ExprError(), getLangOpts(), clang::Expr::getType(), GetTypeForDeclaratorCast(), and clang::Declarator::isInvalidType().

bool Sema::ActOnCXXNestedNameSpecifier ( Scope S,
IdentifierInfo Identifier,
SourceLocation  IdentifierLoc,
SourceLocation  CCLoc,
ParsedType  ObjectType,
bool  EnteringContext,
CXXScopeSpec SS,
bool  ErrorRecoveryLookup = false,
bool IsCorrectedToColon = nullptr 
)

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

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).
ErrorRecoveryLookupIf true, then this method is called to improve error recovery. In this case do not emit error message.
IsCorrectedToColonIf not null, suggestions to replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'.
Returns:
true if an error occurred, false otherwise.

Definition at line 775 of file SemaCXXScopeSpec.cpp.

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

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

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

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

References Builder, CheckTemplateIdType(), Context, Diag(), clang::ETK_None, clang::CXXScopeSpec::Extend(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::SourceRange::getBegin(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::DependentTemplateName::getIdentifier(), clang::DependentTemplateName::getQualifier(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeLocInContext(), clang::CXXScopeSpec::getWithLocInContext(), clang::Type::isDependentType(), clang::DependentTemplateName::isIdentifier(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceRange::isValid(), NoteAllFoundTemplates(), clang::TypeLocBuilder::push(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::SourceRange::setBegin(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::TemplateArgumentListInfo::size(), and translateTemplateArguments().

ExprResult Sema::ActOnCXXNew ( SourceLocation  StartLoc,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
Declarator D,
Expr Initializer 
)

ActOnCXXNew - Parsed a C++ 'new' expression.

Parsed a C++ 'new' expression (C++ 5.3.4).

E.g.:

 new (memory) int[size][4] 

or

 ::new Foo(23, "hello") 
Parameters:
StartLocThe first location of the expression.
UseGlobalTrue if 'new' was prefixed with '::'.
PlacementLParenOpening paren of the placement arguments.
PlacementArgsPlacement new arguments.
PlacementRParenClosing paren of the placement arguments.
TypeIdParensIf the type is in parens, the source range.
DThe type to be allocated, as well as array dimensions.
InitializerThe initializing expression or initializer-list, or null if there is none.

Definition at line 1056 of file SemaExprCXX.cpp.

References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, BuildCXXNew(), CCEK_NewExpr, CheckConvertedConstantExpression(), clang::DeclSpec::containsPlaceholderType(), Context, Diag(), clang::Declarator::DropFirstTypeObject(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Declarator::getDeclSpec(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::Declarator::getLocEnd(), clang::Declarator::getNumTypeObjects(), clang::ASTContext::getSizeType(), clang::Declarator::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Declarator::getTypeObject(), clang::DeclaratorChunk::ArrayTypeInfo::hasStatic, clang::Declarator::isInvalidType(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Loc, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, and VerifyIntegerConstantExpression().

ActOnCXXNullPtrLiteral - Parse 'nullptr'.

Definition at line 577 of file SemaExprCXX.cpp.

References Context, and clang::ASTContext::NullPtrTy.

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

References CheckCXXThisCapture(), Context, Diag(), getCurrentThisType(), and clang::QualType::isNull().

Referenced by DefineImplicitLambdaToBlockPointerConversion().

ExprResult Sema::ActOnCXXThrow ( Scope S,
SourceLocation  OpLoc,
Expr expr 
)
StmtResult Sema::ActOnCXXTryBlock ( SourceLocation  TryLoc,
Stmt TryBlock,
ArrayRef< Stmt * >  Handlers 
)

ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them.

Definition at line 3243 of file SemaStmt.cpp.

References Context, clang::CXXTryStmt::Create(), Diag(), clang::ASTContext::getCanonicalType(), clang::CXXCatchStmt::getCaughtType(), clang::CXXCatchStmt::getExceptionDecl(), clang::CXXCatchStmt::getLocStart(), and clang::StmtError().

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

References BuildCXXTypeConstructExpr(), Context, clang::ExprError(), clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().

ExprResult Sema::ActOnCXXTypeid ( SourceLocation  OpLoc,
SourceLocation  LParenLoc,
bool  isType,
void *  TyOrExpr,
SourceLocation  RParenLoc 
)
ExprResult Sema::ActOnCXXUuidof ( SourceLocation  OpLoc,
SourceLocation  LParenLoc,
bool  isType,
void *  TyOrExpr,
SourceLocation  RParenLoc 
)

Definition at line 4332 of file SemaDeclCXX.cpp.

References SetCtorInitializers().

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

Definition at line 412 of file SemaStmt.cpp.

References Context, and 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 6494 of file SemaDeclCXX.cpp.

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

void Sema::actOnDelayedExceptionSpecification ( Decl Method,
ExceptionSpecificationType  EST,
SourceRange  SpecificationRange,
ArrayRef< ParsedType DynamicExceptions,
ArrayRef< SourceRange DynamicExceptionRanges,
Expr NoexceptExpr 
)

Add an exception-specification to the given member function (or member function template). The exception-specification was parsed after the method itself was declared.

Definition at line 13423 of file SemaDeclCXX.cpp.

References clang::ASTContext::adjustExceptionSpec(), clang::CXXMethodDecl::begin_overridden_methods(), checkExceptionSpecification(), CheckOverridingFunctionExceptionSpec(), checkThisInStaticMemberFunctionExceptionSpec(), clang::CXXMethodDecl::end_overridden_methods(), clang::CXXMethodDecl::isStatic(), and clang::CXXMethodDecl::isVirtual().

ExprResult Sema::ActOnDependentIdExpression ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
bool  isAddressOfOperand,
const TemplateArgumentListInfo TemplateArgs 
)

ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed. This is only possible with an explicit scope specifier naming a dependent type.

Definition at line 407 of file SemaTemplate.cpp.

References Context, clang::CXXDependentScopeMemberExpr::Create(), and clang::CXXScopeSpec::getWithLocInContext().

ExprResult Sema::ActOnDependentMemberExpr ( Expr Base,
QualType  BaseType,
bool  IsArrow,
SourceLocation  OpLoc,
const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
NamedDecl FirstQualifierInScope,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
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 
)

Should be called on all declarations that might have attached documentation comments.

Definition at line 9720 of file SemaDecl.cpp.

Referenced by ActOnAliasDeclaration(), ActOnAtEnd(), ActOnEnumConstant(), ActOnMethodDeclaration(), ActOnProperty(), and ActOnStartNamespaceDef().

void Sema::ActOnDocumentableDecls ( ArrayRef< Decl * >  Group)
StmtResult Sema::ActOnDoStmt ( SourceLocation  DoLoc,
Stmt Body,
SourceLocation  WhileLoc,
SourceLocation  CondLParen,
Expr Cond,
SourceLocation  CondRParen 
)
Decl * Sema::ActOnEmptyDeclaration ( Scope S,
AttributeList AttrList,
SourceLocation  SemiLoc 
)

Handle a C++11 empty-declaration and attribute-declaration.

Definition at line 11695 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::EmptyDecl::Create(), CurContext, and ProcessDeclAttributeList().

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 619 of file Sema.cpp.

References clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), CheckCompleteVariableDeclaration(), CheckDelayedMemberExceptionSpecs(), CheckDelegatingCtorCycles(), checkUndefinedButUsed(), clang::ASTConsumer::CompleteTentativeDefinition(), Consumer, Context, DefineUsedVTables(), DelayedDefaultedMemberExceptionSpecs, DelayedDestructorExceptionSpecChecks, Diag(), DiagnoseUseOfUnimplementedSelectors(), Diags, DynamicClasses, emitAndClearUnusedLocalTypedefWarnings(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::erase(), clang::VarDecl::getActingDefinition(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getCurrentKeyFunction(), clang::Preprocessor::getCurrentModule(), clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::SourceManager::getExpansionLoc(), clang::Preprocessor::getHeaderSearchInfo(), clang::Decl::getLocation(), clang::HeaderSearch::getModuleMap(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::Preprocessor::isCodeCompletionEnabled(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDeleted(), clang::DiagnosticsEngine::isIgnored(), clang::SourceManager::isInMainFile(), clang::Decl::isInvalidDecl(), IsRecordFullyDefined(), clang::Decl::isReferenced(), clang::TagDecl::isUnion(), clang::LazyVector< VarDecl *, ExternalSemaSource,&ExternalSemaSource::ReadTentativeDefinitions, 2, 2 >::iterator, clang::LazyVector< const DeclaratorDecl *, ExternalSemaSource,&ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 >::iterator, clang::LazyVector< CXXRecordDecl *, ExternalSemaSource,&ExternalSemaSource::ReadDynamicClasses, 2, 2 >::iterator, LangOpts, LateTemplateParserCleanup, LoadExternalWeakUndeclaredIdentifiers(), MarkVTableUsed(), clang::ArrayType::Normal, OpaqueParser, ParsingInitForAutoVars, PendingInstantiations, PerformPendingInstantiations(), PP, clang::ExternalSemaSource::ReadPendingInstantiations(), clang::ExternalSemaSource::ReadUndefinedButUsed(), RequireCompleteType(), clang::ModuleMap::resolveConflicts(), clang::ModuleMap::resolveExports(), clang::ModuleMap::resolveUses(), clang::SC_Static, clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldRemoveFromUnused(), SourceMgr, Stack, clang::Module::submodule_begin(), clang::Module::submodule_end(), TentativeDefinitions, clang::TU_Module, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, UnusedPrivateFields, and WeakUndeclaredIdentifiers.

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

void Sema::ActOnEnumBody ( SourceLocation  EnumLoc,
SourceLocation  LBraceLoc,
SourceLocation  RBraceLoc,
Decl EnumDecl,
ArrayRef< Decl * >  Elements,
Scope S,
AttributeList Attr 
)

Definition at line 13488 of file SemaDecl.cpp.

References CheckAlignasUnderalignment(), CheckForDuplicateEnumValues(), clang::CK_IntegralCast, clang::EnumDecl::completeDefinition(), Context, clang::frontend::CPlusPlus, clang::ImplicitCastExpr::Create(), clang::ASTContext::DependentTy, Diag(), clang::TargetInfo::getCharWidth(), clang::EnumConstantDecl::getInitExpr(), clang::EnumConstantDecl::getInitVal(), clang::EnumDecl::getIntegerType(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::Decl::getLocation(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::ASTContext::getPromotedIntegerType(), clang::TargetInfo::getShortWidth(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::ASTContext::hasSameType(), clang::ASTContext::IntTy, clang::TagDecl::isDependentType(), clang::EnumDecl::isFixed(), clang::Type::isPromotableIntegerType(), isRepresentableIntegerValue(), clang::Type::isSignedIntegerOrEnumerationType(), LangOpts, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, ProcessDeclAttributeList(), clang::EnumConstantDecl::setInitExpr(), clang::EnumConstantDecl::setInitVal(), clang::ValueDecl::setType(), clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::ASTContext::UnsignedShortTy, and clang::VK_RValue.

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

Decl * Sema::ActOnEnumConstant ( Scope S,
Decl EnumDecl,
Decl LastEnumConstant,
SourceLocation  IdLoc,
IdentifierInfo Id,
AttributeList Attrs,
SourceLocation  EqualLoc,
Expr Val 
)

Definition at line 1115 of file SemaDecl.cpp.

DeclResult Sema::ActOnExplicitInstantiation ( Scope S,
SourceLocation  ExternLoc,
SourceLocation  TemplateLoc,
unsigned  TagSpec,
SourceLocation  KWLoc,
const CXXScopeSpec SS,
TemplateTy  Template,
SourceLocation  TemplateNameLoc,
SourceLocation  LAngleLoc,
ASTTemplateArgsPtr  TemplateArgs,
SourceLocation  RAngleLoc,
AttributeList Attr 
)

Definition at line 7024 of file SemaTemplate.cpp.

References CheckExplicitInstantiationScope(), Context, clang::ClassTemplateSpecializationDecl::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::ClassTemplateDecl::findSpecialization(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TemplateDecl::getTemplatedDecl(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTypeDeclType(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isSet(), clang::ClassTemplateSpecializationDecl::setExternLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), SetNestedNameSpecifier(), clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(), clang::TagDecl::setRBraceLoc(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::TTK_Enum.

DeclResult Sema::ActOnExplicitInstantiation ( Scope S,
SourceLocation  ExternLoc,
SourceLocation  TemplateLoc,
unsigned  TagSpec,
SourceLocation  KWLoc,
CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  NameLoc,
AttributeList Attr 
)

Definition at line 7344 of file SemaTemplate.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), CheckExplicitInstantiationScope(), clang::UnresolvedSetImpl::clear(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::FixItHint::CreateRemoval(), clang::Scope::DeclScope, DeduceTemplateArguments(), Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::Type::getAs(), clang::LookupResult::getAsSingle(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Scope::getFlags(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::UnqualifiedId::getKind(), clang::ParsedAttributes::getList(), clang::Decl::getLocation(), clang::TypeLoc::getLocStart(), clang::DeclSpec::getLocStart(), clang::Declarator::getLocStart(), clang::Declarator::getMutableDeclSpec(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), clang::Scope::getParent(), clang::VarDecl::getPointOfInstantiation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::VarDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::UnqualifiedId::IK_TemplateId, clang::LookupResult::isAmbiguous(), clang::DeclSpec::isConstexprSpecified(), clang::FunctionDecl::isDefined(), clang::Type::isFunctionType(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::Declarator::isInvalidType(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::MakeDeductionFailureInfo(), makeTemplateArgumentListInfo(), Matches, P, Previous, ScopeSpecifierHasTemplateId(), clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::FunctionDecl::setTemplateSpecializationKind(), clang::UnqualifiedId::TemplateId, clang::Scope::TemplateParamScope, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.

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

Definition at line 4011 of file SemaExprCXX.cpp.

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

Definition at line 57 of file SemaStmt.cpp.

References clang::StmtError().

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

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

Definition at line 12108 of file SemaDecl.cpp.

References clang::AS_public, and clang::ICIS_NoInit.

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

A field cannot be an Objective-c object

Definition at line 12620 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::frontend::C99, clang::TagDecl::completeDefinition(), Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::DeclContext::decls(), Diag(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getKind(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::TagDecl::getTagKind(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::RecordDecl::hasFlexibleArrayMember(), clang::RecordDecl::hasObjectMember(), clang::RecordDecl::hasVolatileMember(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::Type::isBlockPointerType(), clang::CXXRecordDecl::isCLike(), clang::Type::isDependentType(), clang::TagDecl::isDependentType(), clang::QualType::isDestructedType(), clang::DeclContext::isExternCContext(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::QualType::isObjCGCStrong(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isRecordType(), clang::TagDecl::isUnion(), clang::QualType::isVolatileQualified(), clang::CharUnits::isZero(), clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_ExplicitNone, Record, clang::ASTContext::ResetObjCLayout(), clang::RecordDecl::setHasFlexibleArrayMember(), clang::RecordDecl::setHasObjectMember(), clang::RecordDecl::setHasVolatileMember(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), and clang::ValueDecl::setType().

Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().

Decl * Sema::ActOnFileScopeAsmDecl ( Expr expr,
SourceLocation  AsmLoc,
SourceLocation  RParenLoc 
)
void Sema::ActOnFinishCXXInClassMemberInitializer ( Decl VarDecl,
SourceLocation  EqualLoc,
Expr Init 
)

Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.

Definition at line 9267 of file SemaDeclCXX.cpp.

References CurContext, DelayedDefaultedMemberExceptionSpecs, DelayedDestructorExceptionSpecChecks, and clang::Decl::isInvalidDecl().

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

References clang::ParsedAttributes::getList().

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

Definition at line 6516 of file SemaDeclCXX.cpp.

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

Definition at line 6461 of file SemaDeclCXX.cpp.

References PopDeclContext().

Definition at line 8793 of file SemaDeclCXX.cpp.

References CheckDelayedMemberExceptionSpecs().

Referenced by InstantiateClass().

ExprResult Sema::ActOnFinishFullExpr ( Expr Expr,
SourceLocation  CC,
bool  DiscardedValue = false,
bool  IsConstexpr = false,
bool  IsLambdaInitCaptureInitializer = false 
)

Definition at line 6197 of file SemaExprCXX.cpp.

References MaybeCreateStmtWithCleanups(), and clang::StmtError().

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

Definition at line 10400 of file SemaDecl.cpp.

Referenced by InstantiateFunctionDefinition().

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

Definition at line 10050 of file SemaDecl.cpp.

Referenced by checkDLLAttribute().

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

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

Sema::DeclGroupPtrTy Sema::ActOnFinishObjCImplementation ( Decl ObjCImpDecl,
ArrayRef< Decl * >  Decls 
)

Definition at line 312 of file SemaStmt.cpp.

StmtResult Sema::ActOnFinishSwitchStmt ( SourceLocation  SwitchLoc,
Stmt Switch,
Stmt Body 
)

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 1639 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::ActOnForwardProtocolDeclaration ( SourceLocation  AtProtoclLoc,
const IdentifierLocPair IdentList,
unsigned  NumElts,
AttributeList attrList 
)

Definition at line 12217 of file SemaDeclCXX.cpp.

References ActOnFunctionDeclarator(), clang::DeclContext::addDecl(), adjustContextForLocalExternDecl(), clang::AS_public, CheckFriendAccess(), clang::CXXScopeSpec::clear(), clang::LookupResult::clear(), computeDeclContext(), clang::FriendDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseUnexpandedParameterPack(), Diags, clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), ForRedeclaration, functionDeclHasDefaultArgument(), clang::SourceRange::getBegin(), clang::DeclarationNameInfo::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::Scope::getFnParent(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::DeclContext::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), getScopeForDeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::LookupResult::Filter::hasNext(), clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_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::Type::isFunctionType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::DeclContext::isTransparentContext(), clang::CXXScopeSpec::isValid(), LookupLocalFriendName, LookupName(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), Previous, PushOnScopeChains(), RequireCompleteDeclContext(), S, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Scope::setEntity(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::FriendDecl::setUnsupportedFriend(), and UPPC_FriendDeclaration.

Decl * Sema::ActOnFriendTypeDecl ( Scope S,
const DeclSpec DS,
MultiTemplateParamsArg  TempParams 
)

Handle a friend type declaration. This works in tandem with ActOnTag.

Notes on friend class templates:

We generally treat friend class declarations as if they were declaring a class. So, for example, the elaborated type specifier in a friend declaration is required to obey the restrictions of a class-head (i.e. no typedefs in the scope chain), template parameters are required to match up with simple template-ids, &c. However, unlike when declaring a template specialization, it's okay to refer to a template specialization without an empty template parameter declaration, e.g. friend class A<T>::B<unsigned>; We permit this as a special case; if there are any template parameters present at all, require proper matching, i.e. template <> template <class T> friend class A<int>::B;

Definition at line 12148 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckFriendTypeDecl(), clang::FriendTemplateDecl::Create(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), clang::DeclSpec::getFriendSpecLoc(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Type::isElaboratedTypeSpecifier(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::MemberContext, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), and UPPC_FriendDeclaration.

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

Definition at line 6903 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::AS_public, clang::Type::castAs(), clang::CC_X86StdCall, checkAttributesAfterMerging(), checkDLLAttributeRedeclaration(), checkIsValidOpenCLKernelParameter(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus14, clang::FunctionTemplateDecl::Create(), clang::ClassScopeFunctionSpecializationDecl::Create(), clang::FixItHint::CreateInsertion(), CreateNewFunctionDecl(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::DeclarationName::CXXDestructorName, clang::ASTContext::DependentTy, Diag(), DiagnoseInvalidRedeclaration(), clang::Decl::dropAttr(), clang::LookupResult::empty(), clang::EST_BasicNoexcept, clang::FDK_Declaration, clang::FDK_Defaulted, clang::FDK_Definition, clang::FDK_Deleted, clang::LookupResult::FoundOverloaded, clang::FTIHasNonVoidParameters(), clang::Decl::getAccess(), clang::QualType::getAddressSpace(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Declarator::getAsmLabel(), clang::FunctionType::ExtInfo::getCC(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclarationName::getCXXOverloadedOperator(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::ASTContext::getDefaultCallingConvention(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::DeclSpec::getExplicitSpecLoc(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Declarator::getFunctionDefinitionKind(), getFunctionStorageClass(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getName(), clang::FunctionType::getNameForCallConv(), clang::DeclarationName::getNameKind(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getParamTypes(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeCXXRecordDecl(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionTemplateDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::FunctionTemplateSpecializationInfo::getTemplate(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::DeclSpec::getVirtualSpecLoc(), clang::Decl::hasAttr(), clang::FunctionProtoType::hasExceptionSpec(), clang::Decl::IDNS_Ordinary, clang::UnqualifiedId::IK_TemplateId, clang::DeclSpec::isConstexprSpecified(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclSpec::isExplicitSpecified(), clang::NamedDecl::isExternallyVisible(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::Declarator::isFirstDeclarationOfMember(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionNoProtoType(), clang::Type::isFunctionType(), isIncompleteDeclExternC(), clang::Decl::isInIdentifierNamespace(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::FunctionDecl::isMain(), clang::DeclSpec::isModulePrivateSpecified(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::DeclSpec::isNoreturnSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::Declarator::isRedeclaration(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isScalarType(), clang::CXXScopeSpec::isSet(), clang::Declarator::isStaticMember(), clang::DeclContext::isTranslationUnit(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Type::isVariablyModifiedType(), clang::DeclSpec::isVirtualSpecified(), clang::Type::isVoidType(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::LangAS::opencl_constant, clang::LangAS::opencl_global, clang::LangAS::opencl_local, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::FunctionDecl::params(), clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::TemplateIdAnnotation::RAngleLoc, S, clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::ASTContext::setcudaConfigureCallDecl(), clang::Decl::setDeclContext(), clang::FunctionDecl::setDeclsInPrototypeScope(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setDeletedAsWritten(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::FunctionDecl::setPure(), clang::FunctionDecl::setRangeEnd(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::Declarator::setRedeclaration(), clang::ParmVarDecl::setScopeInfo(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::Decl::setTopLevelDeclInObjCContainer(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), shouldConsiderLinkage(), clang::TemplateArgumentListInfo::size(), clang::supportsVariadicCall(), clang::UnqualifiedId::TemplateId, clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().

Referenced by ActOnFriendFunctionDecl(), and DiagnoseInvalidRedeclaration().

StmtResult Sema::ActOnGCCAsmStmt ( SourceLocation  AsmLoc,
bool  IsSimple,
bool  IsVolatile,
unsigned  NumOutputs,
unsigned  NumInputs,
IdentifierInfo **  Names,
MultiExprArg  Constraints,
MultiExprArg  Exprs,
Expr AsmString,
MultiExprArg  Clobbers,
SourceLocation  RParenLoc 
)

Definition at line 104 of file SemaStmtAsm.cpp.

References clang::GCCAsmStmt::AnalyzeAsmString(), CheckAsmLValue(), CheckNakedParmReference(), clang::CK_IntegralCast, clang::CK_IntegralToBoolean, Context, clang::FixItHint::CreateReplacement(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CharSourceRange::getBegin(), clang::Stmt::getLocStart(), clang::StringLiteral::getLocStart(), clang::GCCAsmStmt::AsmStringPiece::getModifier(), clang::IdentifierInfo::getName(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::GCCAsmStmt::AsmStringPiece::getOperandNo(), clang::GCCAsmStmt::AsmStringPiece::getRange(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::GCCAsmStmt::AsmStringPiece::getString(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameType(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::StringLiteral::isAscii(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Expr::isEvaluatable(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::GCCAsmStmt::AsmStringPiece::isOperand(), isOperandMentioned(), clang::Type::isPointerType(), clang::TargetInfo::ConstraintInfo::isReadWrite(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), clang::TargetInfo::isValidClobber(), clang::Type::isVoidType(), clang::GCCAsmStmt::setInputExpr(), clang::StmtError(), clang::TargetInfo::validateConstraintModifier(), clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateInputSize(), clang::TargetInfo::validateOutputConstraint(), and clang::TargetInfo::validateOutputSize().

ExprResult Sema::ActOnGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
Expr ControllingExpr,
ArrayRef< ParsedType ArgTypes,
ArrayRef< Expr * >  ArgExprs 
)

Definition at line 1253 of file SemaExpr.cpp.

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

Definition at line 2363 of file SemaStmt.cpp.

References Context, and clang::Decl::markUsed().

ExprResult Sema::ActOnIdExpression ( Scope S,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
bool  HasTrailingLParen,
bool  IsAddressOfOperand,
std::unique_ptr< CorrectionCandidateCallback CCC = nullptr,
bool  IsInlineAsmIdentifier = false 
)
StmtResult Sema::ActOnIfStmt ( SourceLocation  IfLoc,
FullExprArg  CondVal,
Decl CondVar,
Stmt ThenVal,
SourceLocation  ElseLoc,
Stmt ElseVal 
)
StmtResult Sema::ActOnIndirectGotoStmt ( SourceLocation  GotoLoc,
SourceLocation  StarLoc,
Expr DestExp 
)

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

References Context, clang::ASTContext::getBaseElementType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().

ExprResult Sema::ActOnInitList ( SourceLocation  LBraceLoc,
MultiExprArg  InitArgList,
SourceLocation  RBraceLoc 
)
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,
bool  IsInstantiation = false 
)

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

Definition at line 1133 of file SemaLambda.cpp.

References clang::Decl::getLocation(), clang::sema::LambdaScopeInfo::Lambda, and clang::Decl::setInvalidDecl().

ExprResult Sema::ActOnLambdaExpr ( SourceLocation  StartLoc,
Stmt Body,
Scope CurScope,
bool  IsInstantiation = false 
)

ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.

Definition at line 1373 of file SemaLambda.cpp.

References addBlockPointerConversion(), clang::DeclContext::addDecl(), addFunctionPointerConversion(), clang::sema::LambdaScopeInfo::ArrayIndexStarts, clang::sema::LambdaScopeInfo::ArrayIndexVars, clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::CapturingScopeInfo::Captures, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, Context, clang::frontend::CPlusPlus14, clang::LambdaExpr::Create(), clang::sema::LambdaScopeInfo::ExplicitParams, clang::sema::LambdaScopeInfo::ExprNeedsCleanups, clang::Type::getAs(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), clang::FunctionProtoType::getParamTypes(), clang::ValueDecl::getType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::sema::CapturingScopeInfo::ImpCap_Block, clang::sema::CapturingScopeInfo::ImpCap_CapturedRegion, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::CXXRecordDecl::isGenericLambda(), clang::QualType::isNull(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, clang::LCK_VLAType, clang::sema::LambdaScopeInfo::NumExplicitCaptures, clang::sema::CapturingScopeInfo::ReturnType, clang::Decl::setLexicalDeclContext(), clang::ValueDecl::setType(), and clang::ASTContext::VoidTy.

void Sema::ActOnLastBitfield ( SourceLocation  DeclLoc,
SmallVectorImpl< Decl * > &  AllIvarDecls 
)

ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions. For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface.

Definition at line 12586 of file SemaDecl.cpp.

References clang::ASTContext::CharTy, Context, clang::IntegerLiteral::Create(), clang::ObjCIvarDecl::Create(), clang::FieldDecl::getBitWidthValue(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeSize(), clang::ASTContext::IntTy, clang::FieldDecl::isBitField(), and clang::ObjCIvarDecl::Private.

ExprResult Sema::ActOnMemberAccessExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
Decl ObjCImpDecl,
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 Objective-C @implementation decl; this is an ugly hack around the fact that Objective-C @implementations aren't properly put in the context chain

Definition at line 1598 of file SemaExprMember.cpp.

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

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

Handle a C++ member initializer using parentheses syntax.

Definition at line 2734 of file SemaDeclCXX.cpp.

References BuildMemInitializer(), and Context.

MemInitResult Sema::ActOnMemInitializer ( Decl ConstructorD,
Scope S,
CXXScopeSpec SS,
IdentifierInfo MemberOrBase,
ParsedType  TemplateTypeTy,
const DeclSpec DS,
SourceLocation  IdLoc,
Expr InitList,
SourceLocation  EllipsisLoc 
)

Handle a C++ member initializer using braced-init-list syntax.

Definition at line 2718 of file SemaDeclCXX.cpp.

References BuildMemInitializer().

void Sema::ActOnMemInitializers ( Decl ConstructorDecl,
SourceLocation  ColonLoc,
ArrayRef< CXXCtorInitializer * >  MemInits,
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 3080 of file SemaDeclObjC.cpp.

References ActOnDocumentableDecl(), clang::Decl::addAttr(), clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), CheckARCMethodDecl(), CheckFunctionReturnType(), CheckObjCMethodOverrides(), CheckParameter(), CheckRelatedResultTypeCompatibility(), Context, clang::ObjCMethodDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, CvtQTToAstBitMask(), Diag(), ForRedeclaration, clang::ASTContext::getAdjustedParameterType(), clang::TypeLoc::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::Selector::getNumArgs(), clang::ObjCDeclSpec::getObjCDeclQualifier(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getSelector(), clang::ValueDecl::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), IdResolver, clang::ObjCMethodDecl::isClassMethod(), clang::Scope::isDeclScope(), clang::ObjCMethodDecl::isInstanceMethod(), clang::DeclContext::isObjCContainer(), clang::ObjCMethodDecl::isOverriding(), clang::LookupResult::isSingleResult(), LangOpts, LookupName(), LookupOrdinaryName, clang::Sema::ObjCArgInfo::Name, clang::Sema::ObjCArgInfo::NameLoc, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::Optional, clang::DeclaratorChunk::ParamInfo::Param, ProcessDeclAttributeList(), clang::ObjCMethodDecl::Required, RTC_Compatible, clang::SC_None, clang::Decl::setDeclContext(), clang::Decl::setInvalidDecl(), clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCMethodScopeInfo(), clang::ObjCMethodDecl::SetRelatedResultType(), and TUScope.

void Sema::ActOnModuleInclude ( SourceLocation  DirectiveLoc,
Module Mod 
)

The parser has processed a module import translated from a #include or similar preprocessing directive.

Definition at line 13796 of file SemaDecl.cpp.

References clang::Module::AllVisible, checkModuleImportContext(), CurContext, getModuleLoader(), and clang::ModuleLoader::makeModuleVisible().

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

StmtResult Sema::ActOnMSAsmStmt ( SourceLocation  AsmLoc,
SourceLocation  LBraceLoc,
ArrayRef< Token AsmToks,
StringRef  AsmString,
unsigned  NumOutputs,
unsigned  NumInputs,
ArrayRef< StringRef >  Constraints,
ArrayRef< StringRef >  Clobbers,
ArrayRef< Expr * >  Exprs,
SourceLocation  EndLoc 
)

Definition at line 540 of file SemaStmtAsm.cpp.

References Context.

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

Definition at line 3363 of file SemaStmt.cpp.

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

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

Definition at line 5672 of file SemaExprCXX.cpp.

References BuildCXXNoexceptExpr().

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

References Context.

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

Definition at line 3079 of file SemaStmt.cpp.

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

Definition at line 3090 of file SemaStmt.cpp.

References Context.

StmtResult Sema::ActOnObjCAtSynchronizedStmt ( SourceLocation  AtLoc,
Expr SynchExpr,
Stmt SynchBody 
)

Definition at line 3186 of file SemaStmt.cpp.

References Context.

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

Definition at line 3095 of file SemaStmt.cpp.

References Context, clang::ObjCAtTryStmt::Create(), and Diag().

Definition at line 3204 of file SemaStmt.cpp.

References Context.

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

Definition at line 11995 of file SemaDecl.cpp.

Referenced by ActOnAtEnd().

StmtResult Sema::ActOnObjCForCollectionStmt ( SourceLocation  ForColLoc,
Stmt First,
Expr collection,
SourceLocation  RParenLoc 
)

The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration. Return the appropriate type.

Definition at line 3902 of file SemaType.cpp.

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

Definition at line 12006 of file SemaDecl.cpp.

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

OMPClause * Sema::ActOnOpenMPAlignedClause ( ArrayRef< Expr * >  VarList,
Expr Alignment,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc 
)
StmtResult Sema::ActOnOpenMPAtomicDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp barrier'.

Definition at line 3170 of file SemaOpenMP.cpp.

References Context, and clang::OMPBarrierDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed 'capture' clause.

Definition at line 3933 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

OMPClause * Sema::ActOnOpenMPCollapseClause ( Expr NumForLoops,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPCopyinClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPCopyprivateClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
StmtResult Sema::ActOnOpenMPCriticalDirective ( const DeclarationNameInfo DirName,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp critical' after parsing of the associated statement.

Definition at line 3043 of file SemaOpenMP.cpp.

References Context, clang::OMPCriticalDirective::Create(), getCurFunction(), and clang::sema::FunctionScopeInfo::setHasBranchProtectedScope().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed 'default' clause.

Definition at line 3664 of file SemaOpenMP.cpp.

References Context, Diag(), DSAStack, clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), and clang::SrcMgr::static_assert().

Referenced by ActOnOpenMPSimpleClause().

StmtResult Sema::ActOnOpenMPExecutableDirective ( OpenMPDirectiveKind  Kind,
const DeclarationNameInfo DirName,
ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPFinalClause ( Expr Condition,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPFirstprivateClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPFlushClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'flush' pseudo clause.

Definition at line 5292 of file SemaOpenMP.cpp.

References Context, and clang::OMPFlushClause::Create().

Referenced by ActOnOpenMPVarListClause().

StmtResult Sema::ActOnOpenMPFlushDirective ( ArrayRef< OMPClause * >  Clauses,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp flush'.

Definition at line 3180 of file SemaOpenMP.cpp.

References Context, and clang::OMPFlushDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

StmtResult Sema::ActOnOpenMPForDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
llvm::DenseMap< VarDecl *, Expr * > &  VarsWithImplicitDSA 
)
StmtResult Sema::ActOnOpenMPForSimdDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
llvm::DenseMap< VarDecl *, Expr * > &  VarsWithImplicitDSA 
)

Called on well-formed '#pragma omp for simd' after parsing of the associated statement.

Definition at line 2958 of file SemaOpenMP.cpp.

References CheckOpenMPLoop(), Context, clang::OMPForSimdDirective::Create(), DSAStack, GetCollapseNumberExpr(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

ExprResult Sema::ActOnOpenMPIdExpression ( Scope CurScope,
CXXScopeSpec ScopeSpec,
const DeclarationNameInfo Id 
)
OMPClause * Sema::ActOnOpenMPIfClause ( Expr Condition,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPLastprivateClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPLinearClause ( ArrayRef< Expr * >  VarList,
Expr Step,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp master' after parsing of the associated statement.

Definition at line 3032 of file SemaOpenMP.cpp.

References Context, clang::OMPMasterDirective::Create(), getCurFunction(), and clang::sema::FunctionScopeInfo::setHasBranchProtectedScope().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed 'mergeable' clause.

Definition at line 3913 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

Called on well-formed 'nowait' clause.

Definition at line 3903 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

OMPClause * Sema::ActOnOpenMPNumThreadsClause ( Expr NumThreads,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'ordered' clause.

Definition at line 3897 of file SemaOpenMP.cpp.

References Context, and DSAStack.

Referenced by ActOnOpenMPClause().

Called on well-formed '#pragma omp ordered' after parsing of the associated statement.

Definition at line 3187 of file SemaOpenMP.cpp.

References Context, clang::OMPOrderedDirective::Create(), getCurFunction(), and clang::sema::FunctionScopeInfo::setHasBranchProtectedScope().

Referenced by ActOnOpenMPExecutableDirective().

StmtResult Sema::ActOnOpenMPParallelDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp parallel' after parsing of the associated statement.

Definition at line 1863 of file SemaOpenMP.cpp.

References Context, clang::OMPParallelDirective::Create(), clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::CapturedDecl::setNothrow().

Referenced by ActOnOpenMPExecutableDirective().

StmtResult Sema::ActOnOpenMPParallelForDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
llvm::DenseMap< VarDecl *, Expr * > &  VarsWithImplicitDSA 
)
StmtResult Sema::ActOnOpenMPParallelForSimdDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
llvm::DenseMap< VarDecl *, Expr * > &  VarsWithImplicitDSA 
)
StmtResult Sema::ActOnOpenMPParallelSectionsDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.

Definition at line 3114 of file SemaOpenMP.cpp.

References AttributeLangSupport::C, Context, clang::OMPParallelSectionsDirective::Create(), Diag(), getCurFunction(), clang::Stmt::getLocStart(), S, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

OMPClause * Sema::ActOnOpenMPPrivateClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'proc_bind' clause.

Definition at line 3708 of file SemaOpenMP.cpp.

References Context, Diag(), clang::getOpenMPClauseName(), and clang::getOpenMPSimpleClauseTypeName().

Referenced by ActOnOpenMPSimpleClause().

Called on well-formed 'read' clause.

Definition at line 3918 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

OMPClause * Sema::ActOnOpenMPReductionClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId 
)

Called on well-formed 'reduction' clause.

Definition at line 4613 of file SemaOpenMP.cpp.

References AR_inaccessible, clang::BO_AddAssign, clang::BO_AndAssign, clang::BO_Comma, clang::BO_GT, clang::BO_LAnd, clang::BO_LOr, clang::BO_LT, clang::BO_MulAssign, clang::BO_OrAssign, clang::BO_XorAssign, BuildBinOp(), CheckConstructorAccess(), CheckDestructorAccess(), Context, clang::OMPReductionClause::Create(), clang::VarDecl::DeclarationOnly, Diag(), DiagnoseUseOfDecl(), DSAStack, clang::Decl::getAccess(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationName::getCXXOverloadedOperator(), clang::VarDecl::getDefinition(), clang::CXXRecordDecl::getDestructor(), getDiagnostics(), clang::DeclarationNameInfo::getEndLoc(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getLocStart(), clang::DeclarationNameInfo::getName(), clang::getOpenMPClauseName(), clang::DiagnosticsEngine::getSuppressAllDiagnostics(), clang::CXXScopeSpec::getWithLocInContext(), clang::InitializedEntity::InitializeTemporary(), clang::FunctionDecl::isDeleted(), clang::CXXScopeSpec::isEmpty(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isOpenMPParallelDirective(), clang::isOpenMPWorksharingDirective(), clang::CXXScopeSpec::isValid(), LookupDefaultConstructor(), MarkFunctionReferenced(), ReportOriginalDSA(), RequireCompleteType(), clang::SourceRange::setBegin(), clang::SourceRange::setEnd(), and clang::DiagnosticsEngine::setSuppressAllDiagnostics().

Referenced by ActOnOpenMPVarListClause().

void Sema::ActOnOpenMPRegionStart ( OpenMPDirectiveKind  DKind,
Scope CurScope 
)

Initialization of captured region for OpenMP region.

Definition at line 1005 of file SemaOpenMP.cpp.

References ActOnCapturedRegionStart(), Context, clang::CR_OpenMP, DSAStack, clang::ASTContext::getIntTypeForBitwidth(), and clang::ASTContext::getPointerType().

OMPClause * Sema::ActOnOpenMPSafelenClause ( Expr Length,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
OMPClause * Sema::ActOnOpenMPScheduleClause ( OpenMPScheduleClauseKind  Kind,
Expr ChunkSize,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  KindLoc,
SourceLocation  CommaLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp section' after parsing of the associated statement.

Definition at line 3011 of file SemaOpenMP.cpp.

References Context, clang::OMPSectionDirective::Create(), getCurFunction(), and clang::sema::FunctionScopeInfo::setHasBranchProtectedScope().

Referenced by ActOnOpenMPExecutableDirective().

StmtResult Sema::ActOnOpenMPSectionsDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp sections' after parsing of the associated statement.

Definition at line 2977 of file SemaOpenMP.cpp.

References AttributeLangSupport::C, Context, clang::OMPSectionsDirective::Create(), Diag(), getCurFunction(), clang::Stmt::getLocStart(), S, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed 'seq_cst' clause.

Definition at line 3938 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

OMPClause * Sema::ActOnOpenMPSharedClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
StmtResult Sema::ActOnOpenMPSimdDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
llvm::DenseMap< VarDecl *, Expr * > &  VarsWithImplicitDSA 
)
OMPClause * Sema::ActOnOpenMPSimpleClause ( OpenMPClauseKind  Kind,
unsigned  Argument,
SourceLocation  ArgumentLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Definition at line 3617 of file SemaOpenMP.cpp.

References ActOnOpenMPDefaultClause(), and ActOnOpenMPProcBindClause().

StmtResult Sema::ActOnOpenMPSingleDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp single' after parsing of the associated statement.

Definition at line 3021 of file SemaOpenMP.cpp.

References Context, clang::OMPSingleDirective::Create(), getCurFunction(), and clang::sema::FunctionScopeInfo::setHasBranchProtectedScope().

Referenced by ActOnOpenMPExecutableDirective().

OMPClause * Sema::ActOnOpenMPSingleExprWithArgClause ( OpenMPClauseKind  Kind,
unsigned  Argument,
Expr Expr,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ArgumentLoc,
SourceLocation  CommaLoc,
SourceLocation  EndLoc 
)

Definition at line 3739 of file SemaOpenMP.cpp.

References ActOnOpenMPScheduleClause().

StmtResult Sema::ActOnOpenMPTargetDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
StmtResult Sema::ActOnOpenMPTaskDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp task' after parsing of the associated statement.

Definition at line 3148 of file SemaOpenMP.cpp.

References Context, clang::OMPTaskDirective::Create(), clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::CapturedDecl::setNothrow().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed '#pragma omp taskwait'.

Definition at line 3175 of file SemaOpenMP.cpp.

References Context, and clang::OMPTaskwaitDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed '#pragma omp taskyield'.

Definition at line 3165 of file SemaOpenMP.cpp.

References Context, and clang::OMPTaskyieldDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

StmtResult Sema::ActOnOpenMPTeamsDirective ( ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed '#pragma omp teams' after parsing of the associated statement.

Definition at line 3386 of file SemaOpenMP.cpp.

References Context, clang::OMPTeamsDirective::Create(), clang::CapturedStmt::getCapturedDecl(), getCurFunction(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), and clang::CapturedDecl::setNothrow().

Referenced by ActOnOpenMPExecutableDirective().

Called on well-formed '#pragma omp threadprivate'.

Definition at line 764 of file SemaOpenMP.cpp.

References clang::DeclContext::addDecl(), CheckOMPThreadPrivateDecl(), CurContext, and clang::OpaquePtr< PtrTy >::make().

Called on well-formed 'untied' clause.

Definition at line 3908 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

Called on well-formed 'update' clause.

Definition at line 3928 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

OMPClause * Sema::ActOnOpenMPVarListClause ( OpenMPClauseKind  Kind,
ArrayRef< Expr * >  Vars,
Expr TailExpr,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId 
)

Called on well-formed 'write' clause.

Definition at line 3923 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

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 458 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 506 of file SemaTemplateVariadic.cpp.

References CheckPackExpansion().

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

Definition at line 9764 of file SemaDecl.cpp.

References clang::Scope::AddDecl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Scope::getFunctionPrototypeDepth(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::Declarator::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getMutableDeclSpec(), clang::Scope::getNextFunctionPrototypeIndex(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), clang::Decl::hasAttr(), clang::Declarator::hasName(), clang::DeclSpec::isConstexprSpecified(), clang::Scope::isDeclScope(), clang::Scope::isFunctionPrototypeScope(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::SC_Auto, clang::SC_None, clang::SC_Register, clang::DeclSpec::SCS_auto, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_unspecified, clang::Declarator::SetIdentifier(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), and clang::ParmVarDecl::setScopeInfo().

void Sema::ActOnParamDefaultArgument ( Decl param,
SourceLocation  EqualLoc,
Expr DefaultArg 
)

ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed. If so, attach it to the parameter declaration.

Definition at line 299 of file SemaDeclCXX.cpp.

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

void Sema::ActOnParamDefaultArgumentError ( Decl param,
SourceLocation  EqualLoc 
)

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

Definition at line 348 of file SemaDeclCXX.cpp.

References Context, clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ParmVarDecl::setDefaultArg(), clang::Decl::setInvalidDecl(), UnparsedDefaultArgLocs, and clang::VK_RValue.

void Sema::ActOnParamUnparsedDefaultArgument ( Decl param,
SourceLocation  EqualLoc,
SourceLocation  ArgLoc 
)

ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter, but we can't parse it yet because we're inside a class definition. Note that this default argument will be parsed later.

Definition at line 335 of file SemaDeclCXX.cpp.

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

Definition at line 3319 of file SemaExpr.cpp.

References Context.

Referenced by ActOnDecltypeExpression(), BuildCounterUpdate(), and CheckOpenMPLoop().

Definition at line 5373 of file SemaExpr.cpp.

References Context, and clang::ast_matchers::expr.

Referenced by clang::InitializationSequence::Perform().

void Sema::ActOnPopScope ( SourceLocation  Loc,
Scope S 
)
void Sema::ActOnPragmaDetectMismatch ( StringRef  Name,
StringRef  Value 
)

ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.

Definition at line 291 of file SemaAttr.cpp.

References Consumer, and clang::ASTConsumer::HandleDetectMismatch().

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

Definition at line 562 of file SemaAttr.cpp.

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

void Sema::ActOnPragmaMSComment ( PragmaMSCommentKind  Kind,
StringRef  Arg 
)

ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").

Definition at line 272 of file SemaAttr.cpp.

References Consumer, clang::ASTConsumer::HandleDependentLibrary(), clang::ASTConsumer::HandleLinkerOptionPragma(), PCK_Compiler, PCK_ExeStr, PCK_Lib, PCK_Linker, PCK_Unknown, and PCK_User.

void Sema::ActOnPragmaMSInitSeg ( SourceLocation  PragmaLocation,
StringLiteral SegmentName 
)

Called on well-formed #pragma init_seg().

Definition at line 434 of file SemaAttr.cpp.

References CurInitSeg, CurInitSegLoc, and clang::StringLiteral::getString().

ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]).

Definition at line 296 of file SemaAttr.cpp.

References ImplicitMSInheritanceAttrLoc, and MSPointerToMemberRepresentationMethod.

void Sema::ActOnPragmaMSSection ( SourceLocation  PragmaLocation,
int  SectionFlags,
StringLiteral SegmentName 
)

Called on well formed #pragma section().

Called on well formed #pragma bss_seg().

Definition at line 429 of file SemaAttr.cpp.

References clang::StringLiteral::getString(), and UnifySection().

void Sema::ActOnPragmaMSSeg ( SourceLocation  PragmaLocation,
PragmaMsStackAction  Action,
llvm::StringRef  StackSlotLabel,
StringLiteral SegmentName,
llvm::StringRef  PragmaName 
)

Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.

Called on well formed #pragma bss_seg().

Definition at line 411 of file SemaAttr.cpp.

References clang::Sema::PragmaStack< ValueType >::Act(), BSSSegStack, CodeSegStack, ConstSegStack, DataSegStack, Diag(), PSK_Pop, Stack, and clang::Sema::PragmaStack< ValueType >::Stack.

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

Definition at line 268 of file SemaAttr.cpp.

References MSStructPragmaOn, and PMSST_ON.

void Sema::ActOnPragmaMSVtorDisp ( PragmaVtorDispKind  Kind,
SourceLocation  PragmaLoc,
MSVtorDispAttr::Mode  Value 
)

Called on well formed #pragma vtordisp().

Definition at line 303 of file SemaAttr.cpp.

References Diag(), LangOpts, PVDK_Pop, PVDK_Push, PVDK_Reset, PVDK_Set, and VtorDispModeStack.

void Sema::ActOnPragmaOptimize ( bool  On,
SourceLocation  PragmaLoc 
)

Called on well formed #pragma clang optimize.

Definition at line 482 of file SemaAttr.cpp.

References OptimizeOffPragmaLocation.

ActOnPragmaOptionsAlign - Called on well formed #pragma options align.

Definition at line 144 of file SemaAttr.cpp.

References Context, Diag(), PackContext, POAK_Mac68k, POAK_Native, POAK_Natural, POAK_Packed, POAK_Power, and POAK_Reset.

void Sema::ActOnPragmaPack ( PragmaPackKind  Kind,
IdentifierInfo Name,
Expr Alignment,
SourceLocation  PragmaLoc,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc 
)

ActOnPragmaPack - Called on well formed #pragma pack(...).

Definition at line 190 of file SemaAttr.cpp.

References Context, Diag(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), PackContext, PPK_Default, PPK_Pop, PPK_Push, and PPK_Show.

void Sema::ActOnPragmaRedefineExtname ( IdentifierInfo WeakName,
IdentifierInfo AliasName,
SourceLocation  PragmaLoc,
SourceLocation  WeakNameLoc,
SourceLocation  AliasNameLoc 
)

ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.

Definition at line 13822 of file SemaDecl.cpp.

References clang::Decl::addAttr(), Context, ExtnameUndeclaredIdentifiers, clang::IdentifierInfo::getName(), LookupOrdinaryName, LookupSingleName(), and TUScope.

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

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

Definition at line 443 of file SemaAttr.cpp.

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

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

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

Definition at line 547 of file SemaAttr.cpp.

References Diag(), clang::IdentifierInfo::getName(), PopPragmaVisibility(), and PushPragmaVisibility().

void Sema::ActOnPragmaWeakAlias ( IdentifierInfo WeakName,
IdentifierInfo AliasName,
SourceLocation  PragmaLoc,
SourceLocation  WeakNameLoc,
SourceLocation  AliasNameLoc 
)

ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.

Definition at line 13853 of file SemaDecl.cpp.

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

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

ActOnPragmaWeakID - Called on well formed #pragma weak ident.

Definition at line 13839 of file SemaDecl.cpp.

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

Decl * Sema::ActOnProperty ( Scope S,
SourceLocation  AtLoc,
SourceLocation  LParenLoc,
FieldDeclarator FD,
ObjCDeclSpec ODS,
Selector  GetterSel,
Selector  SetterSel,
bool OverridingProperty,
tok::ObjCKeywordKind  MethodImplKind,
DeclContext lexicalDC = nullptr 
)
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 @synthesize or @dynamic.

Definition at line 796 of file SemaObjCProperty.cpp.

References AbstractSynthesizedIvarType, clang::DeclContext::addDecl(), clang::Qualifiers::addObjCLifetime(), clang::ObjCImplDecl::addPropertyImplementation(), clang::BO_Assign, BuildBinOp(), clang::ast_matchers::callExpr, clang::ASTContext::canAssignObjCInterfaces(), checkARCPropertyImpl(), CheckAssignmentConstraints(), clang::CK_LValueToRValue, Compatible, Context, clang::frontend::CPlusPlus, clang::ObjCIvarDecl::Create(), clang::ObjCPropertyImplDecl::Create(), clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), CurContext, clang::declaresSameEntity(), Diag(), DiagnosePropertyMismatchDeclInProtocols(), clang::ObjCPropertyImplDecl::Dynamic, clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ObjCCategoryImplDecl::getIdentifier(), getImpliedARCOwnership(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocStart(), clang::SourceLocation::getLocWithOffset(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCGCQualType(), clang::QualType::getObjCLifetime(), clang::ASTContext::getQualifiedType(), clang::ObjCIvarDecl::getSynthesize(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::InitializedEntity::InitializeResult(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::Type::isArithmeticType(), clang::ObjCRuntime::isFragile(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ObjCRuntime::isNonFragile(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::Type::isObjCRetainableType(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::known_extensions(), LocPropertyAttribute(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::DeclContext::makeDeclVisibleInContext(), MarkDeclRefReferenced(), MaybeCreateExprWithCleanups(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::LangOptions::ObjCRuntime, clang::Qualifiers::OCL_Weak, clang::OMF_autorelease, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, P, PerformCopyInitialization(), clang::ObjCIvarDecl::Private, RequireCompleteType(), RequireNonAbstractType(), clang::ObjCPropertyImplDecl::setGetterCXXConstructor(), setImpliedPropertyAttributeForReadOnlyProperty(), clang::Decl::setInvalidDecl(), clang::ObjCPropertyImplDecl::setSetterCXXAssignment(), clang::ObjCPropertyImplDecl::Synthesize, clang::VK_LValue, clang::VK_RValue, and clang::Qualifiers::Weak.

Referenced by DefaultSynthesizeProperties().

ExprResult Sema::ActOnPseudoDestructorExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
CXXScopeSpec SS,
UnqualifiedId FirstTypeName,
SourceLocation  CCLoc,
SourceLocation  TildeLoc,
UnqualifiedId SecondTypeName,
bool  HasTrailingLParen 
)
ExprResult Sema::ActOnPseudoDestructorExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
SourceLocation  TildeLoc,
const DeclSpec DS,
bool  HasTrailingLParen 
)

This is used to implement the constant expression evaluation part of the attribute enable_if extension. There is nothing in standard C++ which would require reentering parameters.

Definition at line 6469 of file SemaDeclCXX.cpp.

References clang::IdentifierResolver::AddDecl(), clang::Scope::AddDecl(), clang::NamedDecl::getDeclName(), and IdResolver.

void Sema::ActOnReenterFunctionContext ( Scope S,
Decl D 
)
StmtResult Sema::ActOnReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp,
Scope CurScope 
)
StmtResult Sema::ActOnSEHExceptBlock ( SourceLocation  Loc,
Expr FilterExpr,
Stmt Block 
)

Definition at line 3334 of file SemaStmt.cpp.

References Context, and clang::SEHFinallyStmt::Create().

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

Definition at line 3307 of file SemaStmt.cpp.

References Context, and clang::SEHTryStmt::Create().

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 830 of file SemaTemplateVariadic.cpp.

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

Definition at line 10392 of file SemaDecl.cpp.

References clang::FunctionDecl::setHasSkippedBody().

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 
)

Enter a new C++ default initializer scope. After calling this, the caller must call ActOnFinishCXXInClassMemberInitializer, even if parsing or instantiating the initializer failed.

Definition at line 2614 of file SemaDeclCXX.cpp.

References PushFunctionScope().

Referenced by InstantiateInClassInitializer().

void Sema::ActOnStartCXXMemberDeclarations ( Scope S,
Decl TagDecl,
SourceLocation  FinalLoc,
bool  IsFinalSpelledSealed,
SourceLocation  LBraceLoc 
)
ExprResult Sema::ActOnStartCXXMemberReference ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
ParsedType ObjectType,
bool MayBePseudoDestructor 
)

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

Definition at line 6454 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), and PushDeclContext().

Decl * Sema::ActOnStartLinkageSpecification ( Scope S,
SourceLocation  ExternLoc,
Expr LangStr,
SourceLocation  LBraceLoc 
)

ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'. ExternLoc is the location of the 'extern', Lang is the language string literal. LBraceLoc, if valid, provides the location of the '{' brace. Otherwise, this linkage specification does not have any braces.

Definition at line 11648 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::LinkageSpecDecl::Create(), CurContext, Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::StringLiteral::isAscii(), clang::SourceLocation::isValid(), clang::LinkageSpecDecl::lang_c, clang::LinkageSpecDecl::lang_cxx, and PushDeclContext().

Decl * Sema::ActOnStartNamespaceDef ( Scope NamespcScope,
SourceLocation  InlineLoc,
SourceLocation  NamespaceLoc,
SourceLocation  IdentLoc,
IdentifierInfo II,
SourceLocation  LBrace,
AttributeList AttrList 
)

Definition at line 308 of file SemaStmt.cpp.

Referenced by clang::Sema::CompoundScopeRAII::CompoundScopeRAII().

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 834 of file SemaLambda.cpp.

References AttributeLangSupport::C, clang::LambdaIntroducer::Captures, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, clang::Type::containsUnexpandedParameterPack(), Context, clang::frontend::CPlusPlus14, clang::FixItHint::CreateRemoval(), clang::LambdaIntroducer::Default, clang::LambdaIntroducer::DefaultLoc, clang::ASTContext::DependentTy, Diag(), clang::LookupResult::empty(), clang::FTIHasNonVoidParameters(), clang::LookupResult::getAsSingle(), clang::ASTContext::getAutoDeductType(), clang::SourceRange::getBegin(), clang::sema::CapturingScopeInfo::getCapture(), clang::sema::CapturingScopeInfo::getCXXThisCapture(), clang::ASTContext::getDefaultCallingConvention(), clang::SourceRange::getEnd(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), getGenericLambdaTemplateParameterList(), clang::Decl::getLocation(), clang::sema::CapturingScopeInfo::Capture::getLocation(), clang::Declarator::getNumTypeObjects(), clang::DeclContext::getParent(), clang::Declarator::getSourceRange(), clang::Scope::getTemplateParamParent(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::VarDecl::hasLocalStorage(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::LookupResult::isAmbiguous(), clang::sema::CapturingScopeInfo::isCaptured(), clang::CXXMethodDecl::isConst(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::Declarator::isFunctionDeclarator(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Decl::isParameterPack(), clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, clang::LambdaIntroducer::Range, clang::DeclSpec::TQ_const, and clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals.

void Sema::ActOnStartOfObjCMethodDef ( Scope FnBodyScope,
Decl D 
)

ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.

Definition at line 300 of file SemaDeclObjC.cpp.

References CheckParmsForFunctionDef(), Context, clang::ObjCMethodDecl::createImplicitParams(), Diag(), DiagnoseObjCImplementedDeprecations(), clang::LangOptions::GCOnly, clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Decl::hasAttr(), HasExplicitOwnershipAttr(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::ObjCMethodDecl::isInstanceMethod(), clang::LangOptions::NonGC, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::ObjCMethodDecl::params(), PushDeclContext(), PushFunctionScope(), and PushOnScopeChains().

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

Definition at line 10104 of file SemaExpr.cpp.

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

Definition at line 10108 of file SemaExpr.cpp.

ExprResult Sema::ActOnStringLiteral ( ArrayRef< Token StringToks,
Scope UDLScope = nullptr 
)

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

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

References clang::TemplateArgumentListInfo::addArgument(), clang::QualType::addConst(), clang::StringLiteral::Ascii, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::ASTContext::DeclarationNames, Diag(), clang::ExprError(), clang::IdentifierTable::get(), clang::ASTContext::getAddrSpaceQualType(), clang::ASTContext::getArrayDecayedType(), clang::StringLiteral::getCodeUnit(), clang::ASTContext::getConstantArrayType(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::ASTContext::getIntWidth(), clang::StringLiteral::getLength(), clang::ASTContext::getSizeType(), clang::ASTContext::getTrivialTypeSourceInfo(), getUDSuffixLoc(), clang::ASTContext::getWideCharType(), clang::ASTContext::Idents, clang::Type::isUnsignedIntegerType(), clang::ArrayType::Normal, clang::LangAS::opencl_constant, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::ASTContext::UnsignedCharTy, clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.

ExprResult Sema::ActOnSuperMessage ( Scope S,
SourceLocation  SuperLoc,
Selector  Sel,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  Args 
)

The parser has parsed a '__super' nested-name-specifier.

Parameters:
SuperLocThe location of the '__super' keyword.
ColonColonLocThe 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 252 of file SemaCXXScopeSpec.cpp.

References Context, Diag(), getCurScope(), clang::NamedDecl::getName(), clang::CXXRecordDecl::getNumBases(), clang::DeclContext::getParent(), clang::CXXRecordDecl::isLambda(), clang::CXXScopeSpec::MakeSuper(), and S.

Decl * Sema::ActOnTag ( Scope S,
unsigned  TagSpec,
TagUseKind  TUK,
SourceLocation  KWLoc,
CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  NameLoc,
AttributeList Attr,
AccessSpecifier  AS,
SourceLocation  ModulePrivateLoc,
MultiTemplateParamsArg  TemplateParameterLists,
bool OwnedDecl,
bool IsDependent,
SourceLocation  ScopedEnumKWLoc,
bool  ScopedEnumUsesClassTag,
TypeResult  UnderlyingType,
bool  IsTypeSpecifier 
)

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.

IsTypeSpecifier is true if this is a type-specifier (or trailing-type-specifier) other than one in an alias-declaration.

Definition at line 11112 of file SemaDecl.cpp.

References clang::LookupResult::addDecl(), clang::AS_none, clang::LookupResult::begin(), clang::LookupResult::clear(), clang::Scope::containedInPrototypeScope(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), createFriendTagNNSFixIt(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::Scope::DeclScope, Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), clang::ActionResult< PtrTy, CompressInvalid >::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::ASTContext::getTagDeclType(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeWithKeyword::getTagTypeKindName(), clang::TypeSourceInfo::getTypeLoc(), clang::CanQual< T >::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::ASTContext::IntTy, clang::LookupResult::isAmbiguous(), clang::TagType::isBeingDefined(), clang::Scope::isClassScope(), clang::NamedDecl::isCXXClassMember(), clang::Scope::isDeclScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), clang::DeclContext::isFunctionOrMethod(), clang::Scope::isFunctionPrototypeScope(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::EnumDecl::isScoped(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTranslationUnit(), clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::DeclContext::makeDeclVisibleInContext(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), Previous, clang::LookupResult::resolveKind(), clang::Decl::setAccess(), clang::ASTContext::setFILEDecl(), clang::EnumDecl::setIntegerType(), clang::EnumDecl::setIntegerTypeSourceInfo(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setModulePrivate(), clang::Decl::setObjectOfFriendDecl(), clang::EnumDecl::setPromotionType(), clang::TagDecl::setQualifierInfo(), clang::LookupResult::setRedeclarationKind(), clang::TagDecl::setTemplateParameterListsInfo(), clang::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 12011 of file SemaDecl.cpp.

References clang::TagDecl::isBeingDefined(), and clang::Decl::setInvalidDecl().

void Sema::ActOnTagFinishDefinition ( Scope S,
Decl TagDecl,
SourceLocation  RBraceLoc 
)

ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).

Definition at line 11967 of file SemaDecl.cpp.

References clang::Decl::getDeclContext(), clang::TagDecl::isBeingDefined(), clang::DeclContext::isFileContext(), clang::Decl::isInvalidDecl(), clang::TagDecl::setRBraceLoc(), and clang::Decl::setTopLevelDeclInObjCContainer().

void Sema::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 11906 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>.

Definition at line 2223 of file SemaTemplate.cpp.

References Context, clang::FixItHint::CreateReplacement(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::NamedDecl::getIdentifier(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), 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 6307 of file SemaTemplate.cpp.

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

Definition at line 2157 of file SemaTemplate.cpp.

References Context, clang::ETK_None, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), 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().

Referenced by ActOnPseudoDestructorExpr().

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

References Context, clang::TemplateParameterList::Create(), Diag(), and clang::SourceLocation::isValid().

Decl * Sema::ActOnTemplateTemplateParameter ( Scope S,
SourceLocation  TmpLoc,
TemplateParameterList Params,
SourceLocation  EllipsisLoc,
IdentifierInfo Name,
SourceLocation  NameLoc,
unsigned  Depth,
unsigned  Position,
SourceLocation  EqualLoc,
ParsedTemplateArgument  Default 
)

Definition at line 69 of file Sema.cpp.

References Context, clang::ASTContext::getTranslationUnitDecl(), and S.

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

NamedDecl * Sema::ActOnTypedefDeclarator ( Scope S,
Declarator D,
DeclContext DC,
TypeSourceInfo TInfo,
LookupResult Previous 
)
void Sema::ActOnTypedefedProtocols ( SmallVectorImpl< Decl * > &  ProtocolRefs,
IdentifierInfo SuperName,
SourceLocation  SuperLoc 
)

ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols.

Definition at line 606 of file SemaDeclObjC.cpp.

References clang::Type::getAs(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), and TUScope.

NamedDecl * Sema::ActOnTypedefNameDecl ( Scope S,
DeclContext DC,
TypedefNameDecl NewTD,
LookupResult Previous,
bool Redeclaration 
)

ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'.

Definition at line 4937 of file SemaDecl.cpp.

References Context, clang::LookupResult::empty(), filterNonConflictingPreviousTypedefDecls(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getRedeclContext(), clang::Decl::isInvalidDecl(), clang::DeclContext::isTranslationUnit(), clang::ASTContext::setFILEDecl(), clang::ASTContext::setjmp_bufDecl(), clang::ASTContext::setsigjmp_bufDecl(), and clang::ASTContext::setucontext_tDecl().

Referenced by ActOnAliasDeclaration().

TypeResult Sema::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 7735 of file SemaTemplate.cpp.

References clang::TypeLoc::castAs(), Context, clang::FixItHint::CreateRemoval(), clang::ASTContext::CreateTypeSourceInfo(), Diag(), clang::ETK_None, clang::ETK_Typename, clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::Scope::getTemplateParamParent(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::DependentNameTypeLoc::setQualifierLoc().

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

TypeResult Sema::ActOnTypenameType ( Scope S,
SourceLocation  TypenameLoc,
const CXXScopeSpec SS,
SourceLocation  TemplateLoc,
TemplateTy  TemplateName,
SourceLocation  TemplateNameLoc,
SourceLocation  LAngleLoc,
ASTTemplateArgsPtr  TemplateArgs,
SourceLocation  RAngleLoc 
)

Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>".

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

References Builder, Context, clang::FixItHint::CreateRemoval(), Diag(), clang::ETK_Typename, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::Scope::getTemplateParamParent(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TypeLocBuilder::push(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), and clang::TemplateArgumentListInfo::size().

Decl * Sema::ActOnTypeParameter ( Scope S,
bool  Typename,
SourceLocation  EllipsisLoc,
SourceLocation  KeyLoc,
IdentifierInfo ParamName,
SourceLocation  ParamNameLoc,
unsigned  Depth,
unsigned  Position,
SourceLocation  EqualLoc,
ParsedType  DefaultArg 
)

ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed. Typename specifies whether the keyword "typename" was used to declare the type parameter (otherwise, "class" was used), and KeyLoc is the location of the "class" or "typename" keyword. ParamName is the name of the parameter (NULL indicates an unnamed template parameter) and ParamNameLoc is the location of the parameter name (if any). If the type parameter has a default argument, it will be added later via ActOnTypeParameterDefault.

Definition at line 546 of file SemaTemplate.cpp.

References clang::Scope::AddDecl(), clang::AS_public, Context, clang::TemplateTypeParmDecl::Create(), Depth, Diag(), clang::ASTContext::getTranslationUnitDecl(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), Position, clang::Decl::setAccess(), clang::TemplateTypeParmDecl::setDefaultArgument(), and clang::Decl::setInvalidDecl().

ExprResult Sema::ActOnTypeTrait ( TypeTrait  Kind,
SourceLocation  KWLoc,
ArrayRef< ParsedType Args,
SourceLocation  RParenLoc 
)

Parsed one of the type trait support pseudo-functions.

Definition at line 3731 of file SemaExprCXX.cpp.

References BuildTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().

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

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

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

Definition at line 10067 of file SemaExpr.cpp.

References ConvertTokenKindToUnaryOpcode().

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  HasTypenameKeyword,
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 10711 of file SemaExpr.cpp.

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

Definition at line 5328 of file SemaDecl.cpp.

References clang::Decl::addAttr(), checkDLLAttributeRedeclaration(), clang::LookupResult::clear(), clang::DeclSpec::containsPlaceholderType(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::VarDecl::Create(), clang::VarTemplateDecl::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::LookupResult::empty(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::DeclarationName::getAsIdentifierInfo(), clang::Declarator::getAsmLabel(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VarDecl::getDescribedVarTemplate(), clang::Scope::getFnParent(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::Declarator::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getName(), clang::Scope::getParent(), clang::Type::getPointeeType(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::LookupResult::getRepresentativeDecl(), clang::DeclSpec::getSpecifierName(), clang::VarDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::ASTContext::getTargetInfo(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), hasParsedAttr(), clang::UnqualifiedId::IK_TemplateId, clang::DeclSpec::isConstexprSpecified(), clang::QualType::isConstQualified(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::Type::isEventT(), clang::Redeclarable< decl_type >::isFirstDecl(), isFunctionDefinitionDiscarded(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionPointerType(), clang::Type::isHalfType(), isIncompleteDeclExternC(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::VarDecl::isLocalVarDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::Type::isSamplerT(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isShadowed(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::TargetInfo::isTLSSupported(), clang::TargetInfo::isValidGCCRegisterName(), clang::LangAS::opencl_global, clang::LangAS::opencl_local, S, 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_register, clang::DeclSpec::SCS_unspecified, clang::VarDecl::setConstexpr(), clang::VarDecl::setDescribedVarTemplate(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::ASTContext::setManglingNumber(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Declarator::setRedeclaration(), clang::ASTContext::setStaticLocalNumber(), clang::VarDecl::setStorageClass(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::VarDecl::setTSCSpec(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StorageClassSpecToVarDeclStorageClass(), clang::UnqualifiedId::TemplateId, and clang::DeclSpec::TSCS_thread_local.

DeclResult Sema::ActOnVarTemplateSpecialization ( Scope S,
Declarator D,
TypeSourceInfo DI,
SourceLocation  TemplateKWLoc,
TemplateParameterList TemplateParams,
StorageClass  SC,
bool  IsPartialSpecialization 
)

Definition at line 2400 of file SemaTemplate.cpp.

References clang::LookupResult::addDecl(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::VarTemplateSpecializationDecl::Create(), clang::VarTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::VarTemplateDecl::findPartialSpecialization(), clang::VarTemplateDecl::findSpecialization(), clang::Decl::getAccess(), clang::TemplateArgumentListInfo::getArgumentArray(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getIdentifierLoc(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::Declarator::getName(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarTemplateSpecializationDecl::getSpecializationKind(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::UnqualifiedId::IK_TemplateId, clang::TemplateName::isDependent(), clang::VarDecl::isOutOfLine(), isSameAsPrimaryTemplate(), clang::VarDecl::isStaticDataMember(), clang::SourceLocation::isValid(), makeTemplateArgumentListInfo(), MarkUsedTemplateParameters(), clang::TemplateArgumentList::OnStack, clang::SC_Extern, clang::Decl::setAccess(), clang::VarDecl::setInstantiationOfStaticDataMember(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), clang::VarTemplatePartialSpecializationDecl::setMemberSpecialization(), clang::Declarator::setRedeclaration(), clang::VarTemplateSpecializationDecl::setSpecializationKind(), clang::VarTemplateSpecializationDecl::setTemplateArgsInfo(), clang::VarTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::TemplateArgumentListInfo::size(), clang::TemplateName::Template, clang::UnqualifiedId::TemplateId, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

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

Definition at line 1205 of file SemaStmt.cpp.

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

void Sema::AddAlignedAttr ( SourceRange  AttrRange,
Decl D,
Expr E,
unsigned  SpellingListIndex,
bool  IsPackExpansion 
)
void Sema::AddAlignedAttr ( SourceRange  AttrRange,
Decl D,
TypeSourceInfo T,
unsigned  SpellingListIndex,
bool  IsPackExpansion 
)

Definition at line 2925 of file SemaDeclAttr.cpp.

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

AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.

Definition at line 115 of file SemaAttr.cpp.

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

void Sema::AddAlignValueAttr ( SourceRange  AttrRange,
Decl D,
Expr E,
unsigned  SpellingListIndex 
)

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

Definition at line 267 of file SemaDeclObjC.cpp.

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

void Sema::AddArgumentDependentLookupCandidates ( DeclarationName  Name,
SourceLocation  Loc,
ArrayRef< Expr * >  Args,
TemplateArgumentListInfo ExplicitTemplateArgs,
OverloadCandidateSet CandidateSet,
bool  PartialOverloading = false 
)

Add function candidates found via argument-dependent lookup to the set of overloading candidates.

This routine performs argument-dependent name lookup based on the given function name (which may also be an operator name) and adds all of the overload candidates found by ADL to the overload candidate set (C++ [basic.lookup.argdep]).

Definition at line 8206 of file SemaOverload.cpp.

References AddOverloadCandidate(), AddTemplateOverloadCandidate(), ArgumentDependentLookup(), clang::AS_none, clang::OverloadCandidateSet::begin(), clang::ADLResult::begin(), clang::OverloadCandidateSet::end(), clang::ADLResult::end(), clang::ADLResult::erase(), and clang::DeclAccessPair::make().

Referenced by AddOverloadedCallCandidates(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().

void Sema::AddAssumeAlignedAttr ( SourceRange  AttrRange,
Decl D,
Expr E,
Expr OE,
unsigned  SpellingListIndex 
)
void Sema::AddBuiltinCandidate ( QualType  ResultTy,
QualType ParamTys,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  IsAssignmentOperator = false,
unsigned  NumContextualBoolArguments = 0 
)

AddBuiltinCandidate - Add a candidate for a built-in operator. ResultTy and ParamTys are the result and parameter types of the built-in candidate, respectively. Args and NumArgs are the arguments being passed to the candidate. IsAssignmentOperator should be true when this built-in candidate is an assignment operator. NumContextualBoolArguments is the number of arguments (at the beginning of the argument list) that will be contextually converted to bool.

Definition at line 6516 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::ASTContext::BoolTy, clang::OverloadCandidate::BuiltinTypes, Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidate::IsSurrogate, clang::DeclAccessPair::make(), clang::ovl_fail_bad_conversion, clang::OverloadCandidate::ParamTypes, clang::OverloadCandidate::ResultTy, TryContextuallyConvertToBool(), TryCopyInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.

Referenced by AddBuiltinAssignmentOperatorCandidates().

void Sema::AddBuiltinOperatorCandidates ( OverloadedOperatorKind  Op,
SourceLocation  OpLoc,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet 
)

AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (C++ [over.built]), based on the operator Op and the arguments given. For example, if the operator is a binary '+', this routine might add "int operator+(int, int)" to cover integer addition.

Definition at line 8017 of file SemaOverload.cpp.

References clang::Qualifiers::addConst(), CollectVRQualifiers(), Context, and clang::OO_None.

Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), and FindConditionalOverload().

AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.

Definition at line 470 of file SemaAttr.cpp.

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

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

AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over.match.conv], C++ [over.match.copy]). From is the expression we're converting from, and ToType is the type that we're eventually trying to convert to (which may or may not be the same type as the type that the conversion function produces).

Definition at line 6142 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::ImplicitConversionSequence::BadConversion, CheckEnableIf(), clang::CK_FunctionToPointerDecay, clang::Expr::Classify(), Context, clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, DeduceReturnType(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FinalConversion, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::GetConversionRank(), clang::CXXConversionDecl::getConversionType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getLocStart(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionDecl::getPrimaryTemplate(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::ICK_Lvalue_To_Rvalue, clang::ICR_Exact_Match, clang::OverloadCandidate::IgnoreObjectArgument, isAllowableExplicitConversion(), clang::ImplicitConversionSequence::isBad(), IsDerivedFrom(), clang::CXXConversionDecl::isExplicit(), clang::OverloadCandidateSet::isNewCandidate(), clang::Type::isRValueReferenceType(), clang::OverloadCandidate::IsSurrogate, clang::ImplicitCastExpr::OnStack, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_final_conversion, clang::ovl_fail_enable_if, clang::ovl_fail_final_conversion_not_exact, clang::ovl_fail_trivial_conversion, RequireCompleteType(), clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setAsIdentityConversion(), clang::StandardConversionSequence::setFromType(), clang::ImplicitConversionSequence::StandardConversion, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::OverloadCandidate::Viable, clang::VK_LValue, and clang::VK_RValue.

Referenced by AddTemplateConversionCandidate(), collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

Registers an external source. If an external source already exists, creates a multiplex external source and appends to it.

Parameters:
[in]E- A non-null external sema source.

Definition at line 284 of file Sema.cpp.

Referenced by clang::ASTReader::InitializeSema().

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

AddFactoryMethodToGlobalPool - Same as above, but for factory methods.

Definition at line 2998 of file Sema.h.

Referenced by ActOnAtEnd(), and AddAnyMethodToGlobalPool().

void Sema::AddFunctionCandidates ( const UnresolvedSetImpl Functions,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr 
)

AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1). This routine can only be executed just before the definition of the class is complete.

Definition at line 6348 of file SemaDeclCXX.cpp.

References DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), getLangOpts(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CXXRecordDecl::hasUserDeclaredCopyAssignment(), clang::CXXRecordDecl::hasUserDeclaredCopyConstructor(), clang::CXXRecordDecl::hasUserDeclaredDestructor(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForDestructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::ASTContext::NumImplicitCopyAssignmentOperators, clang::ASTContext::NumImplicitCopyConstructors, clang::ASTContext::NumImplicitDefaultConstructors, clang::ASTContext::NumImplicitDestructors, clang::ASTContext::NumImplicitMoveAssignmentOperators, and clang::ASTContext::NumImplicitMoveConstructors.

void Sema::addImplicitTypedef ( StringRef  Name,
QualType  T 
)
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 8568 of file SemaDecl.cpp.

References clang::VarDecl::CallInit, Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::VarDecl::getAnyInitializer(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getBaseElementType(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getExprs(), clang::VarDecl::getInit(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::DeclaratorDecl::getLocStart(), clang::ParenListExpr::getLocStart(), clang::ParenListExpr::getNumExprs(), clang::ASTContext::getObjCIdType(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::Stmt::getSourceRange(), clang::VarDecl::getSourceRange(), clang::VarDecl::getStorageClass(), clang::VarDecl::getTemplateSpecializationKind(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::APIntStorage::getValue(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::InitializedEntity::InitializeVariable(), clang::ASTContext::IntTy, clang::Type::isAggregateType(), clang::Expr::isConstantInitializer(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::Expr::isEvaluatable(), clang::VarDecl::isExternC(), clang::VarDecl::isFileVarDecl(), clang::Type::isFloatingType(), clang::VarDecl::isInitCapture(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::NamedDecl::isLinkageValid(), clang::Type::isLiteralType(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::VarDecl::isStaticDataMember(), clang::isTemplateInstantiation(), clang::Type::isUndeducedType(), clang::Expr::isValueDependent(), clang::QualType::isVolatileQualified(), clang::VarDecl::ListInit, clang::Qualifiers::OCL_Strong, clang::SC_Extern, clang::SC_OpenCLWorkGroupLocal, clang::SC_Static, clang::VarDecl::setConstexpr(), clang::VarDecl::setInit(), clang::VarDecl::setInitStyle(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), and clang::ASTContext::UnknownAnyTy.

Referenced by ActOnOpenMPFirstprivateClause(), FinishForRangeVarDecl(), and InstantiateVariableInitializer().

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 2993 of file Sema.h.

Referenced by ActOnAtEnd(), AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().

void Sema::addLambdaParameters ( CXXMethodDecl CallOperator,
Scope CurScope 
)

Introduce the lambda parameters into scope.

Definition at line 474 of file SemaLambda.cpp.

References clang::NamedDecl::getIdentifier(), clang::FunctionDecl::getNumParams(), and clang::FunctionDecl::getParamDecl().

void Sema::AddMemberOperatorCandidates ( OverloadedOperatorKind  Op,
SourceLocation  OpLoc,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
SourceRange  OpRange = SourceRange() 
)

Add overload candidates for overloaded operators that are member functions.

Add the overloaded operator candidates that are member functions for the operator Op that was used in an operator expression such as "x Op y". , Args/NumArgs provides the operator arguments, and CandidateSet will store the added overload candidates. (C++ [over.match.oper]).

Definition at line 6464 of file SemaOverload.cpp.

References AddMethodCandidate(), clang::LookupResult::begin(), Context, clang::ASTContext::DeclarationNames, clang::LookupResult::end(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), LookupOrdinaryName, LookupQualifiedName(), RequireCompleteType(), and clang::LookupResult::suppressDiagnostics().

Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().

void Sema::AddMethodCandidate ( DeclAccessPair  FoundDecl,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)

AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set.

Definition at line 5840 of file SemaOverload.cpp.

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

Referenced by AddFunctionCandidates(), AddMemberOperatorCandidates(), AddMethodTemplateCandidate(), AddOverloadCandidate(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), and BuildOverloadedArrowExpr().

void Sema::AddMethodCandidate ( CXXMethodDecl Method,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
void Sema::AddMethodTemplateCandidate ( FunctionTemplateDecl MethodTmpl,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
TemplateArgumentListInfo ExplicitTemplateArgs,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)

AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.

Definition at line 132 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, getLangOpts(), MSStructPragmaOn, and VtorDispModeStack.

Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).

Definition at line 496 of file SemaAttr.cpp.

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

Referenced by AddRangeBasedOptnone().

void Sema::AddOverloadCandidate ( FunctionDecl Function,
DeclAccessPair  FoundDecl,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false,
bool  PartialOverloading = false,
bool  AllowExplicit = false 
)

AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments. If SuppressUserConversions, then don't allow user-defined conversions via constructors or conversion operators.

Parameters:
PartialOverloadingtrue if we are performing "partial" overloading based on an incomplete set of function arguments. This feature is used by code completion.

Definition at line 5499 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), AddMethodCandidate(), CheckCUDATarget(), CheckEnableIf(), Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidateSet::CSK_Operator, CurContext, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::OverloadCandidate::IgnoreObjectArgument, IsAcceptableNonMemberOperatorCandidate(), clang::ImplicitConversionSequence::isBad(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), IsDerivedFrom(), clang::CXXConstructorDecl::isMoveConstructor(), clang::OverloadCandidateSet::isNewCandidate(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::Expr::Classification::makeSimpleLValue(), clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_target, clang::ovl_fail_enable_if, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ImplicitConversionSequence::setEllipsis(), TryCopyInitialization(), Unevaluated, and clang::OverloadCandidate::Viable.

Referenced by AddArgumentDependentLookupCandidates(), AddFunctionCandidates(), AddOverloadedCallCandidate(), AddTemplateOverloadCandidate(), BuildCallToMemberFunction(), FindAllocationOverload(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

void Sema::AddOverloadedCallCandidates ( UnresolvedLookupExpr ULE,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  PartialOverloading = false 
)

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

Definition at line 513 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::NamedDecl::getExplicitVisibility(), NoVisibility, Stack, clang::ast_matchers::type, VisContext, and clang::NamedDecl::VisibilityForValue.

Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.

Definition at line 489 of file SemaAttr.cpp.

References AddOptnoneAttributeIfNoConflicts(), clang::SourceLocation::isValid(), and OptimizeOffPragmaLocation.

void Sema::AddSurrogateCandidate ( CXXConversionDecl Conversion,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
const FunctionProtoType Proto,
Expr Object,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet 
)

AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a function pointer via the conversion function Conversion, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4). Proto is the type of function that we'll eventually be calling.

Definition at line 6351 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::UserDefinedConversionSequence::After, clang::UserDefinedConversionSequence::Before, CheckEnableIf(), clang::Expr::Classify(), Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::UserDefinedConversionSequence::EllipsisConversion, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::UserDefinedConversionSequence::FoundConversionFunction, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Expr::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidateSet::isNewCandidate(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::ovl_fail_bad_conversion, clang::ovl_fail_enable_if, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::StandardConversionSequence::setAsIdentityConversion(), clang::ImplicitConversionSequence::setEllipsis(), clang::ImplicitConversionSequence::setUserDefined(), clang::ImplicitConversionSequence::Standard, clang::OverloadCandidate::Surrogate, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::ImplicitConversionSequence::UserDefined, and clang::OverloadCandidate::Viable.

Referenced by BuildCallToObjectOfClassType().

void Sema::AddTemplateConversionCandidate ( FunctionTemplateDecl FunctionTemplate,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
Expr From,
QualType  ToType,
OverloadCandidateSet CandidateSet,
bool  AllowObjCConversionOnExplicit 
)
void Sema::AddTemplateOverloadCandidate ( FunctionTemplateDecl FunctionTemplate,
DeclAccessPair  FoundDecl,
TemplateArgumentListInfo ExplicitTemplateArgs,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  SuppressUserConversions = false 
)
QualType Sema::adjustCCAndNoReturn ( QualType  ArgFunctionType,
QualType  FunctionType 
)

Adjust the DeclContext for a function or variable that might be a function-local external declaration.

Definition at line 5305 of file SemaDecl.cpp.

References clang::DeclContext::getParent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), and clang::DeclContext::isFunctionOrMethod().

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

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

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

void Sema::AdjustDestructorExceptionSpec ( CXXRecordDecl ClassDecl,
CXXDestructorDecl Destructor 
)
void Sema::adjustMemberFunctionCC ( QualType T,
bool  IsStatic 
)

Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly. This handles method types formed from function type typedefs and typename template arguments.

Definition at line 4603 of file SemaType.cpp.

References clang::ASTContext::adjustFunctionType(), Context, clang::ASTContext::getAdjustedType(), clang::FunctionType::getCallConv(), clang::ASTContext::getDefaultCallingConvention(), clang::FunctionType::getExtInfo(), hasExplicitCallingConv(), and clang::FunctionType::ExtInfo::withCallingConv().

Referenced by BuildMemberPointerType().

Definition at line 2340 of file SemaDeclObjC.cpp.

References clang::ObjCMethodList::Count, and MethodPool.

Referenced by BuildInstanceMessage().

void Sema::ArgumentDependentLookup ( DeclarationName  Name,
SourceLocation  Loc,
ArrayRef< Expr * >  Args,
ADLResult Functions 
)
bool Sema::AttachBaseSpecifiers ( CXXRecordDecl Class,
CXXBaseSpecifier **  Bases,
unsigned  NumBases 
)

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

Definition at line 1689 of file SemaDeclCXX.cpp.

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

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

BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union. Anonymous unions are a C++ feature (C++ [class.union]) and a C11 feature; anonymous structures are a C11 feature and GNU C++ extension.

Definition at line 3807 of file SemaDecl.cpp.

References clang::DeclContext::addDecl(), clang::AS_none, clang::AS_protected, clang::AS_public, checkDuplicateDefaultInit(), clang::DeclSpec::ClearTypeQualifiers(), Context, clang::frontend::CPlusPlus, clang::VarDecl::Create(), clang::FieldDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::DeclContext::decls(), Diag(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::Scope::getMSLocalManglingNumber(), clang::ASTContext::getPrintingPolicy(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTypeDeclType(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVolatileSpecLoc(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::DeclContext::isRecord(), clang::TagDecl::isUnion(), clang::Declarator::MemberContext, Record, clang::SC_None, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::RecordDecl::setAnonymousStructOrUnion(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::ASTContext::setManglingNumber(), clang::ASTContext::setStaticLocalNumber(), clang::DeclSpec::SetStorageClassSpec(), StorageClassSpecToVarDeclStorageClass(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, and clang::DeclSpec::TQ_volatile.

ExprResult Sema::BuildAnonymousStructUnionMemberReference ( const CXXScopeSpec SS,
SourceLocation  nameLoc,
IndirectFieldDecl indirectField,
DeclAccessPair  FoundDecl = DeclAccessPair::make(nullptr, AS_none),
Expr baseObjectExpr = nullptr,
SourceLocation  opLoc = SourceLocation() 
)
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.
BracketsThe range from the opening '[' to the closing ']'.
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 1504 of file SemaType.cpp.

References clang::frontend::C99, CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, DefaultLvalueConversion(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::ASTContext::getConstantArrayType(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::Stmt::getLocStart(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPrintableNameForEntity(), clang::ASTContext::getSizeType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getVariableArrayType(), clang::Expr::hasPlaceholderType(), isArraySizeVLA(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::QualType::isPODType(), clang::Type::isReferenceType(), clang::Expr::isRValue(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::Type::isUndeducedType(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::ArrayType::Normal, RequireCompleteType(), RequireNonAbstractType(), clang::ArrayType::Star, and clang::ArrayType::Static.

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildArrayTypeTrait ( ArrayTypeTrait  ATT,
SourceLocation  KWLoc,
TypeSourceInfo TSInfo,
Expr DimExpr,
SourceLocation  RParen 
)
MemInitResult Sema::BuildBaseInitializer ( QualType  BaseType,
TypeSourceInfo BaseTInfo,
Expr Init,
CXXRecordDecl ClassDecl,
SourceLocation  EllipsisLoc 
)
void Sema::BuildBasePathArray ( const CXXBasePaths Paths,
CXXCastPath BasePath 
)
ExprResult Sema::BuildBinOp ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHSExpr,
Expr RHSExpr 
)
ExprResult Sema::BuildBlockForLambdaConversion ( SourceLocation  CurrentLocation,
SourceLocation  ConvLocation,
CXXConversionDecl Conv,
Expr Src 
)

Build a block pointer type.

Parameters:
TThe type to which we'll be building a block pointer.
LocThe source location, used for diagnostics.
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 1860 of file SemaType.cpp.

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

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildBuiltinOffsetOf ( SourceLocation  BuiltinLoc,
TypeSourceInfo TInfo,
OffsetOfComponent CompPtr,
unsigned  NumComponents,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCallToMemberFunction ( Scope S,
Expr MemExprE,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc 
)

BuildCallToMemberFunction - Build a call to a member function. MemExpr is the expression that refers to the member function (and includes the object parameter), Args/NumArgs are the arguments to the function call (not including the object parameter). The caller needs to validate that the member expression refers to a non-static member function or an overloaded member function.

Definition at line 11426 of file SemaOverload.cpp.

References AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), clang::AS_public, clang::OverloadCandidateSet::BestViableFunction(), clang::BO_PtrMemD, clang::BO_PtrMemI, clang::ASTContext::BoundMemberTy, BuildResolvedCallExpr(), clang::Type::castAs(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckCUDATarget(), CheckUnresolvedMemberAccess(), clang::Expr::Classify(), Context, ConvertArgumentsForCall(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadCandidateSet::CSK_Normal, CurContext, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), clang::ExprError(), FixOverloadedFunctionReference(), clang::Qualifiers::fromCVRMask(), Func, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Qualifiers::getAsString(), clang::MemberExpr::getBase(), clang::UnresolvedMemberExpr::getBase(), clang::UnresolvedMemberExpr::getBaseType(), clang::FunctionType::getCallResultType(), clang::TargetInfo::getCXXABI(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getDeletedOrUnavailableSuffix(), clang::MemberExpr::getFoundDecl(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::DeclaratorDecl::getLocStart(), clang::MemberExpr::getLocStart(), clang::UnresolvedMemberExpr::getLocStart(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberName(), clang::CXXMemberCallExpr::getMethodDecl(), clang::OverloadExpr::getNameLoc(), clang::QualType::getNonLValueExprType(), clang::CXXMethodDecl::getParent(), clang::PointerType::getPointeeType(), clang::OverloadExpr::getQualifier(), clang::MemberExpr::getQualifier(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::FunctionProtoType::getTypeQuals(), clang::Expr::getValueKindForType(), clang::OverloadExpr::hasExplicitTemplateArgs(), IdentifyCUDATarget(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::UnresolvedMemberExpr::isArrow(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::FunctionDecl::isPure(), clang::CXXMethodDecl::isStatic(), clang::DeclAccessPair::make(), clang::Expr::Classification::makeSimpleLValue(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::ASTContext::OverloadTy, PerformObjectArgumentInitialization(), clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::removeObjCGCAttr(), RequireCompleteType(), and clang::MemberExpr::setBase().

Referenced by buildSingleCopyAssignRecursively(), and tryExprAsCall().

ExprResult Sema::BuildCallToObjectOfClassType ( Scope S,
Expr Obj,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc 
)

BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (operator()) or performing a user-defined conversion on the object argument.

Definition at line 11689 of file SemaOverload.cpp.

References ActOnCallExpr(), AddMethodCandidate(), AddSurrogateCandidate(), clang::LookupResult::begin(), BuildCXXDefaultArgExpr(), BuildCXXMemberCallExpr(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), clang::CK_UserDefinedConversion, clang::Expr::Classify(), Context, clang::ImplicitCastExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, DefaultVariadicArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Decl::getDeclContext(), getDeletedOrUnavailableSuffix(), clang::Stmt::getLocStart(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), clang::FunctionProtoType::isVariadic(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformObjectArgumentInitialization(), Record, RequireCompleteType(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::CallExpr::setNumArgs(), clang::LookupResult::suppressDiagnostics(), VariadicMethod, and clang::VK_RValue.

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

Build an Objective-C class message expression.

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

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 ']'.
RBracLocThe location of the closing square bracket ']'.
ArgsInThe message arguments.

Definition at line 2133 of file SemaExprObjC.cpp.

References checkCocoaAPI(), CheckMessageArgumentTypes(), Context, clang::frontend::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), clang::ExprError(), clang::Type::getAs(), clang::SourceRange::getBegin(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCObjectType::getInterface(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), clang::ObjCInterfaceDecl::lookupClassMethod(), LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupPrivateClassMethod(), MaybeBindToTemporary(), clang::OMF_initialize, RequireCompleteType(), 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  IsListInitialization,
bool  IsStdInitListInitialization,
bool  RequiresZeroInit,
unsigned  ConstructKind,
SourceRange  ParenRange 
)
ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
CXXConstructorDecl Constructor,
bool  Elidable,
MultiExprArg  ExprArgs,
bool  HadMultipleCandidates,
bool  IsListInitialization,
bool  IsStdInitListInitialization,
bool  RequiresZeroInit,
unsigned  ConstructKind,
SourceRange  ParenRange 
)

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

Definition at line 11096 of file SemaDeclCXX.cpp.

References clang::CXXConstructExpr::Create(), and MarkFunctionReferenced().

ExprResult Sema::BuildCXXFoldExpr ( SourceLocation  LParenLoc,
Expr LHS,
BinaryOperatorKind  Operator,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  RParenLoc 
)

Definition at line 990 of file SemaTemplateVariadic.cpp.

References Context, and clang::ASTContext::DependentTy.

Referenced by ActOnCXXFoldExpr().

StmtResult Sema::BuildCXXForRangeStmt ( SourceLocation  ForLoc,
SourceLocation  ColonLoc,
Stmt RangeDecl,
Stmt BeginEndDecl,
Expr Cond,
Expr Inc,
Stmt LoopVarDecl,
SourceLocation  RParenLoc,
BuildForRangeKind  Kind 
)
ExprResult Sema::BuildCXXFunctionalCastExpr ( TypeSourceInfo TInfo,
SourceLocation  LParenLoc,
Expr CastExpr,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildCXXMemberCallExpr ( Expr Exp,
NamedDecl FoundDecl,
CXXConversionDecl 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,
bool IsCorrectedToColon = nullptr 
)

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.

Parameters:
SScope in which the nested-name-specifier occurs.
IdentifierIdentifier in the sequence "identifier" "::".
IdentifierLocLocation of the Identifier.
CCLocLocation of "::" following Identifier.
ObjectTypeType of postfix expression if the nested-name-specifier occurs in construct like: ptr->nns::f.
EnteringContextIf true, enter the context specified by the nested-name-specifier.
SSOptional nested name specifier preceding the identifier.
ScopeLookupResultProvides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.
ErrorRecoveryLookupSpecifies if the method is called to improve error recovery and what kind of recovery is performed.
IsCorrectedToColonIf not null, suggestion of replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'.

This routine differs only slightly from ActOnCXXNestedNameSpecifier, in that it contains an extra parameter ScopeLookupResult, which provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.

If ErrorRecoveryLookup is true, then this call is used to improve error recovery. This means that it should not emit diagnostics, it should just return true on failure. It also means it should only return a valid scope if it *knows* that the result is correct. It should not return in a dependent context, for example. Nor will it extend SS with the scope specifier.

Definition at line 446 of file SemaCXXScopeSpec.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), CTK_ErrorRecovery, CurContext, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::CXXScopeSpec::Extend(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::Decl::getCanonicalDecl(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getTypeDeclType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::ASTContext::hasSameType(), isAcceptableNestedNameSpecifier(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), LookupName(), LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), MarkAnyDeclReferenced(), PDiag(), clang::TypeLocBuilder::push(), RequireCompleteDeclContext(), S, clang::LookupResult::setContextRange(), clang::LookupResult::setLookupName(), and clang::TypeSpecTypeLoc::setNameLoc().

Referenced by ActOnCXXNestedNameSpecifier(), and IsInvalidUnlessNestedName().

ExprResult Sema::BuildCXXNew ( SourceRange  Range,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
QualType  AllocType,
TypeSourceInfo AllocTypeInfo,
Expr ArraySize,
SourceRange  DirectInitRange,
Expr Initializer,
bool  TypeMayContainAuto = true 
)

Definition at line 1156 of file SemaExprCXX.cpp.

References AA_Converting, clang::CXXNewExpr::CallInit, CheckAllocatedType(), CheckDestructorAccess(), CheckPlaceholderExpr(), Context, clang::frontend::CPlusPlus11, clang::IntegerLiteral::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateRemoval(), DAR_Failed, DeduceAutoType(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindAllocationFunctions(), GatherArgumentsForCall(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getCharWidth(), clang::ASTContext::getConstantArrayType(), clang::SourceRange::getEnd(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::ASTContext::getLifetimeQualifiedType(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::DeclaratorDecl::getLocStart(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getPointerType(), clang::ASTContext::getPreferredTypeAlign(), clang::ASTContext::getSizeType(), getSourceManager(), clang::TypeLoc::getSourceRange(), clang::Stmt::getSourceRange(), clang::TargetInfo::getSuitableAlign(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSize(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeNew(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Decl::isImplicit(), clang::SourceManager::isInSystemHeader(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isLegalArrayNewInitializer(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), isStdInitializerList(), clang::Expr::isTypeDependent(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Expr::isValueDependent(), clang::FunctionProtoType::isVariadic(), clang::CXXNewExpr::ListInit, LookupDestructor(), MarkFunctionReferenced(), clang::CXXNewExpr::NoInit, clang::ArrayType::Normal, clang::Qualifiers::OCL_None, PDiag(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), S, VariadicDoesNotApply, and VariadicFunction.

Referenced by ActOnCXXNew().

Definition at line 5665 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, canThrow(), and Context.

Referenced by ActOnNoexceptExpr().

ExprResult Sema::BuildCXXThrow ( SourceLocation  OpLoc,
Expr Ex,
bool  IsThrownVarInScope 
)
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 
)
ExprResult Sema::BuildCXXUuidof ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildDeclarationNameExpr ( const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
NamedDecl D,
NamedDecl FoundD = nullptr,
const TemplateArgumentListInfo TemplateArgs = nullptr 
)
Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup ( MutableArrayRef< Decl * >  Group,
bool  TypeMayContainAuto = true 
)
ExprResult Sema::BuildDeclRefExpr ( ValueDecl D,
QualType  Ty,
ExprValueKind  VK,
SourceLocation  Loc,
const CXXScopeSpec SS = nullptr 
)
ExprResult Sema::BuildDeclRefExpr ( ValueDecl D,
QualType  Ty,
ExprValueKind  VK,
const DeclarationNameInfo NameInfo,
const CXXScopeSpec SS = nullptr,
NamedDecl FoundD = nullptr,
const TemplateArgumentListInfo TemplateArgs = nullptr 
)
ExprResult Sema::BuildDependentDeclRefExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
QualType Sema::BuildExtVectorType ( QualType  T,
Expr ArraySize,
SourceLocation  AttrLoc 
)
Sema::ForRangeStatus Sema::BuildForRangeBeginEndCall ( Scope S,
SourceLocation  Loc,
SourceLocation  RangeLoc,
VarDecl Decl,
BeginEndFunction  BEF,
const DeclarationNameInfo NameInfo,
LookupResult MemberLookup,
OverloadCandidateSet CandidateSet,
Expr Range,
ExprResult CallExpr 
)
QualType Sema::BuildFunctionType ( QualType  T,
MutableArrayRef< QualType ParamTypes,
SourceLocation  Loc,
DeclarationName  Entity,
const FunctionProtoType::ExtProtoInfo EPI 
)

Build a function type.

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

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.
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.
EPIExtra information about the function type. Usually this will be taken from an existing function with the same prototype.
Returns:
A suitable function type, if there are no errors. The unqualified type will always be a FunctionProtoType. Otherwise, returns a NULL type.

Definition at line 1767 of file SemaType.cpp.

References CheckFunctionReturnType(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Type::isHalfType(), and clang::Type::isVoidType().

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

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

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 ']'.
RBracLocThe location of the closing square bracket ']'.
ArgsInThe message arguments.

Definition at line 2336 of file SemaExprObjC.cpp.

References AreMultipleMethodsInGlobalPool(), checkCocoaAPI(), checkInitMethod(), CheckMessageArgumentTypes(), CheckPlaceholderExpr(), checkRetainCycles(), clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_NullToPointer, Context, clang::frontend::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), CurContext, DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseARCUseOfWeakReceiver(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), Diags, clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), forceUnknownAnyToType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedClassType(), clang::Type::getAsObjCQualifiedIdType(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getEnclosingFunction(), getLangOpts(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::ObjCMessageExpr::getMethodFamily(), clang::ASTContext::getObjCIdType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::Type::isBlockPointerType(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::DiagnosticsEngine::isIgnored(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Type::isIntegerType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::ASTContext::isObjCNSObjectType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), isSelfExpr(), clang::Expr::isTypeDependent(), clang::Selector::isUnarySelector(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupInstanceMethodInGlobalPool(), LookupMethodInQualifiedType(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), MaybeBindToTemporary(), clang::Expr::NPC_ValueDependentIsNull, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::Qualifiers::OCL_Weak, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, PerformContextuallyConvertToObjCPointer(), clang::sema::FunctionScopeInfo::recordUseOfWeak(), RequireCompleteType(), clang::ObjCMessageExpr::setDelegateInitCall(), clang::ASTContext::UnknownAnyTy, and clang::VK_RValue.

Referenced by ActOnInstanceMessage(), ActOnSuperMessage(), and BuildInstanceMessageImplicit().

ExprResult Sema::BuildInstanceMessageImplicit ( Expr Receiver,
QualType  ReceiverType,
SourceLocation  Loc,
Selector  Sel,
ObjCMethodDecl Method,
MultiExprArg  Args 
)

Definition at line 2296 of file SemaExprObjC.cpp.

References BuildInstanceMessage().

Referenced by CheckObjCBridgeRelatedConversions().

void Sema::buildLambdaScope ( sema::LambdaScopeInfo LSI,
CXXMethodDecl CallOperator,
SourceRange  IntroducerRange,
LambdaCaptureDefault  CaptureDefault,
SourceLocation  CaptureDefaultLoc,
bool  ExplicitParams,
bool  ExplicitResultType,
bool  Mutable 
)
ExprResult Sema::BuildLiteralOperatorCall ( LookupResult R,
DeclarationNameInfo SuffixInfo,
ArrayRef< Expr * >  Args,
SourceLocation  LitEndLoc,
TemplateArgumentListInfo TemplateArgs = nullptr 
)

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.
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 1806 of file SemaType.cpp.

References adjustMemberFunctionCC(), CheckDistantExceptionSpec(), Context, Diag(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getMemberPointerType(), getPrintableNameForEntity(), clang::QualType::getTypePtr(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), and clang::Type::isVoidType().

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildMemberReferenceExpr ( Expr Base,
QualType  BaseType,
SourceLocation  OpLoc,
bool  IsArrow,
CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
NamedDecl FirstQualifierInScope,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs,
ActOnMemberAccessExtraArgs ExtraArgs = nullptr 
)
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,
ActOnMemberAccessExtraArgs ExtraArgs = nullptr 
)

Definition at line 881 of file SemaExprMember.cpp.

References clang::sema::LambdaScopeInfo::addPotentialThisCapture(), clang::LookupResult::begin(), clang::ASTContext::BoundMemberTy, BuildFieldReferenceExpr(), BuildMemberExpr(), BuildMSPropertyRefExpr(), clang::Type::castAs(), Context, clang::UnresolvedMemberExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::UnresolvedSetIterator::getPair(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::Stmt::getSourceRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Sema::ActOnMemberAccessExtraArgs::HasTrailingLParen, clang::Sema::ActOnMemberAccessExtraArgs::Id, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXInstanceMember(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::LookupResult::isOverloadedResult(), clang::Type::isPointerType(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isUnresolvableResult(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceRange::isValid(), clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, clang::OK_Ordinary, clang::Sema::ActOnMemberAccessExtraArgs::S, clang::LookupResult::setBaseObjectType(), clang::LookupResult::suppressDiagnostics(), clang::ast_matchers::type, clang::VK_LValue, and clang::VK_RValue.

MemInitResult Sema::BuildMemInitializer ( Decl ConstructorD,
Scope S,
CXXScopeSpec SS,
IdentifierInfo MemberOrBase,
ParsedType  TemplateTypeTy,
const DeclSpec DS,
SourceLocation  IdLoc,
Expr Init,
SourceLocation  EllipsisLoc 
)

Handle a C++ member initializer.

Definition at line 2777 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), BuildBaseInitializer(), BuildDecltypeType(), BuildMemberInitializer(), CheckTypenameType(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), clang::LookupResult::empty(), clang::ETK_None, FindBaseInitializer(), clang::LookupResult::getAsSingle(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ASTContext::getElaboratedType(), clang::SourceRange::getEnd(), clang::Decl::getLocation(), clang::CXXBaseSpecifier::getLocStart(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::CXXMethodDecl::getParent(), clang::DeclSpec::getRepAsExpr(), clang::CXXScopeSpec::getScopeRep(), clang::CXXBaseSpecifier::getSourceRange(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CXXBaseSpecifier::getType(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), isDependentScopeSpecifier(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::DeclContext::lookup(), LookupOrdinaryName, LookupParsedName(), MarkAnyDeclReferenced(), PDiag(), Record, S, clang::LookupResult::setLookupName(), clang::LookupResult::suppressDiagnostics(), and clang::TST_decltype.

Referenced by ActOnMemInitializer().

BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure. Ref: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx Example:

struct A { int a; }; struct B { struct A; int b; };

void foo() { B var; var.a = 3; }

Definition at line 4070 of file SemaDecl.cpp.

References clang::AS_none, Context, clang::FieldDecl::Create(), clang::RecordDecl::getDefinition(), clang::Decl::getLocation(), clang::DeclSpec::getLocStart(), clang::ASTContext::getTypeDeclType(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and clang::Declarator::TypeNameContext.

StmtResult Sema::BuildMSDependentExistsStmt ( SourceLocation  KeywordLoc,
bool  IsIfExists,
NestedNameSpecifierLoc  QualifierLoc,
DeclarationNameInfo  NameInfo,
Stmt Nested 
)

Definition at line 3351 of file SemaStmt.cpp.

References Context.

BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression. The type of the expression will either be "NSNumber *" or "NSString *" depending on the type of ValueType, which is allowed to be a built-in numeric type or "char *" or "const char *".

Definition at line 444 of file SemaExprObjC.cpp.

References clang::CharacterLiteral::Ascii, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, clang::NSAPI::ClassId_NSString, Context, clang::ObjCMethodDecl::Create(), clang::ObjCInterfaceDecl::Create(), clang::ParmVarDecl::Create(), clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::SourceRange::getBegin(), getNSNumberFactoryMethod(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTranslationUnitDecl(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::getWideCharType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ObjCMethodDecl::parameters(), clang::ObjCMethodDecl::Required, clang::SC_None, clang::ASTContext::Selectors, clang::ObjCMethodDecl::setMethodParams(), clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, validateBoxingMethod(), clang::CharacterLiteral::Wide, and clang::CanQual< T >::withConst().

ExprResult Sema::BuildObjCBridgedCast ( SourceLocation  LParenLoc,
ObjCBridgeCastKind  Kind,
SourceLocation  BridgeKeywordLoc,
TypeSourceInfo TSInfo,
Expr SubExpr 
)
VarDecl * Sema::BuildObjCExceptionDecl ( TypeSourceInfo TInfo,
QualType  ExceptionType,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
bool  Invalid = false 
)
ExprResult Sema::BuildObjCSubscriptExpression ( SourceLocation  RB,
Expr BaseExpr,
Expr IndexExpr,
ObjCMethodDecl getterMethod,
ObjCMethodDecl setterMethod 
)
ExprResult Sema::BuildOverloadedArrowExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
bool NoArrowOperatorFound = nullptr 
)

BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists), where Base is an expression of class type and Member is the name of the member we're trying to find.

Definition at line 11975 of file SemaOverload.cpp.

References AddMethodCandidate(), clang::CodeGen::Base, clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), clang::Expr::Classify(), Context, CreateFunctionRefExpr(), clang::FixItHint::CreateReplacement(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, Diag(), clang::OverloadCandidateSet::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), getDeletedOrUnavailableSuffix(), clang::Expr::getExprLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformObjectArgumentInitialization(), RequireCompleteType(), clang::OverloadCandidateSet::size(), and clang::LookupResult::suppressDiagnostics().

Referenced by ActOnStartCXXMemberReference().

ExprResult Sema::BuildOverloadedCallExpr ( Scope S,
Expr Fn,
UnresolvedLookupExpr ULE,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc,
Expr ExecConfig,
bool  AllowTypoCorrection = true 
)

BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the declaration Func) and the call arguments Args/NumArgs, attempt to resolve the function call down to a specific function. If overload resolution succeeds, returns the call expression produced by overload resolution. Otherwise, emits diagnostics and returns ExprError.

Definition at line 10749 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::BestViableFunction(), buildOverloadedCallSet(), clang::OverloadCandidateSet::CSK_Normal, FinishOverloadedCallExpr(), clang::Expr::getExprLoc(), and clang::Stmt::getLocStart().

bool Sema::buildOverloadedCallSet ( Scope S,
Expr Fn,
UnresolvedLookupExpr ULE,
MultiExprArg  Args,
SourceLocation  RParenLoc,
OverloadCandidateSet CandidateSet,
ExprResult Result 
)

Build a paren type including T.

Definition at line 1261 of file SemaType.cpp.

References Context, and clang::ASTContext::getParenType().

Referenced by GetFullTypeForDeclarator().

Synthesizes a variable for a parameter arising from a typedef.

Definition at line 9880 of file SemaDecl.cpp.

References Context, clang::ParmVarDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::SC_None, and clang::Decl::setImplicit().

Referenced by DeclClonePragmaWeak(), and clang::TemplateDeclInstantiator::SubstFunctionType().

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 1383 of file SemaType.cpp.

References checkQualifiedFunction(), Context, Diag(), getLangOpts(), clang::ASTContext::getPointerType(), getPrintableNameForEntity(), inferARCLifetimeForPointee(), clang::Type::isObjCObjectType(), and clang::Type::isReferenceType().

Referenced by GetFullTypeForDeclarator().

ExprResult Sema::BuildPossibleImplicitMemberExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs 
)
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,
bool  IsAddressOfOperand,
TypeSourceInfo **  RecoveryTSI = nullptr 
)
ExprResult Sema::BuildQualifiedTemplateIdExpr ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
QualType Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
Qualifiers  Qs,
const DeclSpec DS = nullptr 
)
QualType Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
unsigned  CVRA,
const DeclSpec DS = nullptr 
)
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 1418 of file SemaType.cpp.

References checkQualifiedFunction(), Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), inferARCLifetimeForPointee(), clang::Type::isVoidType(), and clang::ASTContext::OverloadTy.

Referenced by CastForMoving(), and GetFullTypeForDeclarator().

ExprResult Sema::BuildResolvedCallExpr ( Expr Fn,
NamedDecl NDecl,
SourceLocation  LParenLoc,
ArrayRef< Expr * >  Args,
SourceLocation  RParenLoc,
Expr Config = nullptr,
bool  IsExecConfig = false 
)

BuildResolvedCallExpr - Build a call to a resolved expression, i.e. an expression not of OverloadTy. The expression should unary-convert to an expression of function-pointer or block-pointer type.

Parameters:
NDeclthe declaration being called, if available

Definition at line 4638 of file SemaExpr.cpp.

References clang::ASTContext::BoolTy, clang::ASTContext::BuiltinInfo, clang::Type::castAs(), clang::CK_BuiltinFnToFnPtr, Context, clang::ast_matchers::CUDAKernelCallExpr, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::FunctionDecl::getBuiltinID(), clang::FunctionType::getCallResultType(), clang::Stmt::getLocStart(), clang::NamedDecl::getName(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::Builtin::Context::hasCustomTypechecking(), clang::FunctionDecl::hasPrototype(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionProtoType::isParamConsumed(), clang::Type::isSpecificBuiltinType(), clang::FunctionProtoType::isVariadic(), clang::Type::isVoidType(), clang::FunctionDecl::param_size(), rebuildUnknownAnyFunction(), clang::CallExpr::setArg(), clang::CallExpr::setCallee(), clang::Expr::setType(), clang::Expr::setValueKind(), clang::ASTContext::UnknownAnyTy, and clang::VK_RValue.

Referenced by BuildCallToMemberFunction(), and FinishOverloadedCallExpr().

StmtResult Sema::BuildReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp 
)
Decl * Sema::BuildStaticAssertDeclaration ( SourceLocation  StaticAssertLoc,
Expr AssertExpr,
StringLiteral AssertMessageExpr,
SourceLocation  RParenLoc,
bool  Failed 
)

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

References clang::TemplateArgumentListInfo::addArgument(), 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 
)
ExprResult Sema::BuildTypeTrait ( TypeTrait  Kind,
SourceLocation  KWLoc,
ArrayRef< TypeSourceInfo * >  Args,
SourceLocation  RParenLoc 
)
ExprResult Sema::BuildUnaryOp ( Scope S,
SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr Input 
)
NamedDecl * Sema::BuildUsingDeclaration ( Scope S,
AccessSpecifier  AS,
SourceLocation  UsingLoc,
CXXScopeSpec SS,
DeclarationNameInfo  NameInfo,
AttributeList AttrList,
bool  IsInstantiation,
bool  HasTypenameKeyword,
SourceLocation  TypenameLoc 
)

Builds a using declaration.

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

References clang::LookupResult::addDecl(), clang::DeclContext::addDecl(), clang::LookupResult::begin(), Builder, BuildUsingShadowDecl(), CheckInheritingConstructorUsingDecl(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), Context, CorrectTypo(), clang::UsingDecl::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::UnresolvedUsingTypenameDecl::Create(), CTK_ErrorRecovery, CurContext, clang::DeclarationName::CXXConstructorName, clang::ASTContext::DeclarationNames, Diag(), diagnoseTypo(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::LookupResult::Filter::erase(), ForRedeclaration, clang::LookupResult::getAsSingle(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::LookupResult::getFoundDecl(), clang::Decl::getIdentifierNamespace(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getRecordType(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ASTContext::getTypeDeclType(), clang::CXXScopeSpec::getWithLocInContext(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::Decl::IDNS_Ordinary, clang::LookupResult::isAmbiguous(), isDeclInScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFunctionOrMethod(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isLocalExternDecl(), clang::DeclContext::isRecord(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, clang::LookupResult::makeFilter(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::LookupResult::Filter::next(), PDiag(), Previous, RequireCompleteDeclContext(), S, clang::Decl::setAccess(), clang::LookupResult::setBaseObjectType(), clang::LookupResult::setHideTags(), clang::Decl::setInvalidDecl(), clang::LookupResult::setLookupName(), clang::DeclarationNameInfo::setName(), and clang::DeclarationNameInfo::setNamedTypeInfo().

Referenced by ActOnUsingDeclaration().

UsingShadowDecl * Sema::BuildUsingShadowDecl ( Scope S,
UsingDecl UD,
NamedDecl Target,
UsingShadowDecl PrevDecl 
)
ExprResult Sema::BuildVAArgExpr ( SourceLocation  BuiltinLoc,
Expr E,
TypeSourceInfo TInfo,
SourceLocation  RPLoc 
)
void Sema::BuildVariableInstantiation ( VarDecl NewVar,
VarDecl OldVar,
const MultiLevelTemplateArgumentList TemplateArgs,
LateInstantiatedAttrVec LateAttrs,
DeclContext Owner,
LocalInstantiationScope StartingScope,
bool  InstantiatingVarTemplate = false 
)

BuildVariableInstantiation - Used after a new variable has been created. Sets basic variable data and decides whether to postpone the variable instantiation.

Definition at line 3541 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::addHiddenDecl(), clang::Type::castAs(), CheckVariableDeclaration(), Context, CurrentInstantiationScope, DiagnoseUnusedDecl(), FindInstantiatedDecl(), ForRedeclaration, clang::Decl::getAccess(), clang::Type::getAs(), clang::TagDecl::getDeclaratorForAnonDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getInitStyle(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::ASTContext::getManglingNumber(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ASTContext::getStaticLocalNumber(), clang::VarDecl::getTSCSpec(), clang::ValueDecl::getType(), clang::TagDecl::hasDeclaratorForAnonDecl(), clang::NamedDecl::hasLinkage(), clang::TagDecl::hasNameForLinkage(), InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateVariableInitializer(), clang::VarDecl::isConstexpr(), clang::VarDecl::isCXXForRangeDecl(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclContext::isFunctionOrMethod(), clang::VarDecl::isInitCapture(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isPreviousDeclInSameBlockScope(), clang::Decl::isReferenced(), clang::VarDecl::isStaticDataMember(), clang::Type::isUndeducedType(), clang::Decl::isUsed(), LookupOrdinaryName, LookupQualifiedName(), LookupRedeclarationWithLinkage, clang::DeclContext::makeDeclVisibleInContext(), Previous, clang::Decl::setAccess(), clang::VarDecl::setConstexpr(), clang::VarDecl::setCXXForRangeDecl(), clang::TagDecl::setDeclaratorForAnonDecl(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), clang::VarDecl::setInstantiationOfStaticDataMember(), clang::Decl::setIsUsed(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::ASTContext::setManglingNumber(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Decl::setReferenced(), clang::ASTContext::setStaticLocalNumber(), and clang::VarDecl::setTSCSpec().

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

VarTemplateSpecializationDecl * Sema::BuildVarTemplateInstantiation ( VarTemplateDecl VarTemplate,
VarDecl FromVar,
const TemplateArgumentList TemplateArgList,
const TemplateArgumentListInfo TemplateArgsInfo,
SmallVectorImpl< TemplateArgument > &  Converted,
SourceLocation  PointOfInstantiation,
void *  InsertPos,
LateInstantiatedAttrVec LateAttrs = nullptr,
LocalInstantiationScope StartingScope = nullptr 
)
ExprResult Sema::BuildVectorLiteral ( SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
Expr E,
TypeSourceInfo TInfo 
)

CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression.

Definition at line 654 of file SemaExpr.cpp.

References clang::CK_FunctionToPointerDecay, Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Type::isFunctionType(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function.

This will be false if we may need the body of the function in the middle of parsing an expression (where it's impractical to switch to parsing a different function), for instance, if it's constexpr in C++11 or has an 'auto' return type in C++14. These cases are essentially bugs.

Definition at line 10356 of file SemaDecl.cpp.

References clang::DeclSpec::containsPlaceholderType(), clang::DeclaratorChunk::Function, clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), clang::DeclSpec::isConstexprSpecified(), clang::QualType::isNull(), and clang::Type::isUndeducedType().

Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function.

This will be false only if we may need the body of the function in order to parse the rest of the program (for instance, if it is constexpr in C++11 or has an 'auto' return type in C++14).

Definition at line 10380 of file SemaDecl.cpp.

References clang::Decl::getAsFunction().

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

Definition at line 51 of file SemaExpr.cpp.

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

QualType Sema::CheckAdditionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  Opc,
QualType CompLHSTy = nullptr 
)

CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object. If it is an lvalue, the object cannot be declared with storage class register or be a bit field. Note: The usual conversions are *not* applied to the operand of the & operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue. In C++, the operand might be an overloaded function name, in which case we allow the '&' but retain the overloaded-function type.

Definition at line 8929 of file SemaExpr.cpp.

References bool, clang::frontend::C99, clang::Expr::ClassifyLValue(), Context, clang::FixItHint::CreateInsertion(), clang::ASTContext::DependentTy, Diag(), diagnoseAddressOfInvalidType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::SourceRange::getBegin(), clang::TargetInfo::getCXXABI(), clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::DeclContext::getParent(), clang::ASTContext::getPointerType(), getPrimaryDecl(), clang::DeclRefExpr::getQualifier(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::IgnoreParens(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCObjectType(), clang::Type::isPlaceholderType(), clang::DeclContext::isRecord(), clang::Type::isReferenceType(), clang::Expr::isTypeDependent(), clang::Expr::LV_ArrayTemporary, clang::Expr::LV_ClassTemporary, clang::Expr::LV_IncompleteVoidType, clang::Expr::LV_MemberFunction, clang::Expr::LV_Valid, clang::OK_BitField, clang::OK_VectorComponent, clang::ASTContext::OverloadTy, clang::SC_Register, clang::ASTContext::UnknownAnyTy, clang::UO_AddrOf, and clang::UO_Deref.

Referenced by SemaBuiltinAddressof().

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

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

Referenced by FindAllocationFunctions(), FindAllocationOverload(), and FindDeallocationFunction().

CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values. C99 6.5.16.

Definition at line 6319 of file SemaExpr.cpp.

References clang::CK_Invalid, and clang::VK_RValue.

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

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

References clang::ASTContext::areCompatibleVectorTypes(), clang::ASTContext::BoolTy, checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_LValueBitCast, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, clang::CK_VectorSplat, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), getElementType(), clang::ASTContext::getObjCClassRedefinitionType(), clang::Expr::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::Type::isArithmeticType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isExtVectorType(), clang::Type::isIntegerType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), isObjCPtrBlockCompatible(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), maybeExtendBlockObject(), and clang::ASTContext::typesAreCompatible().

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

Definition at line 1796 of file SemaAccess.cpp.

References clang::CXXBasePath::Access, AR_accessible, AR_dependent, AR_inaccessible, clang::AS_public, clang::CodeGen::Base, CheckAccess(), CheckEffectiveAccess(), Context, and clang::Type::getAs().

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

CXXBaseSpecifier * Sema::CheckBaseSpecifier ( CXXRecordDecl Class,
SourceRange  SpecifierRange,
bool  Virtual,
AccessSpecifier  Access,
TypeSourceInfo TInfo,
SourceLocation  EllipsisLoc 
)
QualType Sema::CheckBitwiseOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign = false 
) [inline]

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

References CheckCXXBooleanCondition(), CheckPlaceholderExpr(), DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseAssignmentAsCondition(), DiagnoseEqualityWithExtraParens(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isScalarType(), and clang::Expr::isTypeDependent().

Referenced by ActOnBooleanCondition(), and CheckConditionVariable().

bool Sema::CheckCallingConvAttr ( const AttributeList attr,
CallingConv CC,
const FunctionDecl FD = nullptr 
)
bool Sema::CheckCallReturnType ( QualType  ReturnType,
SourceLocation  Loc,
CallExpr CE,
FunctionDecl FD 
)
void Sema::CheckCastAlign ( Expr Op,
QualType  T,
SourceRange  TRange 
)

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 1909 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::class_methods(), clang::ObjCCategoryImplDecl::getCategoryDecl(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCInterfaceDecl::lookupMethod(), 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,
SourceLocation  FriendLoc,
unsigned  NumOuterTemplateParamLists,
TemplateParameterList **  OuterTemplateParamLists 
)

Definition at line 834 of file SemaTemplate.cpp.

References clang::AS_none, clang::AS_public, clang::LookupResult::begin(), Context, clang::FriendDecl::Create(), clang::CXXRecordDecl::Create(), clang::ClassTemplateDecl::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::DeclContext::Encloses(), clang::LookupResult::end(), clang::DeclContext::Equals(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::Scope::getFlags(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInjectedClassNameType(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::DeclContext::getLookupParent(), clang::Scope::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), clang::DeclContext::makeDeclVisibleInContext(), Previous, S, clang::Decl::setAccess(), clang::CXXRecordDecl::setDescribedClassTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::Decl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setObjectOfFriendDecl(), clang::TagDecl::setTemplateParameterListsInfo(), clang::TemplateParameterList::size(), clang::TagDecl::startDefinition(), clang::Scope::TemplateParamScope, and clang::TTK_Enum.

Referenced by ActOnTemplatedFriendTag().

QualType Sema::CheckCompareOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  OpaqueOpc,
bool  isRelational 
)

Definition at line 7863 of file SemaExpr.cpp.

References clang::ASTContext::areComparableObjCPointerTypes(), clang::BO_EQ, clang::BO_GE, clang::BO_LE, clang::BO_NE, clang::Type::castAs(), checkArithmeticNull(), checkEnumComparison(), clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_CPointerToObjCPointerCast, clang::CK_IntegralToPointer, clang::CK_NullToMemberPointer, clang::CK_NullToPointer, Context, convertPointersToCompositeType(), clang::frontend::CPlusPlus, Diag(), diagnoseDistinctPointerComparison(), diagnoseFunctionPointerToVoidComparison(), diagnoseLogicalNotOnLHSofComparison(), diagnoseObjCLiteralComparison(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), getCompareDecl(), clang::Stmt::getLocStart(), clang::ASTContext::getLogicalOperationType(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Type::hasFloatingRepresentation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isArrayType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceLocation::isMacroID(), clang::Type::isMemberPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), isObjCObjectLiteral(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRealType(), clang::Type::isReferenceType(), clang::Type::isVectorType(), clang::Type::isVoidType(), IsWithinTemplateSpecialization(), clang::Expr::NPC_ValueDependentIsNull, clang::Expr::NPCK_NotNull, and clang::ASTContext::typesAreCompatible().

void Sema::CheckCompatibleReinterpretCast ( QualType  SrcType,
QualType  DestType,
bool  IsDereference,
SourceRange  Range 
)

Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc.

Definition at line 4742 of file SemaDeclCXX.cpp.

References clang::AS_public, CheckAbstractClassUsage(), checkDLLAttribute(), CheckExplicitlyDefaultedSpecialMember(), Context, CXXInvalid, DeclareInheritingConstructors(), Diag(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseHiddenVirtualMethods(), DynamicClasses, clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::Decl::getAccess(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDestructor(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumBases(), clang::CXXRecordDecl::getNumVBases(), clang::ASTContext::getRecordType(), getSpecialMember(), clang::TagDecl::getTagKind(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CXXRecordDecl::isAbstract(), clang::CXXRecordDecl::isAggregate(), clang::TagDecl::isDependentType(), clang::CXXRecordDecl::isDynamicClass(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::CXXRecordDecl::isLiteral(), clang::RecordDecl::isMsStruct(), clang::CXXRecordDecl::isPolymorphic(), clang::CXXMethodDecl::isVirtual(), LangOpts, clang::DeclContext::lookup(), clang::CXXRecordDecl::methods(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back(), Record, RequireLiteralType(), SpecialMemberIsTrivial(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by ActOnFinishCXXMemberSpecification(), and InstantiateClass().

Definition at line 9351 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::VarDecl::checkInitIsICE(), Context, clang::frontend::CPlusPlus11, clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, Diag(), clang::Decl::dropAttr(), clang::VarDecl::evaluateValue(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::Decl::getDeclContext(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::DeclContext::getRedeclContext(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::hasInit(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::InitializedEntity::InitializeBlock(), clang::Expr::isConstantInitializer(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isInitICE(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), clang::VarDecl::isStaticLocal(), clang::Type::isStructureOrClassType(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarDecl::isUsableInConstantExpressions(), clang::Expr::isValueDependent(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::ASTContext::PSF_Write, clang::ASTContext::setBlockVarCopyInits(), Stack, clang::VarDecl::TLS_Static, clang::ast_matchers::type, and clang::VK_LValue.

Referenced by ActOnEndOfTranslationUnit().

QualType Sema::CheckConditionalOperands ( ExprResult Cond,
ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
ExprObjectKind OK,
SourceLocation  QuestionLoc 
)
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 
)
void Sema::CheckConstructor ( CXXConstructorDecl Constructor)
Sema::AccessResult Sema::CheckConstructorAccess ( SourceLocation  Loc,
CXXConstructorDecl D,
const InitializedEntity Entity,
AccessSpecifier  Access,
bool  IsCopyBindingRefToTemp = false 
)

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

References clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), Diag(), diagnoseIgnoredQualifiers(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::FunctionProtoType::getParamTypes(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::FunctionType::getReturnType(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::Declarator::isInvalidType(), clang::DeclSpec::isVirtualSpecified(), clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::Qualifiers::Restrict, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::ASTContext::VoidTy, and clang::Qualifiers::Volatile.

Referenced by CreateNewFunctionDecl().

ExprResult Sema::CheckConvertedConstantExpression ( Expr From,
QualType  T,
llvm::APSInt &  Value,
CCEKind  CCE 
)

CheckConvertedConstantExpression - Check that the expression From is a converted constant expression of type T, perform the conversion and produce the converted expression, per C++11 [expr.const]p3.

Definition at line 4944 of file SemaOverload.cpp.

References AA_Converting, clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, CheckConvertedConstantConversions(), checkPlaceholderForOverload(), Context, clang::Expr::EvalStatus::Diag, Diag(), DiagnoseMultipleUserDefinedConversion(), clang::ImplicitConversionSequence::EllipsisConversion, clang::Expr::EvaluateAsRValue(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::APValue::getAsString(), clang::APValue::getInt(), clang::ImplicitConversionSequence::getKind(), clang::Stmt::getLocStart(), clang::StandardConversionSequence::getNarrowingKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::APValue::isInt(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), LangOpts, clang::NK_Constant_Narrowing, clang::NK_Not_Narrowing, clang::NK_Type_Narrowing, clang::NK_Variable_Narrowing, PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, TryImplicitConversion(), clang::ImplicitConversionSequence::UserDefined, clang::ImplicitConversionSequence::UserDefinedConversion, and clang::Expr::EvalResult::Val.

Referenced by ActOnCXXNew().

bool Sema::CheckCUDATarget ( CUDAFunctionTarget  CallerTarget,
CUDAFunctionTarget  CalleeTarget 
)
bool Sema::CheckCUDATarget ( const FunctionDecl Caller,
const FunctionDecl Callee 
)

Definition at line 62 of file SemaCUDA.cpp.

References CheckCUDATarget(), and IdentifyCUDATarget().

CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.

CheckCXXBooleanCondition - Returns true if a conversion to bool is invalid.

Definition at line 2481 of file SemaExprCXX.cpp.

References PerformContextuallyConvertToBool().

Referenced by CheckBooleanCondition(), and CXXCheckConditionalOperands().

CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default].

Definition at line 676 of file SemaDeclCXX.cpp.

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

Referenced by ActOnFinishDelayedCXXMethodDeclaration().

bool Sema::CheckCXXThisCapture ( SourceLocation  Loc,
bool  Explicit = false,
bool  BuildAndDiagnose = true,
const unsigned *const  FunctionScopeIndexToStopAt = nullptr 
)

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

Parameters:
LocThe location at which the capture of 'this' occurs.
ExplicitWhether 'this' is explicitly captured in a lambda capture list.
FunctionScopeIndexToStopAtIf non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture 'this' that may or may not be used in certain specializations of a nested generic lambda (depending on whether the name resolves to a non-static member function or a static function).
Returns:
returns 'true' if failed, 'false' if success.

Definition at line 801 of file SemaExprCXX.cpp.

References clang::sema::CapturingScopeInfo::addThisCapture(), clang::sema::LambdaScopeInfo::CallOperator, captureThis(), Context, Diag(), FunctionScopes, getCurrentThisType(), clang::sema::CapturingScopeInfo::ImpCap_Block, clang::sema::CapturingScopeInfo::ImpCap_CapturedRegion, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::isGenericLambdaCallOperatorSpecialization(), and isUnevaluatedContext().

Referenced by ActOnCXXThis(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), FixOverloadedFunctionReference(), and clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().

ExprResult Sema::CheckCXXThrowOperand ( SourceLocation  ThrowLoc,
Expr E,
bool  IsThrownVarInScope 
)

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

References clang::LookupResult::asUnresolvedSet(), Context, clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::Filter::erase(), clang::Decl::getDeclContext(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), and clang::FunctionDecl::setDependentTemplateSpecialization().

bool Sema::CheckDerivedToBaseConversion ( QualType  Derived,
QualType  Base,
SourceLocation  Loc,
SourceRange  Range,
CXXCastPath BasePath = nullptr,
bool  IgnoreAccess = false 
)
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 1708 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().

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

References clang::Qualifiers::Const, Context, clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), diagnoseIgnoredQualifiers(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::FTIHasNonVoidParameters(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpecLoc(), GetTypeFromParser(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::DeclSpec::hasTypeSpecifier(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, clang::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::Variadic, clang::ASTContext::VoidTy, and clang::Qualifiers::Volatile.

Referenced by CreateNewFunctionDecl().

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

Definition at line 125 of file SemaExceptionSpec.cpp.

References clang::Type::getAs(), clang::Type::getPointeeType(), and clang::FunctionProtoType::hasExceptionSpec().

Referenced by BuildMemberPointerType(), and GetFullTypeForDeclarator().

EnableIfAttr * Sema::CheckEnableIf ( FunctionDecl Function,
ArrayRef< Expr * >  Args,
bool  MissingImplicitThis = false 
)
EnumConstantDecl * Sema::CheckEnumConstant ( EnumDecl Enum,
EnumConstantDecl LastEnumConst,
SourceLocation  IdLoc,
IdentifierInfo Id,
Expr val 
)
bool Sema::CheckEnumRedeclaration ( SourceLocation  EnumLoc,
bool  IsScoped,
QualType  EnumUnderlyingTy,
const EnumDecl Prev 
)

Check that this is a valid underlying type for an enum declaration.

Definition at line 10894 of file SemaDecl.cpp.

References Diag(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isDependentType().

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

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

bool clang::Sema::CheckEquivalentExceptionSpec ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Old,
SourceLocation  OldLoc,
const FunctionProtoType New,
SourceLocation  NewLoc,
bool MissingExceptionSpecification = nullptr,
bool MissingEmptyExceptionSpecification = nullptr,
bool  AllowNoexceptAllMatchWithNoSpec = false,
bool  IsOperatorNew = false 
)
void Sema::checkExceptionSpecification ( bool  IsTopLevel,
ExceptionSpecificationType  EST,
ArrayRef< ParsedType DynamicExceptions,
ArrayRef< SourceRange DynamicExceptionRanges,
Expr NoexceptExpr,
SmallVectorImpl< QualType > &  Exceptions,
FunctionProtoType::ExceptionSpecInfo ESI 
)
bool clang::Sema::CheckExceptionSpecSubset ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Superset,
SourceLocation  SuperLoc,
const FunctionProtoType Subset,
SourceLocation  SubLoc 
)

Definition at line 5116 of file SemaDeclCXX.cpp.

References CheckExplicitlyDefaultedMemberExceptionSpec(), Context, clang::frontend::CPlusPlus14, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, defaultedSpecialMemberIsConstexpr(), DelayedDefaultedMemberExceptionSpecs, Diag(), clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::Type::getAs(), clang::CXXMethodDecl::getCanonicalDecl(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getSourceRange(), getSpecialMember(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::FunctionProtoType::getTypeQuals(), clang::FunctionProtoType::hasExceptionSpec(), clang::ASTContext::hasSameType(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), InstantiateExceptionSpec(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::Type::isReferenceType(), clang::FunctionDecl::isVariadic(), clang::QualType::isVolatileQualified(), clang::FunctionDecl::setConstexpr(), SetDeclDeleted(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionDecl::TK_NonTemplate, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::ASTContext::VoidTy.

Referenced by CheckCompletedCXXClass(), and SetDeclDefaulted().

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,
InClassInitStyle  InitStyle,
SourceLocation  TSSL,
AccessSpecifier  AS,
NamedDecl PrevDecl,
Declarator D = nullptr 
)

type checking declaration initializers (C99 6.7.8)

Definition at line 8221 of file SemaDecl.cpp.

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

void Sema::CheckForFunctionRedefinition ( FunctionDecl FD,
const FunctionDecl EffectiveDefinition = nullptr 
)
void Sema::CheckFormatString ( const StringLiteral FExpr,
const Expr OrigFormatExpr,
ArrayRef< const Expr * >  Args,
bool  HasVAListArg,
unsigned  format_idx,
unsigned  firstDataArg,
FormatStringType  Type,
bool  inFunctionCall,
VariadicCallType  CallType,
llvm::SmallBitVector &  CheckedVarArgs 
)
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:
IsExplicitSpecializationwhether 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 7774 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::LookupResult::addDecl(), AllowOverloadingOfFunction(), clang::ASTContext::BuiltinInfo, clang::TargetCXXABI::canKeyFunctionBeInline(), clang::Type::castAs(), checkForConflictWithNonVisibleExternC(), clang::LookupResult::clear(), clang::Qualifiers::Const, Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::ASTContext::DeclarationNames, Diag(), clang::LookupResult::empty(), clang::diag::Error, filterNonConflictingPreviousDecls(), clang::Builtin::Context::ForgetBuiltin(), clang::Decl::getAccess(), clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::FunctionDecl::getBuiltinID(), clang::ASTContext::GetBuiltinType(), clang::ASTContext::getCanonicalType(), clang::TargetInfo::getCXXABI(), clang::DeclarationNameTable::getCXXDestructorName(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionProtoType::getExtProtoInfo(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::LookupResult::getFoundDecl(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), clang::FunctionDecl::getLiteralIdentifier(), clang::Decl::getLocation(), clang::FunctionProtoType::getParamTypes(), clang::LookupResult::getRepresentativeDecl(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getStorageClass(), clang::ASTContext::getTargetInfo(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::ASTContext::Idents, clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isConstexpr(), clang::Type::isDependentType(), clang::FunctionDecl::isExternC(), clang::Type::isIncompleteType(), clang::FunctionDecl::isInlined(), clang::Type::isObjCObjectPointerType(), clang::FunctionDecl::isOverloadedOperator(), clang::QualType::isPODType(), clang::LookupResult::isShadowed(), clang::CXXMethodDecl::isStatic(), clang::Type::isVariablyModifiedType(), clang::CXXMethodDecl::isVirtual(), clang::Type::isVoidType(), LookupPredefedObjCSuperType(), Record, ReportOverrides(), clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::ASTContext::setNonKeyFunction(), clang::FunctionDecl::setPreviousDeclaration(), clang::ValueDecl::setType(), and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

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

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

References clang::UnresolvedSetImpl::addDecl(), clang::LookupResult::addDecl(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), clang::Type::castAs(), CheckTemplateSpecializationScope(), clang::LookupResult::clear(), clang::Qualifiers::Const, Context, DeduceTemplateArguments(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::Decl::FOK_None, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), clang::FunctionProtoType::getParamTypes(), clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation(), clang::FunctionDecl::getPrimaryTemplate(), clang::DeclContext::getRedeclContext(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXMethodDecl::isConst(), clang::FunctionDecl::isConstexpr(), clang::MakeDeductionFailureInfo(), clang::FunctionDecl::setConstexpr(), clang::Decl::setLocation(), clang::FunctionTemplateSpecializationInfo::setTemplateSpecializationKind(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

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

CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.

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

Definition at line 1928 of file SemaDeclCXX.cpp.

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

void Sema::CheckImplementationIvars ( ObjCImplementationDecl ImpDecl,
ObjCIvarDecl **  Fields,
unsigned  nIvars,
SourceLocation  Loc 
)
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 41 of file SemaDeclObjC.cpp.

References clang::Decl::addAttr(), clang::Type::castAs(), Context, Diag(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getReturnType(), getSourceManager(), clang::ObjCInterfaceDecl::hasDefinition(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::ObjCInterfaceDecl::isSuperClassOf(), and clang::Decl::setInvalidDecl().

Referenced by BuildInstanceMessage(), and CheckARCMethodDecl().

CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed. If so, returns false; otherwise, emits appropriate diagnostics and returns true.

Definition at line 11499 of file SemaDeclCXX.cpp.

References ActiveTemplateInstantiations, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Diag(), clang::Type::getAs(), clang::DeclarationName::getCXXLiteralIdentifier(), clang::NamedDecl::getDeclName(), clang::TemplateTypeParmDecl::getDepth(), clang::TemplateTypeParmType::getDepth(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::TemplateTypeParmDecl::getIndex(), clang::TemplateTypeParmType::getIndex(), getLangOpts(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::TemplateParameterList::getParam(), clang::PointerType::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::ASTContext::getSizeType(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::QualType::isConstQualified(), clang::FunctionDecl::isExternC(), clang::Decl::isTemplateParameterPack(), clang::NumericLiteralParser::isValidUDSuffix(), clang::QualType::isVolatileQualified(), clang::ASTContext::LongDoubleTy, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::FunctionDecl::param_size(), clang::FunctionDecl::params(), clang::TemplateParameterList::size(), clang::ASTContext::UnsignedLongLongTy, and clang::ASTContext::WideCharTy.

bool Sema::checkLiteralOperatorId ( const CXXScopeSpec SS,
const UnqualifiedId Id 
)
QualType Sema::CheckLogicalOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
unsigned  Opc 
) [inline]
void Sema::CheckMain ( FunctionDecl FD,
const DeclSpec D 
)
Sema::AccessResult Sema::CheckMemberOperatorAccess ( SourceLocation  OpLoc,
Expr ObjectExpr,
Expr ArgExpr,
DeclAccessPair  Found 
)
bool Sema::CheckMemberPointerConversion ( Expr From,
QualType  ToType,
CastKind Kind,
CXXCastPath BasePath,
bool  IgnoreBaseAccess 
)

CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the type ToType. This routine checks for ambiguous or virtual or inaccessible base-to-derived member pointer conversions for which IsMemberPointerConversion has already returned true. It returns true and produces a diagnostic if there was an error, or returns false otherwise.

Definition at line 2702 of file SemaOverload.cpp.

References clang::CK_BaseToDerivedMemberPointer, clang::CK_NullToMemberPointer, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::MemberPointerType::getClass(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), and clang::Expr::NPC_ValueDependentIsNull.

Referenced by PerformImplicitConversion().

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

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

bool Sema::CheckMessageArgumentTypes ( QualType  ReceiverType,
MultiExprArg  Args,
Selector  Sel,
ArrayRef< SourceLocation SelectorLocs,
ObjCMethodDecl Method,
bool  isClassMessage,
bool  isSuperMessage,
SourceLocation  lbrac,
SourceLocation  rbrac,
SourceRange  RecRange,
QualType ReturnType,
ExprValueKind VK 
)

CheckMessageArgumentTypes - Check types in an Obj-C message send.

Parameters:
Method- May be null.
[out]ReturnType- The return type of the send.
Returns:
true iff there were any incompatible types.

Definition at line 1275 of file SemaExprObjC.cpp.

References checkUnknownAnyArg(), Context, clang::FixItHint::CreateReplacement(), DefaultArgumentPromotion(), DefaultVariadicArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::Selector::getAsString(), clang::SourceRange::getBegin(), clang::ObjCObjectPointerType::getInterfaceDecl(), getLangOpts(), getMessageSendResultType(), clang::Selector::getNumArgs(), clang::ASTContext::getObjCIdType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSourceRange(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceRange::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectPointerType(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_size(), clang::ObjCMethodDecl::parameters(), PerformCopyInitialization(), RequireCompleteType(), SelectorsForTypoCorrection(), clang::ValueDecl::setType(), stripARCUnbridgedCast(), clang::ASTContext::UnknownAnyTy, VariadicMethod, and clang::VK_RValue.

Referenced by BuildClassMessage(), and BuildInstanceMessage().

bool Sema::checkMSInheritanceAttrOnDefinition ( CXXRecordDecl RD,
SourceRange  Range,
bool  BestCase,
MSInheritanceAttr::Spelling  SemanticSpelling 
)
QualType Sema::CheckMultiplyDivideOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign,
bool  IsDivide 
)
void Sema::CheckObjCBridgeRelatedCast ( QualType  castType,
Expr castExpr 
)
bool Sema::checkObjCBridgeRelatedComponents ( SourceLocation  Loc,
QualType  DestType,
QualType  SrcType,
ObjCInterfaceDecl *&  RelatedClass,
ObjCMethodDecl *&  ClassMethod,
ObjCMethodDecl *&  InstanceMethod,
TypedefNameDecl *&  TDNDecl,
bool  CfToNs 
)
bool Sema::CheckObjCBridgeRelatedConversions ( SourceLocation  Loc,
QualType  DestType,
QualType  SrcType,
Expr *&  SrcExpr 
)

Checks that the Objective-C declaration is declared in the global scope. Emits an error and marks the declaration as invalid if it's not declared in the global scope.

Definition at line 3303 of file SemaDeclObjC.cpp.

References CurContext, Diag(), getCurLexicalContext(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), and clang::Decl::setInvalidDecl().

Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().

void Sema::CheckObjCMethodOverride ( ObjCMethodDecl NewMethod,
const ObjCMethodDecl Overridden 
)
void Sema::CheckObjCPropertyAttributes ( Decl PropertyPtrTy,
SourceLocation  Loc,
unsigned Attributes,
bool  propertyInPrimaryClass 
)
Sema::OverloadKind Sema::CheckOverload ( Scope S,
FunctionDecl New,
const LookupResult OldDecls,
NamedDecl *&  OldDecl,
bool  IsForUsingDecl 
)
TypeSourceInfo * Sema::CheckPackExpansion ( TypeSourceInfo Pattern,
SourceLocation  EllipsisLoc,
Optional< unsigned NumExpansions 
)
QualType Sema::CheckPackExpansion ( QualType  Pattern,
SourceRange  PatternRange,
SourceLocation  EllipsisLoc,
Optional< unsigned NumExpansions 
)

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

Definition at line 490 of file SemaTemplateVariadic.cpp.

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

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

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

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

Definition at line 510 of file SemaTemplateVariadic.cpp.

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

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

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

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.
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 543 of file SemaTemplateVariadic.cpp.

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

Referenced by instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and SubstBaseSpecifiers().

bool clang::Sema::CheckParamExceptionSpec ( const PartialDiagnostic NoteID,
const FunctionProtoType Target,
SourceLocation  TargetLoc,
const FunctionProtoType Source,
SourceLocation  SourceLoc 
)

CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs. This is part of the assignment and override compatibility check. We do not check the parameters of parameter function pointers recursively, as no sane programmer would even be able to write such a function type.

Definition at line 747 of file SemaExceptionSpec.cpp.

References clang::CheckSpecForTypesEquivalent(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), and PDiag().

Referenced by CheckExceptionSpecSubset().

bool Sema::CheckParmsForFunctionDef ( ParmVarDecl *const *  P,
ParmVarDecl *const *  PEnd,
bool  CheckParameterNames 
)

Helpers for dealing with blocks and functions.

CheckParmsForFunctionDef - Check that the parameters of the given function are appropriate for the definition of a function. This takes care of any checks that cannot be performed on the declaration itself, e.g., that the types of each of the function parameters are complete.

Definition at line 7364 of file SemaChecking.cpp.

References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::frontend::CPlusPlus, Diag(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ParmVarDecl::getOriginalType(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::DeclContext::isDependentContext(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), P, clang::Decl::setInvalidDecl(), and clang::ArrayType::Star.

Referenced by ActOnStartOfObjCMethodDef().

bool Sema::CheckPointerConversion ( Expr From,
QualType  ToType,
CastKind Kind,
CXXCastPath BasePath,
bool  IgnoreBaseAccess 
)
QualType Sema::CheckPointerToMemberOperands ( ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
SourceLocation  OpLoc,
bool  isIndirect 
)

Definition at line 1498 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 ( Expr receiver,
Expr argument 
)

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

Definition at line 7948 of file SemaChecking.cpp.

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

void Sema::checkRetainCycles ( VarDecl Var,
Expr Init 
)
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 5869 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::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 5943 of file SemaDecl.cpp.

References ForRedeclaration, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), 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  DiagnoseCFAudited = false 
)
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 6386 of file SemaTemplate.cpp.

References clang::frontend::CPlusPlus11, Diag(), DiagLocForExplicitInstantiation(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), getTemplateSpecializationKind(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), StripImplicitInstantiation(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by InstantiateClassMembers().

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.

Parameters:
[in,out]TThe exception type. This will be decayed to a pointer type when the input is an array or a function type.

Definition at line 71 of file SemaExceptionSpec.cpp.

References Context, Diag(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isVoidType(), and RequireCompleteType().

Referenced by checkExceptionSpecification().

void Sema::CheckStaticArrayArgument ( SourceLocation  CallLoc,
ParmVarDecl Param,
const Expr ArgExpr 
)

CheckStaticArrayArgument - If the given argument corresponds to a static array parameter, check that it is non-null, and that if it is formed by array-to-pointer decay, the underlying array is sufficiently large.

C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression.

Definition at line 4371 of file SemaExpr.cpp.

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

bool Sema::checkStringLiteralArgumentAttr ( const AttributeList Attr,
unsigned  ArgNum,
StringRef &  Str,
SourceLocation ArgLocation = nullptr 
)
QualType Sema::CheckSubtractionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
QualType CompLHSTy = nullptr 
)
bool Sema::CheckTemplateArgument ( NamedDecl Param,
TemplateArgumentLoc Arg,
NamedDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  RAngleLoc,
unsigned  ArgumentPackIndex,
SmallVectorImpl< TemplateArgument > &  Converted,
CheckTemplateArgumentKind  CTAK = CTAK_Specified 
)

Check that the given template argument corresponds to the given template parameter.

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

References clang::CXXScopeSpec::Adopt(), Context, clang::DependentScopeDeclRefExpr::Create(), clang::TemplateArgument::Declaration, Diag(), clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), clang::TemplateArgument::getKind(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TemplateArgument::Integral, clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgumentList::OnStack, clang::TemplateArgument::Pack, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by ConvertDeducedTemplateArgument().

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

References Context, Diag(), Finder, clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::hasUnnamedOrLocalType(), clang::Type::isVariablyModifiedType(), and clang::ASTContext::OverloadTy.

Check a template argument against its corresponding non-type template parameter.

This routine implements the semantics of C++ [temp.arg.nontype]. If an error occurred, it returns ExprError(); otherwise, it returns the converted template argument. InstantiatedParamType is the type of the non-type template parameter after it has been instantiated.

Definition at line 4748 of file SemaTemplate.cpp.

References CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::CK_IntegralCast, clang::CK_IntegralToBoolean, Context, clang::frontend::CPlusPlus11, Diag(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), isNullPointerValueTemplateArgument(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::Expr::isValueDependent(), NPV_Error, NPV_NotNullPointer, NPV_NullPointer, clang::ASTContext::OverloadTy, and S.

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

Check that the given template arguments can be be provided to the given template, converting the arguments along the way.

Check that the given template argument list is well-formed for specializing the given template.

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.
Returns:
true if an error occurred, false otherwise.

Definition at line 3641 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::TemplateParameterList::begin(), Context, clang::TemplateArgument::CreatePackCopy(), Diag(), diagnoseArityMismatch(), clang::TemplateParameterList::end(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::TemplateTemplateParmDecl::getDefaultArgument(), getExpandedPackSize(), clang::Decl::getLocation(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TemplateParameterList::getSourceRange(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateDecl::getTemplateParameters(), clang::TypeSourceInfo::getType(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateName::isNull(), clang::TemplateArgumentListInfo::size(), and SubstDefaultTemplateArgument().

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

Check whether a template can be declared within this scope.

If the template declaration is valid in this scope, returns false. Otherwise, issues a diagnostic and returns true.

Definition at line 5548 of file SemaTemplate.cpp.

References clang::Scope::DeclScope, Diag(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::TemplateParameterList::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclContext::isExternCContext(), clang::DeclContext::isFileContext(), and clang::Scope::TemplateParamScope.

QualType Sema::CheckTemplateIdType ( TemplateName  Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo TemplateArgs 
)

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 1255 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::isPackExpansion(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), and clang::TemplateTemplateParmDecl::setDefaultArgument().

Referenced by ActOnAliasDeclaration().

bool Sema::CheckTemplateTypeArgument ( TemplateTypeParmDecl Param,
TemplateArgumentLoc Arg,
SmallVectorImpl< TemplateArgument > &  Converted 
)

Check whether 'this' shows up in the attributes of the given static member function.

Returns:
true if an error occurred.

Definition at line 13319 of file SemaDeclCXX.cpp.

References clang::Decl::attrs(), and Finder.

Referenced by checkThisInStaticMemberFunctionType().

void Sema::CheckTollFreeBridgeCast ( QualType  castType,
Expr castExpr 
)
bool Sema::CheckTollFreeBridgeStaticCast ( QualType  castType,
Expr castExpr,
CastKind Kind 
)

Check the constraints on expression operands to unary type expression and type traits.

Completes any types necessary and validates the constraints on the operand expression. The logic mostly mirrors the type-based overload, but may modify the expression as it completes the type for that expression through template instantiation, etc.

Definition at line 3412 of file SemaExpr.cpp.

References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), Context, Diag(), clang::ASTContext::getBaseElementType(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::UETT_AlignOf, clang::UETT_SizeOf, clang::UETT_VecStep, and warnOnSizeofOnArrayDecay().

Referenced by CheckAlignOfExpr().

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

References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), Context, Diag(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Type::getPointeeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::UETT_AlignOf, and clang::UETT_VecStep.

ExprResult Sema::checkUnknownAnyArg ( SourceLocation  callLoc,
Expr result,
QualType paramType 
)
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 13434 of file SemaExpr.cpp.

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

checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.

Definition at line 8014 of file SemaChecking.cpp.

References checkUnsafeAssignObject(), clang::QualType::getObjCLifetime(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.

void Sema::checkUnsafeExprAssigns ( SourceLocation  Loc,
Expr LHS,
Expr RHS 
)

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

References clang::DeclSpec::getAttributes(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::ParsedAttributes::getList(), clang::Declarator::getNumTypeObjects(), and clang::Declarator::getTypeObject().

Referenced by ActOnTypeName().

bool Sema::CheckUsingDeclQualifier ( SourceLocation  UsingLoc,
const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
SourceLocation  NameLoc 
)
bool Sema::CheckUsingDeclRedeclaration ( SourceLocation  UsingLoc,
bool  HasTypenameKeyword,
const CXXScopeSpec SS,
SourceLocation  NameLoc,
const LookupResult Prev 
)

Checks that the given using declaration is not an invalid redeclaration. Note that this is checking only for the using decl itself, not for any ill-formedness among the UsingShadowDecls.

Definition at line 8091 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().

bool Sema::CheckUsingShadowDecl ( UsingDecl Using,
NamedDecl Orig,
const LookupResult Previous,
UsingShadowDecl *&  PrevShadow 
)

Perform semantic checking on a newly-created variable declaration.

This routine performs all of the type-checking required for a variable declaration once it has been built. It is used both to check variables after they have been parsed and their declarators have been translated into a declaration, and to check variables that have been instantiated from a template.

Sets NewVD->isInvalidDecl() if an error was encountered.

Returns true if the variable declaration is a redeclaration.

Definition at line 6219 of file SemaDecl.cpp.

References checkForConflictWithNonVisibleExternC(), Context, clang::LookupResult::empty(), filterNonConflictingPreviousDecls(), clang::Decl::isInvalidDecl(), and clang::LookupResult::setShadowed().

Referenced by BuildVariableInstantiation().

void Sema::checkVariadicArgument ( const Expr E,
VariadicCallType  CT 
)

Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.

Definition at line 814 of file SemaExpr.cpp.

References Diag(), clang::Stmt::getLocStart(), clang::Expr::getType(), clang::Type::isObjCObjectType(), and clang::Type::isRecordType().

DeclResult Sema::CheckVarTemplateId ( VarTemplateDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  TemplateNameLoc,
const TemplateArgumentListInfo TemplateArgs 
)
ExprResult Sema::CheckVarTemplateId ( const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
VarTemplateDecl Template,
SourceLocation  TemplateLoc,
const TemplateArgumentListInfo TemplateArgs 
)
bool Sema::CheckVectorCast ( SourceRange  R,
QualType  VectorTy,
QualType  Ty,
CastKind Kind 
)
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 8272 of file SemaExpr.cpp.

References clang::VectorType::AltiVecVector, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ASTContext::getLogicalOperationType(), clang::Expr::getType(), clang::VectorType::getVectorKind(), clang::Type::hasFloatingRepresentation(), clang::Expr::IgnoreParenImpCasts(), and clang::QualType::isNull().

QualType Sema::CheckVectorOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign 
)
Sema::NameClassification Sema::ClassifyName ( Scope S,
CXXScopeSpec SS,
IdentifierInfo *&  Name,
SourceLocation  NameLoc,
const Token NextToken,
bool  IsAddressOfOperand,
std::unique_ptr< CorrectionCandidateCallback CCC = nullptr 
)

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

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

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.
IsAddressOfOperandTrue if this name is the operand of a unary address of ('&') expression, assuming it is classified as an expression.
CCCThe correction callback, if typo correction is desired.

Definition at line 691 of file SemaDecl.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::Ambiguous, clang::LookupResult::begin(), buildNestedType(), clang::LookupResult::clear(), Context, clang::frontend::CPlusPlus, clang::LookupResult::empty(), clang::LookupResult::end(), clang::diag::Error, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::Token::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::IdentifierInfo::getName(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getOverloadedTemplateName(), clang::ASTContext::getQualifiedTemplateName(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), clang::Token::is(), clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::Decl::isFunctionOrFunctionTemplate(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), isResultTypeOrTemplate(), clang::CXXScopeSpec::isSet(), isTagTypeWithMissingTag(), clang::OpaquePtr< QualType >::make(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, recoverFromTypeInKnownDependentBase(), clang::LookupResult::resolveKind(), S, clang::LookupResult::setLookupName(), clang::LookupResult::suppressDiagnostics(), and Unknown.

Clears the state of the given TypoExpr.

Definition at line 4600 of file SemaLookup.cpp.

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

Definition at line 4015 of file SemaCodeComplete.cpp.

void Sema::CodeCompleteCall ( Scope S,
Expr Fn,
ArrayRef< Expr * >  Args 
)
void Sema::CodeCompleteConstructorInitializer ( Decl Constructor,
ArrayRef< CXXCtorInitializer * >  Initializers 
)
void Sema::CodeCompleteDeclSpec ( Scope S,
DeclSpec DS,
bool  AllowNonIdentifiers,
bool  AllowNestedNameSpecifiers 
)
void Sema::CodeCompleteInitializer ( Scope S,
Decl D 
)

Definition at line 3929 of file SemaCodeComplete.cpp.

References clang::ValueDecl::getType().

void Sema::CodeCompleteLambdaIntroducer ( Scope S,
LambdaIntroducer Intro,
bool  AfterAmpersand 
)
void Sema::CodeCompleteMemberReferenceExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
bool  IsArrow 
)
void Sema::CodeCompleteObjCClassMessage ( Scope S,
ParsedType  Receiver,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression,
bool  IsSuper = false 
)
void Sema::CodeCompleteObjCForCollection ( Scope S,
DeclGroupPtrTy  IterationVar 
)
void Sema::CodeCompleteObjCImplementationCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCInstanceMessage ( Scope S,
Expr Receiver,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression,
ObjCInterfaceDecl Super = nullptr 
)
void Sema::CodeCompleteObjCInterfaceCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCMethodDecl ( Scope S,
bool  IsInstanceMethod,
ParsedType  ReturnType 
)
void Sema::CodeCompleteObjCMethodDeclSelector ( Scope S,
bool  IsInstanceMethod,
bool  AtParameterName,
ParsedType  ReturnType,
ArrayRef< IdentifierInfo * >  SelIdents 
)
void Sema::CodeCompleteObjCPassingType ( Scope S,
ObjCDeclSpec DS,
bool  IsParameter 
)
void Sema::CodeCompleteObjCProtocolReferences ( IdentifierLocPair Protocols,
unsigned  NumProtocols 
)
void Sema::CodeCompleteObjCSelector ( Scope S,
ArrayRef< IdentifierInfo * >  SelIdents 
)
void Sema::CodeCompleteObjCSuperclass ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)
void Sema::CodeCompleteObjCSuperMessage ( Scope S,
SourceLocation  SuperLoc,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression 
)
void Sema::CodeCompleteOrdinaryName ( Scope S,
ParserCompletionContext  CompletionContext 
)
void Sema::CodeCompletePreprocessorMacroArgument ( Scope S,
IdentifierInfo Macro,
MacroInfo MacroInfo,
unsigned  Argument 
)

Definition at line 7244 of file SemaCodeComplete.cpp.

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

Definition at line 3939 of file SemaCodeComplete.cpp.

References clang::QualType::isNull().

void Sema::CodeCompleteTag ( Scope S,
unsigned  TagSpec 
)
void Sema::CollectIvarsToConstructOrDestruct ( ObjCInterfaceDecl OI,
SmallVectorImpl< ObjCIvarDecl * > &  Ivars 
)

CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.

Definition at line 3459 of file SemaDeclObjC.cpp.

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

Referenced by SetIvarInitializers().

bool Sema::CollectMultipleMethodsInGlobalPool ( Selector  Sel,
SmallVectorImpl< ObjCMethodDecl * > &  Methods,
bool  instance 
)

  • Returns instance or factory methods in global method pool for given selector. If no such method or only one method found, function returns false; otherwise, it returns true

Definition at line 2323 of file SemaDeclObjC.cpp.

References clang::ObjCMethodList::getNext(), MethodPool, and ReadMethodPool().

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

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

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

Definition at line 378 of file SemaTemplateVariadic.cpp.

Referenced by checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), collectUnexpandedParameterPacks(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), PackDeductionScope::PackDeductionScope(), and SubstBaseSpecifiers().

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 384 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 390 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 395 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 400 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 411 of file SemaTemplateVariadic.cpp.

Sema::ReferenceCompareResult Sema::CompareReferenceRelationship ( SourceLocation  Loc,
QualType  OrigT1,
QualType  OrigT2,
bool DerivedToBase,
bool ObjCConversion,
bool ObjCLifetimeConversion 
)
bool Sema::CompleteConstructorCall ( CXXConstructorDecl Constructor,
MultiExprArg  ArgsPtr,
SourceLocation  Loc,
SmallVectorImpl< Expr * > &  ConvertedArgs,
bool  AllowExplicit = false,
bool  IsListInitialization = false 
)

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

Returns:
true if an error occurred, false otherwise.

Definition at line 11198 of file SemaDeclCXX.cpp.

References DiagnoseSentinelCalls(), GatherArgumentsForCall(), clang::Type::getAs(), clang::FunctionProtoType::getNumParams(), clang::ValueDecl::getType(), clang::FunctionProtoType::isVariadic(), VariadicConstructor, and VariadicDoesNotApply.

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

Instantiates a variable template specialization by completing it with appropriate type information and initializer.

Definition at line 3518 of file SemaTemplateInstantiateDecl.cpp.

References clang::NamedDecl::getDeclName(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), InstantiateVariableInitializer(), clang::ValueDecl::setType(), and SubstType().

Referenced by InstantiateVariableDefinition().

DeclContext * Sema::computeDeclContext ( 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 76 of file SemaCXXScopeSpec.cpp.

References Context, clang::Type::getAs(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::ASTContext::getCanonicalType(), getCurrentInstantiationOf(), clang::TagType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::NamespaceAliasDecl::getNamespace(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTranslationUnitDecl(), clang::NestedNameSpecifier::Global, clang::ASTContext::hasSameType(), clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, Record, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

void Sema::computeNRVO ( Stmt Body,
sema::FunctionScopeInfo Scope 
)

Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.

Each of the variables that is subject to the named return value optimization will be marked as NRVO variables in the AST, and any return statement that has a marked NRVO variable as its NRVO candidate can use the named return value optimization.

This function applies a very simplistic algorithm for NRVO: if every return statement in the scope of a variable has the same NRVO candidate, that candidate is an NRVO variable.

Definition at line 10345 of file SemaDecl.cpp.

References clang::sema::FunctionScopeInfo::Returns.

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 704 of file SemaTemplateVariadic.cpp.

References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::NestedNameSpecifier::containsUnexpandedParameterPack(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::Declarator::getDeclSpec(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecType(), clang::Declarator::getNumTypeObjects(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::CXXScopeSpec::getScopeRep(), clang::DeclaratorChunk::FunctionTypeInfo::getTrailingReturnType(), clang::ValueDecl::getType(), clang::Declarator::getTypeObject(), clang::DeclSpec::getTypeSpecType(), clang::DeclaratorChunk::FunctionTypeInfo::hasTrailingReturnType(), clang::QualType::isNull(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Mem, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::FunctionTypeInfo::NoexceptExpr, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, clang::DeclaratorChunk::FunctionTypeInfo::NumExceptions, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::DeclaratorChunk::MemberPointerTypeInfo::Scope(), 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_decltype_auto, clang::TST_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_half, clang::TST_int, clang::TST_int128, clang::TST_interface, clang::TST_struct, clang::TST_typename, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_underlyingType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, clang::TST_wchar, and clang::DeclaratorChunk::TypeAndRange::Ty.

bool Sema::ConvertArgumentsForCall ( CallExpr Call,
Expr Fn,
FunctionDecl FDecl,
const FunctionProtoType Proto,
ArrayRef< Expr * >  Args,
SourceLocation  RParenLoc,
bool  IsExecConfig = false 
)

ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto. Call is the call expression itself, and Fn is the function expression. For a C++ member function, this routine does not attempt to convert the object argument. Returns true if the call is ill-formed.

Definition at line 4135 of file SemaExpr.cpp.

References clang::ASTContext::BuiltinInfo, Context, Diag(), clang::FunctionDecl::getBuiltinID(), clang::TypoCorrection::getCorrectionRange(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getLocStart(), clang::CallExpr::getLocStart(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Builtin::Context::hasCustomTypechecking(), clang::Type::isBlockPointerType(), clang::FunctionProtoType::isVariadic(), clang::CallExpr::setArg(), clang::CallExpr::setNumArgs(), and TryTypoCorrectionForCall().

Referenced by BuildCallToMemberFunction().

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

Definition at line 54 of file SemaDecl.cpp.

References Context, and clang::DeclGroupRef::Create().

void clang::Sema::ConvertIntegerToTypeWarnOnOverflow ( llvm::APSInt &  OldVal,
unsigned  NewWidth,
bool  NewSign,
SourceLocation  Loc,
unsigned  DiagID 
)

ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign. If an overflow occurs, detect it and emit the specified diagnostic.

Referenced by ActOnFinishFullExpr().

Definition at line 2727 of file Sema.h.

TypoCorrection Sema::CorrectTypo ( const DeclarationNameInfo TypoName,
Sema::LookupNameKind  LookupKind,
Scope S,
CXXScopeSpec SS,
std::unique_ptr< CorrectionCandidateCallback CCC,
CorrectTypoKind  Mode,
DeclContext MemberContext = nullptr,
bool  EnteringContext = false,
const ObjCObjectPointerType OPT = nullptr,
bool  RecordFailure = true 
)

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

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 4200 of file SemaLookup.cpp.

References checkCorrectionVisibility(), Consumer, clang::ExternalSemaSource::CorrectTypo(), CTK_ErrorRecovery, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationName::getAsString(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getEditDistance(), clang::DeclarationNameInfo::getLoc(), clang::IdentifierInfo::getName(), clang::DeclarationNameInfo::getName(), isCandidateViable(), clang::TypoCorrection::isKeyword(), clang::TypoCorrection::setCorrectionRange(), Typo, and UnqualifiedTyposCorrected.

Referenced by ActOnOpenMPIdExpression(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnStartClassInterface(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), DiagnoseInvalidRedeclaration(), FindProtocolDeclaration(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), TryNamespaceTypoCorrection(), and TryTypoCorrectionForCall().

TypoExpr * Sema::CorrectTypoDelayed ( const DeclarationNameInfo TypoName,
Sema::LookupNameKind  LookupKind,
Scope S,
CXXScopeSpec SS,
std::unique_ptr< CorrectionCandidateCallback CCC,
TypoDiagnosticGenerator  TDG,
TypoRecoveryCallback  TRC,
CorrectTypoKind  Mode,
DeclContext MemberContext = nullptr,
bool  EnteringContext = false,
const ObjCObjectPointerType OPT = nullptr 
)

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

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.
TDGA TypoDiagnosticGenerator functor that will be used to print diagnostics when the actual typo correction is attempted.
TRCA TypoRecoveryCallback functor that will be used to build an Expr from a typo correction candidate.
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 new TypoExpr that will later be replaced in the AST with an Expr representing the result of performing typo correction, or nullptr if typo correction is not possible. If nullptr is returned, no diagnostics will be emitted and it is the responsibility of the caller to emit any that are needed.

Definition at line 4352 of file SemaLookup.cpp.

References Consumer, CTK_ErrorRecovery, ExprEvalContexts, clang::DeclarationName::getAsIdentifierInfo(), getLangOpts(), clang::IdentifierInfo::getName(), and clang::DeclarationNameInfo::getName().

Referenced by LookupMemberExprInRecord().

ExprResult Sema::CreateBuiltinBinOp ( SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHSExpr,
Expr RHSExpr 
)

CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc. This routine only supports built-in operations; ActOnBinOp handles overloaded operators.

Definition at line 9324 of file SemaExpr.cpp.

References clang::BO_Add, clang::BO_AddAssign, clang::BO_And, clang::BO_AndAssign, clang::BO_Assign, clang::BO_Comma, clang::BO_Div, clang::BO_DivAssign, clang::BO_EQ, clang::BO_GE, clang::BO_GT, clang::BO_LAnd, clang::BO_LE, clang::BO_LOr, clang::BO_LT, clang::BO_Mul, clang::BO_MulAssign, clang::BO_NE, clang::BO_Or, clang::BO_OrAssign, clang::BO_PtrMemD, clang::BO_PtrMemI, clang::BO_Rem, clang::BO_RemAssign, clang::BO_Shl, clang::BO_ShlAssign, clang::BO_Shr, clang::BO_ShrAssign, clang::BO_Sub, clang::BO_SubAssign, clang::BO_Xor, clang::BO_XorAssign, CheckCommaOperands(), checkObjCPointerIntrospection(), Context, clang::frontend::CPlusPlus, clang::frontend::CPlusPlus11, clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), DiagnoseDirectIsaAccess(), DiagnoseSelfAssignment(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Expr::getExprLoc(), clang::Stmt::getLocStart(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::InitializedEntity::InitializeTemporary(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::OK_ObjCProperty, clang::OK_Ordinary, clang::VK_LValue, and clang::VK_RValue.

Referenced by buildSingleCopyAssignRecursively(), and CreateOverloadedBinOp().

Definition at line 9815 of file SemaExpr.cpp.

References clang::ASTContext::BoolTy, CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckRealImagOperand(), clang::CK_FloatingCast, Context, clang::frontend::CPlusPlus, Diag(), clang::ExprError(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), getElementType(), clang::ASTContext::getLangOpts(), clang::ASTContext::getLogicalOperationType(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Type::hasIntegerRepresentation(), Input, clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::Type::isDependentType(), clang::Type::isExtVectorType(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isScalarType(), isScopedEnumerationType(), clang::Type::isVectorType(), clang::OK_Ordinary, clang::UO_AddrOf, clang::UO_Deref, clang::UO_Extension, clang::UO_Imag, clang::UO_LNot, clang::UO_Minus, clang::UO_Not, clang::UO_Plus, clang::UO_PostDec, clang::UO_PostInc, clang::UO_PreDec, clang::UO_PreInc, clang::UO_Real, and clang::VK_RValue.

Referenced by BuildEmptyCXXFoldExpr(), CreateOverloadedUnaryOp(), DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), and DefineImplicitMoveAssignment().

ExprResult Sema::CreateGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
Expr ControllingExpr,
ArrayRef< TypeSourceInfo * >  Types,
ArrayRef< Expr * >  Exprs 
)

Create an implicit import of the given module at the given source location, for error recovery, if possible.

This routine is typically used when an entity found by name lookup is actually hidden within a module that we know about but the user has forgotten to import.

Definition at line 13804 of file SemaDecl.cpp.

References clang::DeclContext::addDecl(), clang::Module::AllVisible, Consumer, clang::ImportDecl::CreateImplicit(), getASTContext(), getLangOpts(), getModuleLoader(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTConsumer::HandleImplicitImportDecl(), isSFINAEContext(), and clang::ModuleLoader::makeModuleVisible().

Referenced by diagnoseTypo().

CXXRecordDecl * Sema::createLambdaClosureType ( SourceRange  IntroducerRange,
TypeSourceInfo Info,
bool  KnownDependent,
LambdaCaptureDefault  CaptureDefault 
)
VarDecl * Sema::createLambdaInitCaptureVarDecl ( SourceLocation  Loc,
QualType  InitCaptureType,
IdentifierInfo Id,
Expr Init 
)

Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.

CodeGen handles emission of lambda captures, ignoring these dummy variables appropriately.

Definition at line 800 of file SemaLambda.cpp.

References Context, clang::VarDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Decl::markUsed(), clang::SC_Auto, clang::VarDecl::setInit(), clang::VarDecl::setInitCapture(), and clang::Decl::setReferenced().

Definition at line 11252 of file SemaOverload.cpp.

References AA_Passing, AddBuiltinOperatorCandidates(), AddMemberOperatorCandidates(), clang::CodeGen::Base, clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::UnresolvedLookupExpr::Create(), CreateBuiltinArraySubscriptExpr(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), clang::OverloadCandidateSet::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::OverloadCandidateSet::size(), and clang::VK_RValue.

ExprResult Sema::CreateOverloadedBinOp ( SourceLocation  OpLoc,
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.
FnsThe 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 10984 of file SemaOverload.cpp.

References AA_Passing, AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddFunctionCandidates(), AddMemberOperatorCandidates(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::BO_Assign, clang::BO_Comma, clang::BO_OrAssign, clang::BO_PtrMemD, CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::UnresolvedLookupExpr::Create(), CreateBuiltinBinOp(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::FPOptions::fp_contract, FPFeatures, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getRecordType(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::FunctionDecl::getSourceRange(), getSpecialMember(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), isImplicitlyDeleted(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), IsOverloaded(), isRecordType(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), NoteDeletedFunction(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OK_ObjCProperty, clang::OK_Ordinary, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::OverloadCandidateSet::size(), VariadicDoesNotApply, clang::VK_LValue, and clang::VK_RValue.

Referenced by BuildOverloadedBinOp().

ExprResult 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.
FnsThe 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 10796 of file SemaOverload.cpp.

References AA_Passing, AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddFunctionCandidates(), AddMemberOperatorCandidates(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::IntegerLiteral::Create(), clang::UnresolvedLookupExpr::Create(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameTable::getCXXOperatorName(), getDeletedOrUnavailableSuffix(), clang::QualType::getNonLValueExprType(), clang::UnaryOperator::getOpcodeStr(), clang::UnaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), Input, clang::ASTContext::IntTy, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), IsOverloaded(), clang::Expr::isTypeDependent(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OK_Ordinary, clang::OO_None, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PerformCopyInitialization(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), clang::OverloadCandidateSet::size(), clang::UO_PostDec, clang::UO_PostInc, and clang::VK_RValue.

ObjCPropertyDecl * Sema::CreatePropertyDecl ( Scope S,
ObjCContainerDecl CDecl,
SourceLocation  AtLoc,
SourceLocation  LParenLoc,
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 = nullptr 
)

Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface.

Definition at line 520 of file SemaObjCProperty.cpp.

References clang::DeclContext::addDecl(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), Context, clang::ObjCPropertyDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FieldDeclarator::D, Diag(), clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_getter, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_setter, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::ObjCPropertyDecl::findPropertyDecl(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::TypeLoc::getLocEnd(), getLocForEndOfToken(), clang::TypeLoc::getLocStart(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::Idents, clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isObjCObjectType(), 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().

Build a sizeof or alignof expression given a type operand.

Definition at line 3615 of file SemaExpr.cpp.

References Context, clang::ExprError(), clang::SourceRange::getEnd(), clang::ASTContext::getSizeType(), clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().

Check the operands of ?: under C++ semantics.

See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y extension. In this case, LHS == Cond. (But they're not aliases.)

Definition at line 4365 of file SemaExprCXX.cpp.

References CheckCXXBooleanCondition(), CheckVectorOperands(), clang::CK_NoOp, Context, ConvertForConditional(), DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseConditionalForNull(), FindCompositeObjCPointerType(), FindCompositePointerType(), FindConditionalOverload(), clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getCanonicalType(), clang::QualType::getCVRQualifiers(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Type::isRecordType(), isSFINAEContext(), clang::Qualifiers::isStrictSupersetOf(), clang::Expr::isTypeDependent(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::OK_BitField, clang::OK_Ordinary, PerformCopyInitialization(), PrepareScalarCast(), RequireNonAbstractType(), TryClassUnification(), UsualArithmeticConversions(), clang::VK_RValue, and clang::ASTContext::VoidTy.

void Sema::DeclApplyPragmaWeak ( Scope S,
NamedDecl ND,
WeakInfo W 
)
void Sema::DeclareGlobalAllocationFunction ( DeclarationName  Name,
QualType  Return,
QualType  Param1,
QualType  Param2 = QualType(),
bool  AddMallocAttr = false 
)

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++11:
   void* operator new(std::size_t);
   void* operator new[](std::size_t);
   void operator delete(void *) noexcept;
   void operator delete[](void *) noexcept;
   // C++1y:
   void* operator new(std::size_t);
   void* operator new[](std::size_t);
   void operator delete(void *) noexcept;
   void operator delete[](void *) noexcept;
   void operator delete(void *, std::size_t) noexcept;
   void operator delete[](void *, std::size_t) noexcept;

Note that the placement and nothrow forms of new are *not* implicitly declared. Their use requires including <new>.

Definition at line 1956 of file SemaExprCXX.cpp.

References Context, clang::frontend::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::ASTContext::DeclarationNames, DeclareGlobalAllocationFunction(), clang::IdentifierTable::get(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Preprocessor::getIdentifierTable(), getLangOpts(), getOrCreateStdNamespace(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), getStdBadAlloc(), GlobalNewDeleteDeclared, PP, clang::Decl::setImplicit(), StdBadAlloc, clang::TTK_Class, and clang::ASTContext::VoidTy.

Referenced by FindAllocationFunctions(), and FindUsualDeallocationFunction().

Declare the implicit copy assignment operator for the given class.

Parameters:
ClassDeclThe class declaration into which the implicit copy assignment operator will be added.
Returns:
The implicitly-declared copy assignment operator.

Definition at line 9787 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), AddOverriddenMethods(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXMethodDecl::Create(), CXXCopyAssignment, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::QualType::withConst().

Referenced by AddImplicitlyDeclaredMembersToClass(), and DeclareImplicitMemberFunctionsWithName().

Declare the implicit copy constructor for the given class.

Parameters:
ClassDeclThe class declaration into which the implicit copy constructor will be added.
Returns:
The implicitly-declared copy constructor.

Definition at line 10607 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXConstructorDecl::Create(), CXXCopyConstructor, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::ASTContext::NumImplicitCopyConstructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), clang::ASTContext::VoidTy, and clang::QualType::withConst().

Referenced by AddImplicitlyDeclaredMembersToClass(), and DeclareImplicitMemberFunctionsWithName().

Declare the implicit move assignment operator for the given class.

Parameters:
ClassDeclThe Class declaration into which the implicit move assignment operator will be added.
Returns:
The implicitly-declared move assignment operator, or NULL if it wasn't declared.

Definition at line 10180 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), AddOverriddenMethods(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXMethodDecl::Create(), CXXMoveAssignment, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::CXXRecordDecl::setImplicitMoveAssignmentIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), and SpecialMemberIsTrivial().

Referenced by AddImplicitlyDeclaredMembersToClass(), and DeclareImplicitMemberFunctionsWithName().

Declare the implicit move constructor for the given class.

Parameters:
ClassDeclThe Class declaration into which the implicit move constructor will be added.
Returns:
The implicitly-declared move constructor, or NULL if it wasn't declared.

Definition at line 10790 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, clang::ParmVarDecl::Create(), clang::CXXConstructorDecl::Create(), CXXMoveConstructor, clang::ASTContext::DeclarationNames, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::ASTContext::getFunctionType(), getImplicitMethodEPI(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::ASTContext::NumImplicitMoveConstructorsDeclared, PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::CXXRecordDecl::setImplicitMoveConstructorIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::ASTContext::VoidTy.

Referenced by AddImplicitlyDeclaredMembersToClass(), and DeclareImplicitMemberFunctionsWithName().

Declare all inheriting constructors for the given class.

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

Definition at line 9076 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::bases(), and clang::DeclContext::isDependentContext().

Referenced by CheckCompletedCXXClass().

DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition decl and source may not have one.

Definition at line 4786 of file SemaDeclAttr.cpp.

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

Referenced by DeclApplyPragmaWeak().

void Sema::DecomposeUnqualifiedId ( const UnqualifiedId Id,
TemplateArgumentListInfo Buffer,
DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo *&  TemplateArgs 
)

Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments.

If this produces template arguments, it is permitted to call DecomposeTemplateName.

This actually loses a lot of source location information for non-standard name kinds; we should consider preserving that in some way.

Definition at line 1654 of file SemaExpr.cpp.

References Context, clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getKind(), clang::ASTContext::getNameForTemplate(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::UnqualifiedId::IK_TemplateId, clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.

Sema::DeduceAutoResult Sema::DeduceAutoType ( TypeSourceInfo AutoType,
Expr *&  Initializer,
QualType Result 
)
Sema::DeduceAutoResult Sema::DeduceAutoType ( TypeLoc  Type,
Expr *&  Init,
QualType Result 
)
bool Sema::DeduceFunctionTypeFromReturnExpr ( FunctionDecl FD,
SourceLocation  ReturnLoc,
Expr *&  RetExpr,
AutoType AT 
)
bool Sema::DeduceReturnType ( FunctionDecl FD,
SourceLocation  Loc,
bool  Diagnose = true 
)

Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match]. TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type.

Definition at line 2434 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments(), FinishTemplateArgumentDeduction(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplatePartialSpecializationDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::TemplateParameterList::size(), TDK_SubstitutionFailure, and Unevaluated.

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
ArrayRef< Expr * >  Args,
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.
ExplicitTemplateArgsthe explicit template arguments provided for this call.
Argsthe function call 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 3295 of file SemaTemplateDeduction.cpp.

References AdjustFunctionParmAndArgTypesForDeduction(), DeduceTemplateArgumentByListElement(), DeduceTemplateArgumentsByTypeMatch(), PackDeductionScope::finish(), FinishTemplateArgumentDeduction(), clang::Type::getAs(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::PackExpansionType::getPattern(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::Expr::getType(), clang::ValueDecl::getType(), hasDeducibleTemplateParameters(), clang::Decl::isInvalidDecl(), clang::FunctionProtoType::isTemplateVariadic(), clang::FunctionProtoType::isVariadic(), PackDeductionScope::nextPackElement(), clang::TemplateParameterList::size(), and X.

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

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

Parameters:
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgsthe 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 3541 of file SemaTemplateDeduction.cpp.

References Context, DeduceTemplateArgumentsByTypeMatch(), clang::ASTContext::DependentTy, FinishTemplateArgumentDeduction(), clang::ASTContext::getCanonicalType(), clang::Type::getContainedAutoType(), clang::sema::TemplateDeductionInfo::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Type::isUndeducedType(), clang::TemplateParameterList::size(), clang::TDF_InOverloadResolution, clang::TDF_TopLevelParameterTypeList, and Unevaluated.

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info,
bool  InOverloadResolution = false 
)

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

Parameters:
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgsthe 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 3893 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments().

void Sema::DefaultSynthesizeProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCInterfaceDecl IDecl 
)
void Sema::DefaultSynthesizeProperties ( Scope S,
Decl D 
)
void Sema::DefineImplicitCopyAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared copy assignment operator.

Definition at line 9912 of file SemaDeclCXX.cpp.

References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), clang::frontend::CPlusPlus11, CreateBuiltinUnaryOp(), CXXCopyAssignment, Diag(), diagnoseDeprecatedCopyOperation(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), getCurrentThisType(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isImplicit(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::FieldDecl::isUnnamedBitfield(), clang::SourceLocation::isValid(), LookupMemberName, clang::Decl::markUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, and clang::VK_LValue.

Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().

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

Define the "body" of the conversion from a lambda object to a block pointer.

This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.

Definition at line 10984 of file SemaDeclCXX.cpp.

References ActOnCXXThis(), BuildBlockForLambdaConversion(), BuildReturnStmt(), clang::CK_CopyAndAutoreleaseBlockObject, clang::ImplicitCastExpr::Create(), CreateBuiltinUnaryOp(), Diag(), Diags, clang::ActionResult< PtrTy, CompressInvalid >::get(), getASTMutationListener(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::CXXRecordDecl::isGenericLambda(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::markUsed(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, and clang::VK_RValue.

Referenced by MarkFunctionReferenced().

void Sema::DefineImplicitMoveAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared move assignment operator.

Definition at line 10337 of file SemaDeclCXX.cpp.

References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), checkMoveAssignmentForRepeatedMove(), CreateBuiltinUnaryOp(), CXXMoveAssignment, Diag(), Diags, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), clang::FieldDecl::getBitWidthValue(), getCurrentThisType(), clang::ASTContext::getCVRQualifiedType(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::CXXMethodDecl::getTypeQualifiers(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::RecordDecl::hasFlexibleArrayMember(), clang::FieldDecl::isBitField(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::FieldDecl::isUnnamedBitfield(), clang::SourceLocation::isValid(), LookupMemberName, clang::Decl::markUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::UO_Deref, clang::VK_LValue, and clang::VK_XValue.

Referenced by MarkFunctionReferenced(), and SetDeclDefaulted().

void Sema::DefineImplicitMoveConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)

Emit a diagnostic.

Definition at line 1033 of file Sema.h.

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

Referenced by ActOnAliasDeclaration(), ActOnAtEnd(), ActOnBaseSpecifier(), ActOnClassPropertyRefExpr(), ActOnComment(), ActOnCompatibilityAlias(), ActOnConversionDeclarator(), ActOnCUDAExecConfigExpr(), ActOnCXXConditionDeclaration(), ActOnCXXDelete(), ActOnCXXFoldExpr(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFinishCXXMemberSpecification(), ActOnForwardClassDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnNamespaceAliasDef(), ActOnObjCExceptionDecl(), ActOnOpenMPAlignedClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPDefaultClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPIdExpression(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReductionClause(), ActOnOpenMPScheduleClause(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSharedClause(), ActOnOpenMPTargetDirective(), ActOnPackExpansion(), ActOnParamDefaultArgument(), ActOnPragmaMSSeg(), ActOnPragmaMSVtorDisp(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaUnused(), ActOnPragmaVisibility(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartOfSwitchStmt(), ActOnStartProtocolInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnTemplatedFriendTag(), ActOnUsingDeclaration(), ActOnUsingDirective(), AddAlignedAttr(), AddAlignValueAttr(), AddAssumeAlignedAttr(), applyCocoaAPICheck(), AtomicPropertySetterGetterRules(), AttachBaseSpecifiers(), attrNonNullArgCheck(), BuildArrayType(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockPointerType(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXDefaultInitExpr(), BuildCXXMemberCallExpr(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXTypeConstructExpr(), BuildDelegatingInitializer(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExtVectorType(), BuildFloatingLiteral(), BuildForRangeBeginEndCall(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildMemberPointerType(), BuildMemInitializer(), BuildNonArrayForRange(), BuildObjCBridgedCast(), BuildObjCExceptionDecl(), BuildOverloadedArrowExpr(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildQualifiedType(), BuildReferenceType(), BuildStaticAssertDeclaration(), BuildUnaryTransformType(), BuildUsingDeclaration(), captureInBlock(), captureInLambda(), checkAcquireOrderAttrCommon(), CheckAlignasUnderalignment(), CheckAlignOfExpr(), CheckAllocatedType(), CheckAnonMemberRedeclaration(), CheckARCMethodDecl(), checkARCPropertyDecl(), checkARCPropertyImpl(), checkArgCount(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), CheckArrayDesignatorExpr(), CheckArrow(), CheckAsmLValue(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), checkAvailabilityAttr(), CheckBaseSpecifier(), CheckBooleanCondition(), CheckCallingConvAttr(), CheckCallReturnType(), checkCaseValue(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalConvertScalarsToVectors(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConditionVariable(), CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConstexprFunctionDecl(), CheckConstexprFunctionStmt(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), CheckCXX98CompatAccessibleCopy(), CheckCXXDefaultArguments(), CheckCXXThisCapture(), CheckDeclInExpr(), CheckDerivedToBaseConversion(), CheckDestructorDeclarator(), checkDLLAttribute(), checkDLLAttributeRedeclaration(), checkDuplicateDefaultInit(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedSpecialMember(), CheckExtensionTraitOperandType(), CheckExtraCXXDefaultArguments(), CheckExtVectorComponent(), CheckFallThroughForBody(), CheckFoldOperand(), checkForConsumableClass(), CheckForDanglingReferenceOrPointer(), CheckForDuplicateEnumValues(), CheckForIncompatibleAttributes(), CheckForModifiableLvalue(), CheckForReference(), CheckForwardProtocolDeclarationForCircularDependency(), CheckFriendTypeDecl(), checkFunctionOrMethodParameterIndex(), CheckFunctionReturnType(), checkGlobalOrExternCConflict(), checkIBOutletCommon(), CheckIdentityFieldAssignment(), CheckIfOverriddenFunctionIsMarkedFinal(), CheckImplementationIvars(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckInheritingConstructorUsingDecl(), checkInitMethod(), checkIntToPointerCast(), checkIsValidOpenCLKernelParameter(), CheckLiteralOperatorDeclaration(), CheckMemorySizeofForComparison(), CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), checkModuleImportContext(), checkMoveAssignmentForRepeatedMove(), checkMSInheritanceAttrOnDefinition(), CheckNakedParmReference(), CheckNestingOfRegions(), checkNewAttributesAfterDef(), CheckNonNullArgument(), CheckNonTypeTemplatePartialSpecializationArgs(), CheckObjCARCConversion(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), CheckObjCDeclScope(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckObjCTraitOperandConstraints(), CheckOMPThreadPrivateDecl(), CheckOpenMPIterationSpace(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), CheckOverrideControl(), CheckOverridingFunctionAttributes(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckParameterPacksForExpansion(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckPoppedLabel(), CheckPureMethod(), checkQualifiedFunction(), CheckRealImagOperand(), checkRecursiveFunction(), CheckRegparmAttr(), CheckReturnStackAddr(), CheckSpecifiedExceptionType(), CheckStringInit(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTryLockFunAttrCommon(), checkUInt32Argument(), checkUndefinedButUsed(), checkUnsafeAssignLiteral(), checkUnsafeAssignObject(), checkUnusedDeclAttributes(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CheckVecStepTraitOperandType(), LogicalErrorHandler::compareAlwaysTrue(), LogicalErrorHandler::compareBitwiseEquality(), ConversionToObjCStringLiteralCheck(), ConvertDeclSpecToType(), convertPointersToCompositeType(), CopyObject(), CreateNewFunctionDecl(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CreatePropertyDecl(), CXXCheckConditionalOperands(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), DefineUsedVTables(), DelegatingCycleHelper(), Diag(), clang::InitializationSequence::Diagnose(), clang::Sema::BoundTypeDiagnoser1< T1 >::diagnose(), clang::Sema::BoundTypeDiagnoser2< T1, T2 >::diagnose(), clang::Sema::BoundTypeDiagnoser3< T1, T2, T3 >::diagnose(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseAccessPath(), DiagnoseAdditionInShift(), diagnoseAddressOfInvalidType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseARCUseOfWeakReceiver(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), diagnoseArityMismatch(), DiagnoseArityMismatch(), DiagnoseAssignmentAsCondition(), DiagnoseAssignmentResult(), DiagnoseBadAccess(), diagnoseBadCast(), DiagnoseBadConversion(), DiagnoseBadDeduction(), diagnoseBadDirectAccess(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseBadTarget(), diagnoseBadTypeAttribute(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseBitwisePrecedence(), DiagnoseCalleeStaticArrayParam(), DiagnoseCastOfObjCSEL(), DiagnoseClassExtensionDupMethods(), DiagnoseConditionalPrecedence(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseDefaultTemplateArgument(), diagnoseDeprecatedCopyOperation(), DiagnoseDirectIsaAccess(), diagnoseDistinctPointerComparison(), DiagnoseDtorReference(), DiagnoseDuplicateIvars(), DiagnoseEqualityWithExtraParens(), DiagnoseFailedEnableIfAttr(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), diagnoseFunctionPointerToVoidComparison(), DiagnoseHiddenVirtualMethods(), diagnoseIgnoredQualifiers(), DiagnoseIndirectJumpStmt(), diagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), diagnoseListInit(), diagnoseLogicalNotOnLHSofComparison(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseMultipleUserDefinedConversion(), DiagnoseNamespaceInlineMismatch(), DiagnoseNarrowingInInitList(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), diagnoseObjCLiteralComparison(), DiagnoseOwningPropertyGetterSynthesis(), diagnosePointerIncompatibility(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), DiagnoseQualifiedMemberReference(), DiagnoseReinterpretUpDownCast(), diagnoseRepeatedUseOfWeak(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), DiagnoseShiftCompare(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), DiagnoseSwitchLabelsFallthrough(), DiagnoseTemplateParameterListArityMismatch(), DiagnoseTwoPhaseLookup(), diagnoseTypo(), diagnoseUncapturableValueReference(), DiagnoseUnexpandedParameterPacks(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedReference(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), diagnoseUnknownAnyExpr(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseUnusedComparison(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseUseOfUnimplementedSelectors(), DiagRuntimeBehavior(), DiagUninitUse(), DoEmitAvailabilityWarning(), emitAndClearUnusedLocalTypedefWarnings(), EmitCurrentDiagnostic(), EmitDiagnosticForBitwiseAndInBitwiseOr(), EmitDiagnosticForLogicalAndInLogicalOr(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EndOpenMPDSABlock(), EvaluateArrayTypeTrait(), FinalizeVarWithDestructor(), FindAllocationFunctions(), FindAllocationOverload(), FindConditionalOverload(), FindDeallocationFunction(), FindInstantiatedDecl(), FindProtocolDeclaration(), FinishForRangeVarDecl(), FinishOverloadedCallExpr(), flushDiagnostics(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getNSNumberFactoryMethod(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAnalyzerNoReturnAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCleanupAttr(), handleCommonAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDLLAttr(), handleEnableIfAttr(), HandleExprPropertyRefExpr(), HandleExtVectorTypeAttr(), handleFallThroughAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLoopHintAttr(), handleMallocAttr(), handleModeAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), HandleMSProperty(), HandleNeonVectorTypeAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCGCTypeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCSuppresProtocolAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), HandlePropertyInClassExtension(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), inferARCLifetimeForPointee(), inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), instantiateDependentEnableIfAttr(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isArraySizeVLA(), IsMicrosoftUsingDeclarationAccessBug(), isNullPointerValueTemplateArgument(), isTagTypeWithMissingTag(), isVariableCapturable(), LookupMemberExpr(), LookupMemberExprInRecord(), LookupStdInitializerList(), MatchTemplateParameterKind(), maybeEmitZeroInitializationFixit(), mergeAlignedAttrs(), mergeAvailabilityAttr(), MergeCXXFunctionDecl(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeMSInheritanceAttr(), mergeParamDeclAttributes(), mergeSectionAttr(), mergeVisibilityAttr(), NoteBuiltinOperatorCandidate(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::OverloadCandidateSet::NoteCandidates(), NoteFunctionCandidate(), NoteHiddenVirtualMethods(), noteOperatorArrows(), NoteOverloadCandidate(), noteOverloads(), NoteSurrogateCandidate(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), PerformOpenMPImplicitIntegerConversion(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), PopPragmaVisibility(), ProcessAccessDeclAttributeList(), ProcessDeclAttribute(), ProcessDeclAttributeList(), ProcessPropertyDecl(), ProcessStmtAttribute(), propagateDLLAttrToBaseClassTemplate(), RebuildForRangeWithDereference(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), ReportOriginalDSA(), ReportOverrides(), RequireCompleteDeclContext(), RequireLiteralType(), RequireNonAbstractType(), ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveExceptionSpec(), ResolveSingleFunctionTemplateSpecialization(), SearchForReturnInStmt(), SemaBuiltinAnnotation(), SemaBuiltinMemChkCall(), SetCtorInitializers(), SetDeclDefaulted(), SetDeclDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), SubstParmVarDecl(), SuggestInitializationFixit(), SuggestParentheses(), threadSafetyCheckIsPointer(), tryCaptureVariable(), tryDiagnoseOverloadedCast(), TryDiagnoseProtectedAccess(), TryReinterpretCast(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), tryToRecoverWithCall(), UnifySection(), validateBoxingMethod(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), warnAboutAmbiguousFunction(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), warnOnLifetimeExtension(), warnOnSizeofOnArrayDecay(), and WarnUndefinedMethod().

Emit a partial diagnostic.

Definition at line 1028 of file Sema.cpp.

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

void Sema::DiagnoseAlwaysNonNullPointer ( Expr E,
Expr::NullPointerConstantKind  NullKind,
bool  IsEqual,
SourceRange  Range 
)
void Sema::DiagnoseAssignmentEnum ( QualType  DstType,
QualType  SrcType,
Expr SrcExpr 
)
bool Sema::DiagnoseAssignmentResult ( AssignConvertType  ConvTy,
SourceLocation  Loc,
QualType  DstType,
QualType  SrcType,
Expr SrcExpr,
AssignmentAction  Action,
bool Complained = nullptr 
)

DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy. This returns true if the conversion was invalid or false if the conversion was accepted.

Definition at line 10855 of file SemaExpr.cpp.

References AA_Assigning, AA_Casting, AA_Converting, AA_Initializing, AA_Passing, AA_Passing_CFAudited, AA_Returning, AA_Sending, Compatible, CompatiblePointerDiscardsQualifiers, Context, clang::frontend::CPlusPlus, Diag(), DiagnoseAssignmentEnum(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), clang::OverloadExpr::find(), FunctionVoidPointer, clang::Qualifiers::getAddressSpace(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::QualType::getUnqualifiedType(), HandleFunctionTypeMismatch(), clang::ObjCInterfaceDecl::hasDefinition(), clang::ConversionFixItGenerator::Hints, Incompatible, IncompatibleBlockPointer, IncompatibleNestedPointerQualifiers, IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, IncompatiblePointer, IncompatiblePointerDiscardsQualifiers, IncompatiblePointerSign, IncompatibleVectors, IntToBlockPointer, IntToPointer, clang::Type::isArrayType(), isInvalid(), clang::FixItHint::isNull(), clang::ConversionFixItGenerator::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), IsStringLiteralToNonConstPointerConversion(), clang::ConversionFixItGenerator::Kind, NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, PDiag(), PointerToInt, clang::ObjCObjectPointerType::quals(), and clang::ConversionFixItGenerator::tryToFixConversion().

Referenced by clang::InitializationSequence::Perform().

void Sema::DiagnoseAutoDeductionFailure ( VarDecl VDecl,
Expr Init 
)

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

Definition at line 830 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isInstanceMethod(), MatchTwoMethodDeclarations(), and clang::ObjCContainerDecl::methods().

Referenced by ActOnAtEnd().

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

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

Referenced by ActOnAliasDeclaration().

bool Sema::DiagnoseConditionalForNull ( Expr LHSExpr,
Expr RHSExpr,
SourceLocation  QuestionLoc 
)

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

Definition at line 2545 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), clang::ObjCInterfaceDecl::ivars(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().

Referenced by ActOnAtEnd().

bool Sema::DiagnoseEmptyLookup ( Scope S,
CXXScopeSpec SS,
LookupResult R,
std::unique_ptr< CorrectionCandidateCallback CCC,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr,
ArrayRef< Expr * >  Args = None 
)

Diagnose an empty lookup.

Returns:
false if new lookup candidates were found

Definition at line 1680 of file SemaExpr.cpp.

References clang::LookupResult::addDecl(), clang::CXXScopeSpec::Adopt(), clang::AS_none, clang::TypoCorrection::begin(), clang::LookupResult::begin(), clang::LookupResult::clear(), Context, clang::frontend::CPlusPlus, clang::CXXDependentScopeMemberExpr::Create(), clang::FixItHint::CreateInsertion(), clang::OverloadCandidateSet::CSK_Normal, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, Diag(), clang::LookupResult::empty(), clang::TypoCorrection::end(), clang::LookupResult::end(), clang::Type::getAsCXXRecordDecl(), clang::TypoCorrection::getAsString(), clang::DeclarationName::getAsString(), clang::NestedNameSpecifier::getAsType(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDecl(), clang::TypoCorrection::getCorrectionSpecifier(), clang::Decl::getDeclContext(), 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::FunctionDecl::getPrimaryTemplate(), clang::DeclContext::getRedeclContext(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::FunctionDecl::getTemplatedKind(), clang::CXXScopeSpec::getWithLocInContext(), clang::NamedDecl::isCXXClassMember(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::CXXMethodDecl::isInstance(), clang::TypoCorrection::isOverloaded(), clang::DeclContext::isRecord(), clang::DeclAccessPair::make(), clang::OR_Success, Record, S, clang::TypoCorrection::setCorrectionDecl(), clang::LookupResult::setLookupName(), clang::LookupResult::setNamingClass(), clang::TemplateArgumentListInfo::size(), clang::LookupResult::suppressDiagnostics(), clang::FunctionDecl::TK_FunctionTemplateSpecialization, and clang::TypoCorrection::WillReplaceSpecifier().

Referenced by BuildRecoveryCallExpr().

void Sema::DiagnoseEmptyLoopBody ( const Stmt S,
const Stmt PossibleBody 
)

Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body.

Definition at line 8147 of file SemaChecking.cpp.

References Diag(), clang::Stmt::getLocStart(), clang::SourceManager::getPresumedColumnNumber(), and clang::NullStmt::getSemiLoc().

void Sema::DiagnoseEmptyStmtBody ( SourceLocation  StmtLoc,
const Stmt Body,
unsigned  DiagID 
)

Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body, and it is located on the same line.

This helps prevent bugs due to typos, such as: if (condition); do_stuff();

Definition at line 8126 of file SemaChecking.cpp.

References Diag(), and clang::NullStmt::getSemiLoc().

Diagnose methods which overload virtual methods in a base class without overriding any.

Definition at line 6299 of file SemaDeclCXX.cpp.

References Diag(), Diags, FindHiddenVirtualMethods(), clang::Decl::getLocation(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isInvalidDecl(), and NoteHiddenVirtualMethods().

Referenced by CheckCompletedCXXClass().

void Sema::diagnoseIgnoredQualifiers ( unsigned  DiagID,
unsigned  Quals,
SourceLocation  FallbackLoc,
SourceLocation  ConstQualLoc = SourceLocation(),
SourceLocation  VolatileQualLoc = SourceLocation(),
SourceLocation  RestrictQualLoc = SourceLocation(),
SourceLocation  AtomicQualLoc = SourceLocation() 
)
void Sema::DiagnoseInvalidJumps ( Stmt Body)

Definition at line 806 of file JumpDiagnostics.cpp.

Diagnose why the specified class does not have a trivial special member of the given kind.

Definition at line 6025 of file SemaDeclCXX.cpp.

References checkTrivialSubobjectCall(), Context, CXXCopyAssignment, CXXCopyConstructor, clang::Decl::getLocation(), clang::ASTContext::getRecordType(), and TSK_CompleteObject.

void Sema::DiagnosePropertyMismatch ( ObjCPropertyDecl Property,
ObjCPropertyDecl SuperProperty,
const IdentifierInfo inheritedName,
bool  OverridingProtocolProperty 
)

Diagnose a declaration whose declarator-id has the given nested-name-specifier.

Parameters:
SSThe nested-name-specifier of the declarator-id.
DCThe declaration context to which the nested-name-specifier resolves.
NameThe name of the entity being declared.
LocThe location of the name of the entity being declared.
Returns:
true if we cannot safely recover from this error, false otherwise.

Definition at line 4388 of file SemaDecl.cpp.

References clang::CXXScopeSpec::clear(), Context, clang::FixItHint::CreateRemoval(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getNameKind(), clang::DeclContext::getParent(), clang::NestedNameSpecifierLoc::getPrefix(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameType(), clang::DeclContext::isRecord(), and clang::CXXScopeSpec::location_data().

Referenced by ActOnCXXMemberDeclarator().

void Sema::DiagnoseSentinelCalls ( NamedDecl D,
SourceLocation  Loc,
ArrayRef< Expr * >  Args 
)
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 9909 of file SemaDecl.cpp.

References Context, Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::Type::isDependentType(), and clang::QualType::isPODType().

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

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

Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), HandleMSProperty(), and maybeDiagnoseTemplateParameterShadow().

void Sema::diagnoseTypo ( const TypoCorrection Correction,
const PartialDiagnostic TypoDiag,
bool  ErrorRecovery = true 
)
void Sema::diagnoseTypo ( const TypoCorrection Correction,
const PartialDiagnostic TypoDiag,
const PartialDiagnostic PrevNote,
bool  ErrorRecovery = true 
)

Diagnose a successfully-corrected typo. Separated from the correction itself to allow external validation of the result, etc.

Parameters:
CorrectionThe result of performing typo correction.
TypoDiagThe diagnostic to produce. This will have the corrected string added to it (and usually also a fixit).
PrevNoteA note to use when indicating the location of the entity to which we are correcting. Will have the correction string added to it.
ErrorRecoveryIf true (the default), the caller is going to recover from the typo as if the corrected string had been typed. In this case, PDiag must be an error, and we will attach a fixit to it.

Definition at line 4537 of file SemaLookup.cpp.

References createImplicitModuleImportForErrorRecovery(), clang::FixItHint::CreateReplacement(), Diag(), clang::TypoCorrection::getAsString(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionDecl(), clang::TypoCorrection::getCorrectionRange(), getDefinitionToImport(), clang::PartialDiagnostic::getDiagID(), clang::Module::getFullModuleName(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getOwningModule(), clang::TypoCorrection::getQuoted(), clang::TypoCorrection::isKeyword(), and clang::TypoCorrection::requiresImport().

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 285 of file SemaTemplateVariadic.cpp.

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

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 299 of file SemaTemplateVariadic.cpp.

References clang::NestedNameSpecifier::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), and clang::CXXScopeSpec::getScopeRep().

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 351 of file SemaTemplateVariadic.cpp.

References clang::TemplateName::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::TemplateName::isNull().

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 365 of file SemaTemplateVariadic.cpp.

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

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.
Returns:
true if an error occurred, false otherwise.

Definition at line 217 of file SemaTemplateVariadic.cpp.

References Diag(), and FunctionScopes.

Referenced by checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), and DiagnoseUnexpandedParameterPack().

void Sema::DiagnoseUnimplementedProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl CDecl,
bool  SynthesizeProperties 
)
bool Sema::DiagnoseUnknownTemplateName ( const IdentifierInfo II,
SourceLocation  IILoc,
Scope S,
const CXXScopeSpec SS,
TemplateTy SuggestedTemplate,
TemplateNameKind SuggestedKind 
)
void Sema::DiagnoseUnknownTypeName ( IdentifierInfo *&  II,
SourceLocation  IILoc,
Scope S,
CXXScopeSpec SS,
ParsedType SuggestedType,
bool  AllowClassTemplates = false 
)

DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor.

Definition at line 3556 of file SemaDeclObjC.cpp.

References DIAG, Diag(), Diags, GetIvarBackingPropertyAccessor(), clang::Decl::getLocation(), clang::Scope::hasUnrecoverableErrorOccurred(), clang::ObjCContainerDecl::instance_methods(), clang::DiagnosticsEngine::isIgnored(), and clang::Decl::isReferenced().

Referenced by ActOnAtEnd().

void Sema::DiagnoseUnusedDecl ( const NamedDecl D)

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

Definition at line 1494 of file SemaDecl.cpp.

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

Referenced by BuildVariableInstantiation().

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

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

Definition at line 9893 of file SemaDecl.cpp.

References Diag().

bool Sema::DiagnoseUseOfDecl ( NamedDecl D,
SourceLocation  Loc,
const ObjCInterfaceDecl UnknownObjCClass = nullptr,
bool  ObjCPropertyAccess = false 
)

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

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

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

Definition at line 263 of file SemaExpr.cpp.

References clang::frontend::CPlusPlus, clang::frontend::CPlusPlus14, Diag(), DiagnoseAvailabilityOfDecl(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::Decl::getCanonicalDecl(), and clang::NamedDecl::getDeclName().

Referenced by ActOnClassPropertyRefExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), ActOnNamespaceAliasDef(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPReductionClause(), ActOnStartCategoryImplementation(), ActOnStartClassInterface(), ActOnUsingDirective(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildInstanceMessage(), BuildTypeofExprType(), BuildUnaryTransformType(), ConvertDeclSpecToType(), CreateFunctionRefExpr(), EndOpenMPDSABlock(), FinalizeVarWithDestructor(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), getObjCMessageKind(), HandleExprPropertyRefExpr(), LookupMemberExpr(), MarkBaseAndMemberDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), ResolveAndFixSingleFunctionTemplateSpecialization(), and SetDelegatingInitializer().

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:
StatementIf Statement is non-null, delay reporting the diagnostic until the function body is parsed, and then do a basic reachability analysis to determine if the statement is reachable. If it is unreachable, the diagnostic will not be emitted.

This routine emits the given diagnostic when the code currently being type-checked is "potentially evaluated", meaning that there is a possibility that the code will actually be executable. Code in sizeof() expressions, code used only during overload resolution, etc., are not potentially evaluated. This routine will suppress such diagnostics or, in the absolutely nutty case of potentially potentially evaluated expressions (C++ typeid), queue the diagnostic to potentially emit it later.

This routine should be used for all diagnostics that describe the run-time behavior of a program, such as passing a non-POD value through an ellipsis. Failure to do so will likely result in spurious diagnostics or failures during overload resolution or within sizeof/alignof/typeof/typeid.

Definition at line 12813 of file SemaExpr.cpp.

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

Referenced by CheckForNullPointerDereference(), and DiagnoseBadShiftValues().

void Sema::EmitAvailabilityWarning ( AvailabilityDiagnostic  AD,
NamedDecl D,
StringRef  Message,
SourceLocation  Loc,
const ObjCInterfaceDecl UnknownObjCClass,
const ObjCPropertyDecl ObjCProperty,
bool  ObjCPropertyAccess 
)
void Sema::EndOpenMPDSABlock ( Stmt CurDirective)

EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier.

Definition at line 1047 of file SemaDecl.cpp.

References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::Scope::setEntity().

Referenced by ActOnCXXEnterDeclaratorScope(), and ActOnCXXEnterDeclInitializer().

void Sema::FilterAcceptableTemplateNames ( LookupResult R,
bool  AllowFunctionTemplates = true 
)
void Sema::FilterLookupForScope ( LookupResult R,
DeclContext Ctx,
Scope S,
bool  ConsiderLinkage,
bool  AllowInlineNamespace 
)

Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.

Definition at line 1233 of file SemaDecl.cpp.

References Context, clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), isOutOfScopePreviousDeclaration(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().

Referenced by ActOnAliasDeclaration().

void Sema::FinalizeDeclaration ( Decl ThisDecl)
Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup ( Scope S,
const DeclSpec DS,
ArrayRef< Decl * >  Group 
)
void Sema::FinalizeVarWithDestructor ( VarDecl VD,
const RecordType DeclInitType 
)
bool Sema::FindAllocationFunctions ( SourceLocation  StartLoc,
SourceRange  Range,
bool  UseGlobal,
QualType  AllocType,
bool  IsArray,
MultiExprArg  PlaceArgs,
FunctionDecl *&  OperatorNew,
FunctionDecl *&  OperatorDelete 
)
bool Sema::FindAllocationOverload ( SourceLocation  StartLoc,
SourceRange  Range,
DeclarationName  Name,
MultiExprArg  Args,
DeclContext Ctx,
bool  AllowMissing,
FunctionDecl *&  Operator,
bool  Diagnose = true 
)

Find an fitting overload for the allocation function in the specified scope.

Parameters:
StartLocThe location of the 'new' token.
RangeThe range of the placement arguments.
NameThe name of the function ('operator new' or 'operator new[]').
ArgsThe placement arguments specified.
CtxThe scope in which we should search; either a class scope or the translation unit.
AllowMissingIf true, report an error if we can't find any allocation functions. Otherwise, succeed but don't fill in Operator.
OperatorFilled in with the found allocation function. Unchanged if no allocation function was found.
DiagnoseIf true, issue errors if the allocation function is not usable.

Definition at line 1848 of file SemaExprCXX.cpp.

References AddOverloadCandidate(), AddTemplateOverloadCandidate(), AR_inaccessible, clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), CheckAllocationAccess(), clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), getDeletedOrUnavailableSuffix(), clang::LookupResult::getNamingClass(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::isAmbiguous(), LookupOrdinaryName, LookupQualifiedName(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_ViableCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::LookupResult::suppressDiagnostics().

Referenced by FindAllocationFunctions().

void Sema::FindAssociatedClassesAndNamespaces ( SourceLocation  InstantiationLoc,
ArrayRef< Expr * >  Args,
AssociatedNamespaceSet AssociatedNamespaces,
AssociatedClassSet AssociatedClasses 
)

Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.

This routine computes the sets of associated classes and associated namespaces searched by argument-dependent lookup (C++ [basic.lookup.argdep]) for a given set of arguments.

Definition at line 2272 of file SemaLookup.cpp.

References addAssociatedClassesAndNamespaces(), Context, clang::OverloadExpr::decls(), clang::Decl::getAsFunction(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::Expr::IgnoreParens(), clang::ASTContext::OverloadTy, and clang::UO_AddrOf.

Referenced by DiagnoseTwoPhaseLookup().

QualType Sema::FindCompositePointerType ( SourceLocation  Loc,
Expr *&  E1,
Expr *&  E2,
bool NonStandardCompositeType = nullptr 
)

Find a merged pointer type and convert the two expressions to it.

This finds the composite pointer type (or member pointer type) for E1 and E2 according to C++11 5.9p2. It converts both expressions to this type and returns it. It does not emit diagnostics.

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

References clang::CK_NullToMemberPointer, clang::CK_NullToPointer, clang::Qualifiers::Const, Context, clang::frontend::CPlusPlus, clang::InitializationKind::CreateCopy(), clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::MemberPointerType::getClass(), clang::QualType::getCVRQualifiers(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::Expr::getType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isAnyPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Expr::NPC_ValueDependentIsNull, and clang::InitializationSequence::Perform().

Referenced by convertPointersToCompositeType(), CXXCheckConditionalOperands(), and FindCompositePointerType().

QualType clang::Sema::FindCompositePointerType ( SourceLocation  Loc,
ExprResult E1,
ExprResult E2,
bool NonStandardCompositeType = nullptr 
) [inline]
bool Sema::FindDeallocationFunction ( SourceLocation  StartLoc,
CXXRecordDecl RD,
DeclarationName  Name,
FunctionDecl *&  Operator,
bool  Diagnose = true 
)

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

References clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Identifier, isAcceptableNestedNameSpecifier(), LookupName(), and LookupNestedNameSpecifierName.

void Sema::FindHiddenVirtualMethods ( CXXMethodDecl MD,
SmallVectorImpl< CXXMethodDecl * > &  OverloadedMethods 
)

Finds the instantiation of the given declaration context within the current instantiation.

Returns:
NULL if there was an error

Definition at line 4325 of file SemaTemplateInstantiateDecl.cpp.

References FindInstantiatedDecl().

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

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). FindInstantiatedDecl performs this mapping from within the instantiation of X<int>.

Definition at line 4359 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), ArgumentPackSubstitutionIndex, Context, CurContext, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), Diags, clang::DeclContext::Equals(), FindInstantiatedContext(), clang::LocalInstantiationScope::findInstantiationOf(), findInstantiationOf(), clang::Type::getAs(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::RecordType::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::ASTContext::getTypeDeclType(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::TagType::isBeingDefined(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), isInstantiationOf(), clang::Decl::isInvalidDecl(), clang::DeclContext::lookup(), RequireCompleteType(), SubstDecl(), and clang::TSK_ExplicitSpecialization.

Referenced by BuildVariableInstantiation(), FindInstantiatedContext(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

Look for a locally scoped extern "C" declaration by the given name.

Definition at line 4816 of file SemaDecl.cpp.

References clang::NamedDecl::getMostRecentDecl().

Referenced by checkForConflictWithNonVisibleExternC(), and checkGlobalOrExternCConflict().

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 1039 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 782 of file SemaDeclObjC.cpp.

References CorrectTypo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), LookupObjCProtocolName, LookupProtocol(), NestedProtocolHasNoDefinition(), PDiag(), and TUScope.

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

References clang::CXXForRangeStmt::getRParenLoc(), S, clang::CXXForRangeStmt::setBody(), and clang::StmtError().

Note that we have finished the explicit captures for the given lambda.

Definition at line 470 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::finishedExplicitCaptures().

FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.

Definition at line 2334 of file SemaStmt.cpp.

References S, clang::ObjCForCollectionStmt::setBody(), and clang::StmtError().

Sema::TemplateDeductionResult Sema::FinishTemplateArgumentDeduction ( FunctionTemplateDecl FunctionTemplate,
SmallVectorImpl< DeducedTemplateArgument > &  Deduced,
unsigned  NumExplicitlySpecified,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info,
SmallVectorImpl< OriginalCallArg > const *  OriginalCallArgs = nullptr 
)

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 2779 of file SemaTemplateDeduction.cpp.

References clang::Sema::OriginalCallArg::ArgIdx, Builder, CheckOriginalCallArgDeduction(), Context, 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::TemplateArgument::getEmptyPack(), clang::SourceRange::getEnd(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::sema::TemplateDeductionInfo::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::TemplateDecl::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::TemplateArgument::isNull(), clang::Decl::isParameterPack(), clang::Decl::isTemplateParameterPack(), makeTemplateParameter(), clang::TemplateArgumentList::OnStack, clang::sema::TemplateDeductionInfo::Param, clang::sema::TemplateDeductionInfo::reset(), clang::Decl::setInvalidDecl(), clang::TemplateParameterList::size(), clang::sema::TemplateDeductionInfo::take(), TDK_SubstitutionFailure, and Unevaluated.

Referenced by SpecializeCorrespondingLambdaCallOperatorAndInvoker().

Force an expression with unknown-type to an expression of the given type.

Definition at line 13448 of file SemaExpr.cpp.

Referenced by ActOnFinishFullExpr(), and BuildInstanceMessage().

FreePackedContext - Deallocate and null out PackContext.

Definition at line 110 of file SemaAttr.cpp.

References PackContext.

Referenced by ~Sema().

FreeVisContext - Deallocate and null out VisContext.

Definition at line 533 of file SemaAttr.cpp.

References VisContext.

Referenced by PopPragmaVisibility(), and ~Sema().

bool Sema::FunctionParamTypesAreEqual ( const FunctionProtoType OldType,
const FunctionProtoType NewType,
unsigned ArgPos = nullptr 
)

FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types. Caller has already checked that they have same number of arguments. If the parameters are different, ArgPos will have the parameter index of the first different parameter.

Definition at line 2565 of file SemaOverload.cpp.

References Context, clang::ASTContext::hasSameType(), clang::FunctionProtoType::param_type_begin(), and clang::FunctionProtoType::param_type_end().

bool Sema::GatherArgumentsForCall ( SourceLocation  CallLoc,
FunctionDecl FDecl,
const FunctionProtoType Proto,
unsigned  FirstParam,
ArrayRef< Expr * >  Args,
SmallVectorImpl< Expr * > &  AllArgs,
VariadicCallType  CallType = VariadicDoesNotApply,
bool  AllowExplicit = false,
bool  IsListInitialization = false 
)
void Sema::GatherGlobalCodeCompletions ( CodeCompletionAllocator Allocator,
CodeCompletionTUInfo CCTUInfo,
SmallVectorImpl< CodeCompletionResult > &  Results 
)

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

References clang::CXXBasePaths::begin(), Context, clang::CXXBasePaths::end(), clang::CXXBasePaths::getOrigin(), and clang::ASTContext::getTypeDeclType().

Referenced by CheckDerivedToBaseConversion(), and TryStaticMemberPointerUpcast().

Definition at line 972 of file Sema.h.

References Consumer.

Referenced by getASTMutationListener(), and clang::ParseAST().

Get the outermost AttributedType node that sets a calling convention. Valid types should not have multiple attributes with different CCs.

Definition at line 2440 of file SemaDecl.cpp.

References clang::Type::getAs(), clang::AttributedType::getModifiedType(), and clang::AttributedType::isCallingConv().

Referenced by handleFunctionTypeAttr().

Given a variable, determine the type that a reference to that variable will have in the given scope.

Definition at line 12370 of file SemaExpr.cpp.

References TryCapture_Implicit, and tryCaptureVariable().

Referenced by getDecltypeForExpr().

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

References clang::frontend::CPlusPlus, clang::DeclRefExpr::getDecl(), clang::Expr::IgnoreParens(), and clang::DeclRefExpr::refersToEnclosingLocal().

Retrieve the current block, if any.

Definition at line 1151 of file Sema.cpp.

References ActiveTemplateInstantiations, CurContext, and FunctionScopes.

Referenced by AddKeywordsToConsumer(), and AddOrdinaryNameResults().

Retrieve the current captured region, if any.

Definition at line 1473 of file Sema.cpp.

References FunctionScopes.

Definition at line 316 of file SemaStmt.cpp.

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 906 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by diagnoseUseOfInternalDeclInInlineFunction(), and LookupMemberExpr().

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 918 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by AddKeywordsToConsumer(), DiagRuntimeBehavior(), and handleInitPriorityAttr().

Retrieve the current generic lambda info, if any.

Definition at line 1182 of file Sema.cpp.

References getCurLambda().

Referenced by clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().

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 911 of file Sema.cpp.

References getFunctionLevelDeclContext(), and clang::DeclContext::getParent().

Referenced by ActOnStartOfObjCMethodDef(), AddClassMessageCompletions(), AddOrdinaryNameResults(), AddSuperSendCompletion(), BuildClassMessage(), BuildInstanceMessage(), CheckForModifiableLvalue(), findRetainCycleOwner(), getMessageSendResultType(), getObjCMessageKind(), LookupMemberExpr(), and LookupPotentialTypoResult().

Definition at line 8691 of file Sema.h.

References getCurLexicalContext().

Referenced by DiagnoseUnusedOfDecl(), and getCurContextAvailability().

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

References clang::frontend::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), getLangOpts(), and clang::NestedNameSpecifier::isDependent().

Referenced by computeDeclContext().

MangleNumberingContext * Sema::getCurrentMangleNumberContext ( const DeclContext DC,
Decl *&  ManglingContextDecl 
)

Compute the mangling number context for a lambda expression or block literal.

Parameters:
DC- The DeclContext containing the lambda expression or block literal.
[out]ManglingContextDecl- Returns the ManglingContextDecl associated with the context, if relevant.

Definition at line 277 of file SemaLambda.cpp.

References Context, ContextKind, clang::DeclContext::getLexicalParent(), clang::ASTContext::getManglingNumberContext(), and isInInlineFunction().

Referenced by HandleTagNumbering().

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 8674 of file Sema.h.

Referenced by ActOnObjCBoolLiteral(), ActOnSuperScopeSpecifier(), emitReplacement(), clang::Parser::getCurScope(), getScopeForContext(), HandleExtVectorTypeAttr(), and warnAboutAmbiguousFunction().

Retrieve the message suffix that should be added to a diagnostic complaining about the given function being deleted or unavailable.

Definition at line 322 of file SemaExpr.cpp.

References clang::Decl::getAvailability().

Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedArrowExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), FindAllocationOverload(), and FinishOverloadedCallExpr().

ParsedType Sema::getDestructorName ( SourceLocation  TildeLoc,
IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS,
ParsedType  ObjectType,
bool  EnteringContext 
)
ParsedType Sema::getDestructorType ( const DeclSpec DS,
ParsedType  ObjectType 
)

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 5421 of file SemaType.cpp.

References Context, clang::ETK_None, clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::QualType::isNull(), and clang::CXXScopeSpec::isValid().

Referenced by buildNestedType(), and ConvertDeclSpecToType().

Definition at line 1086 of file Sema.h.

References FunctionScopes.

Referenced by BuildInstanceMessage().

Definition at line 427 of file SemaExpr.cpp.

References clang::Stmt::getSourceRange().

Definition at line 974 of file Sema.h.

Referenced by AddClassMessageCompletions(), and CheckExtVectorComponent().

std::string Sema::getFixItZeroInitializerForType ( QualType  T,
SourceLocation  Loc 
) const
std::string Sema::getFixItZeroLiteralForType ( QualType  T,
SourceLocation  Loc 
) const

Definition at line 223 of file SemaFixItUtils.cpp.

References getScalarZeroExpressionForType().

Definition at line 1459 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

Referenced by LookupBuiltin().

bool Sema::GetFormatNSStringIdx ( const FormatAttr *  Format,
unsigned Idx 
)
Sema::FormatStringType Sema::GetFormatStringType ( const FormatAttr *  Format) [static]

Definition at line 2502 of file SemaChecking.cpp.

Referenced by checkFormatStringExpr().

Definition at line 966 of file Sema.h.

References FPFeatures.

ObjCIvarDecl * Sema::GetIvarBackingPropertyAccessor ( const ObjCMethodDecl Method,
const ObjCPropertyDecl *&  PDecl 
) const

GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL. It also returns ivar's property on success.

Definition at line 3495 of file SemaDeclObjC.cpp.

References clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCPropertyDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::ObjCInterfaceDecl::lookupMethod().

Referenced by DiagnoseUnusedBackingIvarInAccessor().

const LangOptions& clang::Sema::getLangOpts ( ) const [inline]

Definition at line 964 of file Sema.h.

References LangOpts.

Referenced by ActOnCXXMemberDeclarator(), ActOnCXXNamedCast(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnDecltypeExpression(), ActOnDefs(), ActOnDesignatedInitializer(), ActOnEnumBody(), ActOnEnumConstant(), ActOnFinishFullExpr(), ActOnFriendFunctionDecl(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnObjCExceptionDecl(), ActOnOpenMPAlignedClause(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPReductionClause(), ActOnParamDefaultArgument(), ActOnPragmaFPContract(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnStartCXXMemberReference(), ActOnStartOfObjCMethodDef(), ActOnTypeName(), ActOnUsingDeclaration(), AddBuiltinCandidate(), AddConversionCandidate(), clang::TypoCorrectionConsumer::addCorrection(), addFixitForObjCARCConversion(), AddImplicitlyDeclaredMembersToClass(), AddKeywordsToConsumer(), addMethodToGlobalList(), AddMsStructLayoutForRecord(), AddOrdinaryNameResults(), AddOverloadCandidate(), AddSurrogateCandidate(), AdjustDestructorExceptionSpec(), AtomicPropertySetterGetterRules(), BuildArrayType(), BuildCallToMemberFunction(), BuildClassMessage(), BuildCStyleCastExpr(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildExceptionDeclaration(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildObjCExceptionDecl(), buildOverloadedCallSet(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildReferenceType(), buildSingleCopyAssignRecursively(), captureInBlock(), CheckAllocatedType(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), CheckAsmLValue(), checkBlockPointerTypesForAssignment(), CheckBooleanCondition(), CheckCommaOperands(), checkCondition(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConstexprFunctionStmt(), CheckConversionDeclarator(), CheckCXX98CompatAccessibleCopy(), CheckEffectiveAccess(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedSpecialMember(), checkForConflictWithNonVisibleExternC(), CheckForModifiableLvalue(), CheckFriendTypeDecl(), CheckFunctionReturnType(), checkGlobalOrExternCConflict(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckLiteralOperatorDeclaration(), CheckMessageArgumentTypes(), CheckObjCCollectionLiteralElement(), CheckObjCMethodOverride(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckOpenMPIterationSpace(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionExceptionSpec(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckReturnStackAddr(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), CheckTollFreeBridgeCast(), CheckTollFreeBridgeStaticCast(), checkTrivialClassMembers(), CheckUsingDeclQualifier(), CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), compareConversionFunctions(), CompareImplicitConversionSequences(), CompareStandardConversionSequences(), CompleteNonViableCandidate(), ConversionToObjCStringLiteralCheck(), ConvertDeclSpecToType(), CorrectTypoDelayed(), CreateIfFixit(), createImplicitModuleImportForErrorRecovery(), CreateNewFunctionDecl(), CreatePropertyDecl(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceTemplateArgumentsByTypeMatch(), deduceWeakPropertyFromType(), defaultedSpecialMemberIsConstexpr(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitLambdaToBlockPointerConversion(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseAssignmentResult(), DiagnoseBadShiftValues(), DiagnoseDefaultTemplateArgument(), diagnoseDeprecatedCopyOperation(), diagnoseListInit(), diagnoseLogicalNotOnLHSofComparison(), DiagnoseNarrowingInInitList(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseSwitchLabelsFallthrough(), diagnoseTypo(), diagnoseUncapturableValueReference(), diagnoseUseOfInternalDeclInInlineFunction(), DiagUninitUse(), EmitCurrentDiagnostic(), emitReplacement(), EndOpenMPDSABlock(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), FindAllocationFunctions(), FindCompositePointerType(), FindUsualDeallocationFunction(), FinishForRangeVarDecl(), clang::FunctionCallFilterCCC::FunctionCallFilterCCC(), getCCForDeclaratorChunk(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getNSNumberFactoryMethod(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), GetTypeOfFunction(), getUDSuffixLoc(), handleDelayedForbiddenType(), handleFunctionTypeAttr(), handleInitPriorityAttr(), HandleMSProperty(), handleNSReturnsRetainedAttr(), handleObjCOwnershipTypeAttr(), HandlePropertyInClassExtension(), HasAccess(), hasVisibleDefinition(), IgnoredValueConversions(), clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::InitializationSequence::InitializeFrom(), isCurrentClassName(), isCurrentClassNameTypo(), IsCXX98CompatWarning(), IsDerivedFrom(), isFunctionDefinitionDiscarded(), isIncompleteDeclExternC(), isLibstdcxxPointerReturnFalseHack(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isResultTypeOrTemplate(), IsStandardConversion(), isStdInitializerList(), isTagTypeWithMissingTag(), LookupBuiltin(), LookupDirect(), LookupMemberExpr(), LookupMemberExprInRecord(), mapCodeCompletionContext(), MatchTwoMethodDeclarations(), MaybeBindToTemporary(), maybeExtendBlockObject(), MaybeProduceObjCObject(), MergeCXXFunctionDecl(), mergeTypeWithPrevious(), MergeVarDeclExceptionSpecs(), clang::ParseAST(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), ProcessPropertyDecl(), RequireNonAbstractType(), ResolveSingleFunctionTemplateSpecialization(), Sema(), SetIvarInitializers(), clang::DeclSpec::SetStorageClassSpec(), ShouldDeleteSpecialMember(), TryDefaultInitialization(), TryImplicitConversion(), TryListInitialization(), TryNamespaceTypoCorrection(), TryOCLSamplerInitialization(), TryOCLZeroEventInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryReinterpretCast(), TryValueInitialization(), tryVectorConvertAndSplat(), VerifyIntegerConstantExpression(), and WarnConflictingTypedMethods().

llvm::DenseSet< Module * > & Sema::getLookupModules ( )

Get the set of additional modules that should be checked during name lookup. A module and its imports become visible when instanting a template defined within it.

Definition at line 1197 of file SemaLookup.cpp.

References getDefiningModule().

QualType Sema::getMessageSendResultType ( QualType  ReceiverType,
ObjCMethodDecl Method,
bool  isClassMessage,
bool  isSuperMessage 
)

Retrieve the module loader associated with the preprocessor.

Definition at line 51 of file Sema.cpp.

Referenced by ActOnModuleImport(), ActOnModuleInclude(), and createImplicitModuleImportForErrorRecovery().

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 4552 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::TemplateParameterList::size(), and clang::TDF_None.

Referenced by InstantiateClassTemplateSpecialization().

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.
NumCallArguments1The number of arguments in the call to FT1, used only when TPOC is TPOC_Call.
NumCallArguments2The number of arguments in the call to FT2, used only when TPOC is TPOC_Call.
Returns:
the more specialized function template. If neither template is more specialized, returns NULL.

Definition at line 4336 of file SemaTemplateDeduction.cpp.

References ArgMoreQualified, isAtLeastAsSpecializedAs(), isVariadicFunctionTemplate(), NeitherMoreQualified, and ParamMoreQualified.

Referenced by clang::isBetterOverloadCandidate().

UnresolvedSetIterator Sema::getMostSpecialized ( UnresolvedSetIterator  SpecBegin,
UnresolvedSetIterator  SpecEnd,
TemplateSpecCandidateSet FailedCandidates,
SourceLocation  Loc,
const PartialDiagnostic NoneDiag,
const PartialDiagnostic AmbigDiag,
const PartialDiagnostic CandidateDiag,
bool  Complain = true,
QualType  TargetType = QualType() 
)

Retrieve the most specialized of the given function template specializations.

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.
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.
Returns:
the most specialized function template specialization, if found. Otherwise, returns SpecEnd.

Definition at line 4466 of file SemaTemplateDeduction.cpp.

References Diag(), clang::QualType::isNull(), isSameTemplate(), clang::TemplateSpecCandidateSet::NoteCandidates(), and clang::TPOC_Other.

GetNameForDeclarator - Determine the full declaration name for the given Declarator.

Definition at line 4117 of file SemaDecl.cpp.

References clang::Declarator::getName().

Referenced by ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), and CreateNewFunctionDecl().

Retrieves the declaration name from a parsed unqualified-id.

Definition at line 4123 of file SemaDecl.cpp.

References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::UnqualifiedId::ConstructorName, Context, clang::UnqualifiedId::ConversionFunctionId, clang::DeclarationNameLoc::CXXOperatorName, clang::ASTContext::DeclarationNames, clang::UnqualifiedId::DestructorName, clang::UnqualifiedId::EndLocation, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::OpaquePtr< PtrTy >::get(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXConversionFunctionName(), clang::DeclarationNameTable::getCXXDestructorName(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getIdentifier(), clang::DeclarationNameInfo::getInfo(), clang::UnqualifiedId::getKind(), clang::ASTContext::getNameForTemplate(), clang::SourceLocation::getRawEncoding(), clang::ASTContext::getTypeDeclType(), clang::UnqualifiedId::Identifier, clang::UnqualifiedId::IK_ConstructorName, clang::UnqualifiedId::IK_ConstructorTemplateId, clang::UnqualifiedId::IK_ConversionFunctionId, clang::UnqualifiedId::IK_DestructorName, clang::UnqualifiedId::IK_Identifier, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::UnqualifiedId::IK_LiteralOperatorId, clang::UnqualifiedId::IK_OperatorFunctionId, clang::UnqualifiedId::IK_TemplateId, clang::QualType::isNull(), clang::TemplateIdAnnotation::Name, clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), clang::DeclarationNameInfo::setNamedTypeInfo(), clang::UnqualifiedId::StartLocation, clang::UnqualifiedId::OFI::SymbolLocations, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.

Referenced by ActOnAliasDeclaration(), ActOnUsingDeclaration(), and CheckMicrosoftIfExistsSymbol().

getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. This routine copes with the difference between C and C++ scoping rules in structs and unions. For example, the following code is well-formed in C but ill-formed in C++:

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

References clang::Scope::DeclScope, clang::Scope::getEntity(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::Scope::isClassScope(), clang::DeclContext::isTransparentContext(), and S.

Referenced by ActOnEnumConstant().

Determine the number of arguments in the given pack expansion type.

This routine assumes that the number of arguments in the expansion is consistent across all of the unexpanded parameter packs in its pattern.

Returns an empty Optional if the type can't be expanded.

Definition at line 651 of file SemaTemplateVariadic.cpp.

References CurrentInstantiationScope, Depth, clang::LocalInstantiationScope::findInstantiationOf(), getDepthAndIndex(), clang::MultiLevelTemplateArgumentList::getNumLevels(), and clang::MultiLevelTemplateArgumentList::hasTemplateArgument().

Referenced by addInstantiatedParametersToScope(), and clang::TemplateDeclInstantiator::SubstFunctionType().

Definition at line 13872 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.
DoTypoCorrectionIf 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 1577 of file SemaDecl.cpp.

References AttributeLangSupport::C, clang::ObjCInterfaceDecl::getDefinition(), and clang::NamedDecl::getIdentifier().

Referenced by ActOnClassPropertyRefExpr(), ActOnDefs(), ActOnStartCategoryImplementation(), and ActOnStartCategoryInterface().

Sema::ObjCMessageKind Sema::getObjCMessageKind ( Scope S,
IdentifierInfo Name,
SourceLocation  NameLoc,
bool  IsSuper,
bool  HasTrailingDot,
ParsedType ReceiverType 
)

Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".

Definition at line 7424 of file Sema.h.

References OptimizeOffPragmaLocation.

LabelDecl * Sema::GetOrCreateMSAsmLabel ( StringRef  ExternalLabelName,
SourceLocation  Location,
bool  AlwaysCreate 
)

Retrieve the special "std" namespace, which may require us to implicitly define the namespace.

Definition at line 7167 of file SemaDeclCXX.cpp.

References Context, clang::NamespaceDecl::Create(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), getStdNamespace(), clang::ASTContext::getTranslationUnitDecl(), PP, clang::Decl::setImplicit(), and StdNamespace.

Referenced by ActOnUsingDirective(), and DeclareGlobalNewDelete().

static int clang::Sema::getPrintable ( int  I) [inline, static]
static unsigned clang::Sema::getPrintable ( unsigned  I) [inline, static]

Definition at line 1243 of file Sema.h.

static bool clang::Sema::getPrintable ( bool  B) [inline, static]

Definition at line 1244 of file Sema.h.

static const char* clang::Sema::getPrintable ( const char *  S) [inline, static]

Definition at line 1245 of file Sema.h.

References S.

static StringRef clang::Sema::getPrintable ( StringRef  S) [inline, static]

Definition at line 1246 of file Sema.h.

References S.

static const std::string& clang::Sema::getPrintable ( const std::string &  S) [inline, static]

Definition at line 1247 of file Sema.h.

References S.

static const IdentifierInfo* clang::Sema::getPrintable ( const IdentifierInfo II) [inline, static]

Definition at line 1248 of file Sema.h.

Definition at line 1251 of file Sema.h.

static QualType clang::Sema::getPrintable ( QualType  T) [inline, static]

Definition at line 1252 of file Sema.h.

static SourceRange clang::Sema::getPrintable ( SourceRange  R) [inline, static]

Definition at line 1253 of file Sema.h.

static SourceRange clang::Sema::getPrintable ( SourceLocation  L) [inline, static]

Definition at line 1254 of file Sema.h.

static SourceRange clang::Sema::getPrintable ( Expr E) [inline, static]

Definition at line 1255 of file Sema.h.

References clang::Stmt::getSourceRange().

static SourceRange clang::Sema::getPrintable ( TypeLoc  TL) [inline, static]

Definition at line 1256 of file Sema.h.

References clang::TypeLoc::getSourceRange().

PrintingPolicy Sema::getPrintingPolicy ( const ASTContext Ctx,
const Preprocessor PP 
) [static]

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 1067 of file Sema.cpp.

References clang::Scope::DeclScope, getCurScope(), clang::DeclContext::getPrimaryContext(), S, and clang::Scope::TemplateParamScope.

Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), handleIBOutletCollection(), and TryTypoCorrectionForCall().

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

References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::DeclContext::getPrimaryContext().

Referenced by ActOnFriendFunctionDecl().

Definition at line 1453 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

std::string Sema::getTemplateArgumentBindingsText ( const TemplateParameterList Params,
const TemplateArgumentList Args 
)

Produces a formatted string that describes the binding of template parameters to template arguments.

Definition at line 8134 of file SemaTemplate.cpp.

References clang::TemplateArgumentList::data(), and clang::TemplateArgumentList::size().

Referenced by DiagnoseBadDeduction(), InstantiateClassTemplateSpecialization(), and PrintInstantiationStack().

std::string Sema::getTemplateArgumentBindingsText ( const TemplateParameterList Params,
const TemplateArgument Args,
unsigned  NumArgs 
)
TemplateArgumentLoc Sema::getTemplateArgumentPackExpansionPattern ( TemplateArgumentLoc  OrigLoc,
SourceLocation Ellipsis,
Optional< unsigned > &  NumExpansions 
) const

Returns the pattern of the pack expansion for a template argument.

Parameters:
OrigLocThe template argument to expand.
EllipsisWill be set to the location of the ellipsis.
NumExpansionsWill be set to the number of expansions that will be generated from this pack expansion, if known a priori.

Definition at line 880 of file SemaTemplateVariadic.cpp.

References clang::TypeLoc::castAs(), Context, clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsType(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::PackExpansionExpr::getEllipsisLoc(), clang::TemplateArgument::getKind(), clang::PackExpansionExpr::getNumExpansions(), clang::PackExpansionType::getNumExpansions(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getPackExpansionPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::isPackExpansion(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TypeLocBuilder::pushFullCopy(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs ( NamedDecl D,
const TemplateArgumentList Innermost = nullptr,
bool  RelativeToPrimary = false,
const FunctionDecl Pattern = nullptr 
)

Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.

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 52 of file SemaTemplateInstantiate.cpp.

References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), Context, clang::TemplateSpecializationType::getArgs(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::TemplateSpecializationType::getNumArgs(), clang::DeclContext::getParent(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::DeclContext::isFileContext(), clang::isGenericLambdaCallOperatorSpecialization(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::DeclContext::isTranslationUnit(), and clang::TSK_ExplicitSpecialization.

Referenced by BuildCXXDefaultInitExpr(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), InstantiateExceptionSpec(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), and RequireCompleteDeclContext().

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 3259 of file SemaType.cpp.

References Context, GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLangOpts(), clang::ASTContext::getNullTypeSourceInfo(), inferARCWriteback(), clang::QualType::isNull(), and clang::Declarator::isPrototypeContext().

Referenced by ActOnCXXNew(), ActOnExceptionDeclarator(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnObjCExceptionDecl(), ActOnProperty(), ActOnTypeName(), and HandleMSProperty().

QualType Sema::GetTypeFromParser ( ParsedType  Ty,
TypeSourceInfo **  TInfo = nullptr 
) [static]
ParsedType Sema::getTypeName ( const IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS = nullptr,
bool  isClassName = false,
bool  HasTrailingDot = false,
ParsedType  ObjectTypePtr = ParsedType(),
bool  IsCtorOrDtorName = false,
bool  WantNontrivialTypeSourceInfo = false,
IdentifierInfo **  CorrectedII = nullptr 
)

If the identifier refers to a type name within this scope, return the declaration of that type.

This routine performs ordinary name lookup of the identifier II within the given scope, with optional C++ scope specifier SS, to determine whether the name refers to a type. If so, returns an opaque pointer (actually a QualType) corresponding to that type. Otherwise, returns NULL.

Definition at line 201 of file SemaDecl.cpp.

References clang::LookupResult::Ambiguous, clang::LookupResult::AmbiguousTagHiding, clang::LookupResult::begin(), Builder, Context, clang::frontend::CPlusPlus, clang::LookupResult::empty(), clang::LookupResult::end(), clang::ETK_None, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::OpaquePtr< PtrTy >::get(), clang::LookupResult::getAmbiguityKind(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionSpecifier(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getObjCInterfaceType(), clang::SourceLocation::getRawEncoding(), clang::LookupResult::getResultKind(), clang::ASTContext::getTypeDeclType(), clang::driver::types::getTypeName(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::OpaquePtr< QualType >::make(), clang::CXXScopeSpec::MakeTrivial(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), recoverFromTypeInKnownDependentBase(), S, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::UnqualifiedId::setIdentifier(), clang::TypeSpecTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::LookupResult::suppressDiagnostics().

Referenced by ActOnPseudoDestructorExpr(), handleIBOutletCollection(), clang::Parser::ParseUnqualifiedId(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().

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 3808 of file SemaType.cpp.

References clang::TypeLoc::castAs(), Context, clang::ASTContext::CreateTypeSourceInfo(), fillAtomicQualLoc(), fillAttributedTypeLoc(), clang::TypeLoc::getAs(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::Declarator::getEllipsisLoc(), clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getNextTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getNextTypeLoc(), clang::Declarator::getNumTypeObjects(), clang::TypeLoc::getOpaqueData(), clang::TypeSourceInfo::getTypeLoc(), clang::Declarator::getTypeObject(), and clang::TypeLoc::getUnqualifiedLoc().

Referenced by GetFullTypeForDeclarator().

const Sema::TypoExprState & Sema::getTypoExprState ( TypoExpr TE) const

Definition at line 4593 of file SemaLookup.cpp.

void Sema::getUndefinedButUsed ( SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &  Undefined)

Obtain a sorted list of functions that are undefined but ODR-used.

Obtains a sorted list of functions that are undefined but ODR-used.

Definition at line 427 of file Sema.cpp.

References Context, clang::VarDecl::DeclarationOnly, clang::ASTContext::getSourceManager(), clang::Decl::hasAttr(), clang::SourceManager::isBeforeInTranslationUnit(), clang::NamedDecl::isExternallyVisible(), clang::Decl::isInvalidDecl(), SM, and UndefinedButUsed.

Referenced by checkUndefinedButUsed().

NamedDecl * Sema::HandleDeclarator ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists 
)
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,
InClassInitStyle  InitStyle,
AccessSpecifier  AS 
)
void Sema::HandleFunctionTypeMismatch ( PartialDiagnostic PDiag,
QualType  FromType,
QualType  ToType 
)
MSPropertyDecl * Sema::HandleMSProperty ( Scope S,
RecordDecl Record,
SourceLocation  DeclStart,
Declarator D,
Expr BitWidth,
InClassInitStyle  InitStyle,
AccessSpecifier  AS,
AttributeList MSPropertyAttr 
)

HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.

Definition at line 13464 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::LookupResult::Ambiguous, CheckExtraCXXDefaultArguments(), clang::frontend::CPlusPlus, clang::MSPropertyDecl::Create(), Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForRedeclaration, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getAsSingle(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::Declarator::getLocStart(), clang::AttributeList::getPropertyData(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::DeclSpec::getSpecifierName(), clang::AttributeList::PropertyData::GetterId, clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::ASTContext::IntTy, isDeclInScope(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, Previous, ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setModulePrivate(), clang::AttributeList::PropertyData::SetterId, TUScope, and UPPC_DataMemberType.

Referenced by ActOnCXXMemberDeclarator().

ObjCPropertyDecl * Sema::HandlePropertyInClassExtension ( Scope S,
SourceLocation  AtLoc,
SourceLocation  LParenLoc,
FieldDeclarator FD,
Selector  GetterSel,
Selector  SetterSel,
const bool  isAssign,
const bool  isReadWrite,
const unsigned  Attributes,
const unsigned  AttributesAsWritten,
bool isOverridingProperty,
TypeSourceInfo T,
tok::ObjCKeywordKind  MethodImplKind 
)

Called by ActOnProperty to handle @property declarations in class extensions.

Definition at line 314 of file SemaObjCProperty.cpp.

References ActOnProperty(), Context, clang::ObjCPropertyDecl::Create(), CreatePropertyDecl(), CurContext, clang::FieldDeclarator::D, deduceWeakPropertyFromType(), Diag(), clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_atomic, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::ObjCPropertyDecl::findPropertyDecl(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), clang::DeclarationName::getAsIdentifierInfo(), clang::ASTContext::getASTMutationListener(), clang::ASTContext::getCanonicalType(), clang::ObjCCategoryDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::ObjCPropertyDecl::getGetterName(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getSetterMethodDecl(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::hasSameType(), isObjCPointerConversion(), clang::ObjCInterfaceDecl::known_extensions(), clang::ObjCPropertyDecl::makeitReadWriteAttribute(), makePropertyAttributesAsWritten(), clang::ObjCPropertyDecl::OBJC_PR_assign, clang::ObjCPropertyDecl::OBJC_PR_atomic, 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, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_None, ProcessDeclAttributes(), ProcessPropertyDecl(), clang::ObjCPropertyDecl::setGetterMethodDecl(), clang::ObjCPropertyDecl::setGetterName(), clang::ObjCPropertyDecl::setPropertyAttributes(), clang::ObjCPropertyDecl::setPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::setSetterMethodDecl(), and clang::ObjCPropertyDecl::setSetterName().

Referenced by ActOnProperty().

bool Sema::hasAnyAcceptableTemplateNames ( LookupResult R,
bool  AllowFunctionTemplates = true 
)

Determine whether any errors occurred within this function/method/ block.

Definition at line 1147 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::ErrorTrap, getCurFunction(), and clang::DiagnosticErrorTrap::hasUnrecoverableErrorOccurred().

bool Sema::hasCStrMethod ( const Expr E)

Check to see if a given expression could have '.c_str()' called on it.

Check if we could call '.c_str()' on an object.

FIXME: This returns the wrong results in some cases (if cv-qualifiers don't allow the call, or if it would be ambiguous).

Definition at line 3204 of file SemaChecking.cpp.

References clang::Expr::getType().

Definition at line 4593 of file SemaType.cpp.

References clang::QualType::IgnoreParens().

Referenced by adjustMemberFunctionCC().

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 7740 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().

IdentifyCUDATarget - Determine the CUDA compilation target for this function.

Definition at line 40 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, clang::Decl::hasAttr(), and clang::Decl::isImplicit().

Referenced by BuildCallToMemberFunction(), CheckCUDATarget(), DiagnoseBadTarget(), and inferCUDATargetForImplicitSpecialMember().

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 312 of file Sema.cpp.

References BasePathInvolvesVirtualBase(), clang::CK_ArrayToPointerDecay, clang::CK_DerivedToBase, clang::CK_FunctionToPointerDecay, clang::CK_LValueToRValue, clang::CK_ToVoid, Context, clang::ImplicitCastExpr::Create(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Stmt::getLocStart(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Expr::isRValue(), MarkVTableUsed(), and clang::VK_RValue.

Referenced by BuildImplicitBaseInitializer(), BuildInstanceMessage(), checkConditionalBlockPointerCompatibility(), checkConditionalConvertScalarsToVectors(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckTemplateArgumentPointerToMember(), convertPointersToCompositeType(), CXXCheckConditionalOperands(), FindCompositePointerType(), handleComplexFloatConversion(), handleFloatConversion(), handleIntegerToComplexFloatConversion(), handleIntToFloatConversion(), IgnoredValueConversions(), LookupMemberExpr(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), ShouldTryAgainWithRedefinitionType(), and tryVectorConvertAndSplat().

void Sema::ImplMethodsVsClassMethods ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl IDecl,
bool  IncompleteImpl = false 
)

Definition at line 8676 of file Sema.h.

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

bool Sema::inferCUDATargetForImplicitSpecialMember ( CXXRecordDecl ClassDecl,
CXXSpecialMember  CSM,
CXXMethodDecl MemberDecl,
bool  ConstRHS,
bool  Diagnose 
)

Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members.

Parameters:
ClassDeclthe class for which the member is being created.
CSMthe kind of special member.
MemberDeclthe special member itself.
ConstRHStrue if this is a copy operation with a const object on its RHS.
Diagnosetrue if this call should emit diagnostics.
Returns:
true if there was an error inferring. The result of this call is implicit CUDA target attribute(s) attached to the member declaration.

Definition at line 126 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), clang::CXXRecordDecl::bases(), CFT_Device, CFT_Host, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::Decl::getLocation(), IdentifyCUDATarget(), clang::CXXRecordDecl::isAbstract(), LookupSpecialMember(), resolveCalleeCUDATargetConflict(), and clang::CXXRecordDecl::vbases().

Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DiagnoseBadTarget(), and ShouldDeleteSpecialMember().

void Sema::Initialize ( )
void Sema::InstantiateAttrs ( const MultiLevelTemplateArgumentList TemplateArgs,
const Decl Pattern,
Decl Inst,
LateInstantiatedAttrVec LateAttrs = nullptr,
LocalInstantiationScope OuterMostScope = nullptr 
)
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 1945 of file SemaTemplateInstantiate.cpp.

References ActOnFields(), ActOnFinishDelayedMemberInitializers(), CheckCompletedCXXClass(), Consumer, Context, CurrentInstantiationScope, clang::DeclContext::decls(), clang::TemplateDeclInstantiator::delayed_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_partial_spec_end(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_end(), clang::LocalInstantiationScope::deleteScopes(), DiagnoseUninstantiableTemplate(), clang::TemplateDeclInstantiator::disableLateAttributeInstantiation(), clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDefinition(), clang::TagDecl::getInnerLocStart(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::TagDecl::getRBraceLoc(), clang::TemplateDeclInstantiator::getStartingScope(), clang::TagDecl::getTagKind(), clang::ASTConsumer::HandleTagDeclDefinition(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::sema::instantiateTemplateAttribute(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::NamedDecl::isCXXInstanceMember(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), MarkVTableUsed(), P, PerformDependentDiagnostics(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::NamedDecl::setHidden(), clang::Decl::setInvalidDecl(), clang::Decl::setLocation(), clang::TypeDecl::setLocStart(), clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::TagDecl::setRBraceLoc(), clang::TagDecl::setTagKind(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::TagDecl::startDefinition(), SubstBaseSpecifiers(), clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit().

Referenced by InstantiateClassMembers(), and InstantiateClassTemplateSpecialization().

void Sema::InstantiateClassMembers ( SourceLocation  PointOfInstantiation,
CXXRecordDecl Instantiation,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateSpecializationKind  TSK 
)

Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.

Definition at line 2464 of file SemaTemplateInstantiate.cpp.

References CheckSpecializationInstantiationRedecl(), Consumer, clang::DeclContext::decls(), clang::CXXRecordDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::VarDecl::getOutOfLineDefinition(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), InstantiateClass(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateStaticDataMemberDefinition(), clang::CXXRecordDecl::isLocalClass(), clang::VarDecl::isStaticDataMember(), clang::DeclContext::lookup(), MarkVTableUsed(), PendingLocalImplicitInstantiations, Record, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::VarDecl::setTemplateSpecializationKind(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by InstantiateClassTemplateSpecializationMembers().

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 2662 of file SemaTemplateInstantiate.cpp.

References getTemplateInstantiationArgs(), and InstantiateClassMembers().

bool Sema::InstantiateEnum ( SourceLocation  PointOfInstantiation,
EnumDecl Instantiation,
EnumDecl Pattern,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateSpecializationKind  TSK 
)

Instantiate the definition of an enum from a given pattern.

Parameters:
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis the declaration whose definition is being instantiated. This will be a member enumeration of a class temploid specialization, or a local enumeration within a function temploid specialization.
PatternThe templated declaration from which the instantiation occurs.
TemplateArgsThe template arguments to be substituted into the pattern.
TSKThe kind of implicit or explicit instantiation to perform.
Returns:
true if an error occurred, false otherwise.

Definition at line 2160 of file SemaTemplateInstantiate.cpp.

References DiagnoseUninstantiableTemplate(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::EnumDecl::getMemberSpecializationInfo(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::NamedDecl::setHidden(), and clang::EnumDecl::setTemplateSpecializationKind().

Referenced by InstantiateClassMembers(), and RequireCompleteDeclContext().

void Sema::InstantiateExceptionSpec ( SourceLocation  PointOfInstantiation,
FunctionDecl Function 
)
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 3274 of file SemaTemplateInstantiateDecl.cpp.

References ActOnFinishFunctionBody(), ActOnStartOfFunctionDef(), addInstantiatedParametersToScope(), Consumer, DefineUsedVTables(), Diag(), clang::LocalInstantiationScope::Exit(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getASTMutationListener(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::Type::getContainedAutoType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::Decl::getPreviousDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionDecl::getReturnType(), getTemplateInstantiationArgs(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleTopLevelDecl(), InstantiateMemInitializers(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::Decl::isFromASTFile(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isLateTemplateParsed(), LateParsedTemplateMap, LateTemplateParser, OpaqueParser, PendingInstantiations, PerformDependentDiagnostics(), PerformPendingInstantiations(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::ExternalSemaSource::ReadLateParsedTemplates(), SetDeclDefaulted(), clang::DeclaratorDecl::setInnerLocStart(), clang::Decl::setInvalidDecl(), SubstQualifier(), SubstStmt(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and clang::TSK_ExplicitSpecialization.

Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), and PerformPendingInstantiations().

bool Sema::InstantiateInClassInitializer ( SourceLocation  PointOfInstantiation,
FieldDecl Instantiation,
FieldDecl Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Instantiate the definition of a field from the given pattern.

Parameters:
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis the declaration whose definition is being instantiated. This will be a class of a class temploid specialization, or a local enumeration within a function temploid specialization.
PatternThe templated declaration from which the instantiation occurs.
TemplateArgsThe template arguments to be substituted into the pattern.
Returns:
true if an error occurred, false otherwise.

Definition at line 2221 of file SemaTemplateInstantiate.cpp.

References ActOnFinishCXXInClassMemberInitializer(), ActOnStartCXXInClassMemberInitializer(), Diag(), clang::FieldDecl::getInClassInitializer(), clang::FieldDecl::getInClassInitStyle(), clang::Decl::getLocEnd(), clang::Stmt::getLocStart(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), clang::FieldDecl::hasInClassInitializer(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, clang::Decl::setInvalidDecl(), and SubstInitializer().

Referenced by BuildCXXDefaultInitExpr(), and InstantiateClassMembers().

void Sema::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 3704 of file SemaTemplateInstantiateDecl.cpp.

References InstantiateVariableDefinition().

Referenced by InstantiateClassMembers().

void Sema::InstantiateVariableDefinition ( SourceLocation  PointOfInstantiation,
VarDecl Var,
bool  Recursive = false,
bool  DefinitionRequired = false 
)

Definition at line 3713 of file SemaTemplateInstantiateDecl.cpp.

References clang::LookupResult::addDecl(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::TemplateArgumentList::asArray(), CompleteVarTemplateSpecializationDecl(), Consumer, DefineUsedVTables(), Diag(), clang::LocalInstantiationScope::Exit(), ForRedeclaration, getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLexicalDeclContext(), clang::VarDecl::getPointOfInstantiation(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplateSpecializationDecl::getTemplateArgsInfo(), clang::VarTemplateDecl::getTemplatedDecl(), clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs(), getTemplateInstantiationArgs(), clang::VarDecl::getTemplateSpecializationKind(), clang::ASTConsumer::HandleCXXStaticMemberVarInstantiation(), clang::VarDecl::hasInit(), InstantiateVariableInitializer(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::VarTemplatePartialSpecializationDecl::isMemberSpecialization(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), LookupOrdinaryName, MergeVarDecl(), PendingInstantiations, PerformPendingInstantiations(), clang::Decl::setInvalidDecl(), clang::VarDecl::setTemplateSpecializationKind(), clang::EnumDecl::setTemplateSpecializationKind(), SubstDecl(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and clang::TSK_ExplicitSpecialization.

Referenced by DoMarkVarDeclReferenced(), InstantiateStaticDataMemberDefinition(), PerformPendingInstantiations(), and RequireCompleteExprType().

void Sema::InstantiateVariableInitializer ( VarDecl Var,
VarDecl OldVar,
const MultiLevelTemplateArgumentList TemplateArgs 
)

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

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), and clang::Expr::getType().

Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.

Definition at line 285 of file SemaCXXScopeSpec.cpp.

References Context, clang::ASTContext::getLangOpts(), clang::ASTContext::getTypeDeclType(), and clang::Type::isDependentType().

Referenced by BuildCXXNestedNameSpecifier(), and FindFirstQualifierInScope().

bool Sema::isAcceptableTagRedeclaration ( const TagDecl Previous,
TagTypeKind  NewTag,
bool  isDefinition,
SourceLocation  NewTagLoc,
const IdentifierInfo Name 
)

Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration.

Returns:
true if the new tag kind is acceptable, false otherwise.

Definition at line 10972 of file SemaDecl.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::TagDecl::getDefinition(), clang::Decl::getLocation(), getRedeclDiagFromTagKind(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindName(), isClassCompatTagKind(), isTemplate(), Previous, Record, and clang::Redeclarable< decl_type >::redecls().

bool Sema::IsBlockPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType 
)
bool 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 1872 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::ComplexType::getElementType().

Referenced by IsStandardConversion().

bool Sema::isCopyElisionCandidate ( QualType  ReturnType,
const VarDecl VD,
bool  AllowFunctionParameters 
)
bool Sema::isCurrentClassName ( const IdentifierInfo II,
Scope S,
const CXXScopeSpec SS = nullptr 
)

isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined. In the case of nested classes, this will only return true if II is the name of the innermost class.

Definition at line 1235 of file SemaDeclCXX.cpp.

References computeDeclContext(), clang::frontend::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOpts(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

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

Determine whether the identifier II is a typo for the name of the class type currently being defined. If so, update it to the identifier that should have been used.

Definition at line 1254 of file SemaDeclCXX.cpp.

References computeDeclContext(), clang::frontend::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOpts(), clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

bool Sema::isDeclInScope ( NamedDecl D,
DeclContext Ctx,
Scope S = nullptr,
bool  AllowInlineNamespace = false 
)

isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.

Parameters:
AllowInlineNamespaceIf true, allow the declaration to be in the enclosing namespace set of the context, rather than contained directly within it.

Definition at line 1211 of file SemaDecl.cpp.

Referenced by ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnNamespaceAliasDef(), ActOnOpenMPIdExpression(), BuildUsingDeclaration(), CheckAnonMemberRedeclaration(), HandleMSProperty(), and MergeCXXFunctionDecl().

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

References clang::frontend::CPlusPlus, clang::Type::getAsCXXRecordDecl(), getLangOpts(), and clang::CXXRecordDecl::isDerivedFrom().

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

References clang::Type::getAs().

Referenced by IsStandardConversion().

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.
true if
  • FD is unavailable and current context is inside an available function, false otherwise.

Definition at line 1073 of file SemaOverload.cpp.

References clang::Decl::isUnavailable().

Referenced by clang::OverloadCandidateSet::BestViableFunction(), and NoteFunctionCandidate().

Determine whether the given function is an implicitly-deleted special member function.

Definition at line 10903 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().

Referenced by CreateOverloadedBinOp(), and clang::InitializationSequence::Diagnose().

bool Sema::IsIntegralPromotion ( Expr From,
QualType  FromType,
QualType  ToType 
)
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 823 of file SemaCXXScopeSpec.cpp.

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

bool Sema::isKnownName ( StringRef  name)
bool Sema::isLaxVectorConversion ( QualType  srcType,
QualType  destType 
)

Is this a legal conversion between two known vector types?

Definition at line 5138 of file SemaExpr.cpp.

References Context, clang::ASTContext::getLangOpts(), clang::Type::isVectorType(), and VectorTypesMatch().

Referenced by IsVectorConversion().

Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification to work around a libstdc++ bug.

HACK: libstdc++ has a bug where it shadows std::swap with a member swap function then tries to call std::swap unqualified from the exception specification of that function. This function detects whether we're in such a case and turns off delay-parsing of exception specifications.

Definition at line 42 of file SemaExceptionSpec.cpp.

References Context, CurContext, clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifier(), clang::Declarator::getLocStart(), clang::ASTContext::getSourceManager(), getStdNamespace(), clang::SourceManager::isInSystemHeader(), and clang::IdentifierInfo::isStr().

bool Sema::IsMemberPointerConversion ( Expr From,
QualType  FromType,
QualType  ToType,
bool  InOverloadResolution,
QualType ConvertedType 
)

IsMemberPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a member pointer conversion (C++ 4.11). If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.

Definition at line 2659 of file SemaOverload.cpp.

References Context, clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::Stmt::getLocStart(), clang::ASTContext::getMemberPointerType(), clang::MemberPointerType::getPointeeType(), clang::QualType::getTypePtr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.

Referenced by IsStandardConversion().

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

References clang::CXXRecordDecl::bases(), Context, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::hasSameUnqualifiedType(), clang::Scope::isFunctionPrototypeScope(), and clang::NestedNameSpecifier::Super.

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

References clang::ASTContext::adjustFunctionType(), Context, clang::CanQual< T >::getAs(), clang::ASTContext::getCanonicalType(), clang::FunctionType::getExtInfo(), and clang::ASTContext::hasSameUnqualifiedType().

Referenced by CheckOriginalCallArgDeduction(), checkPointerTypesForAssignment(), and IsStandardConversion().

Definition at line 1679 of file Sema.h.

bool Sema::isObjCPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType,
bool IncompatibleObjC 
)
bool Sema::isObjCWritebackConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType 
)

Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.

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

References clang::Qualifiers::compatiblyIncludes(), Context, clang::Qualifiers::empty(), clang::Type::getAs(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Qualifiers::setObjCLifetime(), clang::ASTContext::typesAreCompatible(), and clang::Qualifiers::withoutObjCLifetime().

Referenced by IsStandardConversion(), and tryObjCWritebackConversion().

bool Sema::IsOverload ( FunctionDecl New,
FunctionDecl Old,
bool  IsForUsingDecl 
)
bool Sema::IsPointerConversion ( Expr From,
QualType  FromType,
QualType  ToType,
bool  InOverloadResolution,
QualType ConvertedType,
bool IncompatibleObjC 
)

IsPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a pointer conversion (C++ 4.10). If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.

This routine also supports conversions to and from block pointers and conversions with Objective-C's 'id', 'id<protocols...>', and pointers to interfaces. FIXME: Once we've determined the appropriate overloading rules for Objective-C, we may want to split the Objective-C checks into a different routine; however, GCC seems to consider all of these conversions to be pointer conversions, so for now they live here. IncompatibleObjC will be set if the conversion is an allowed Objective-C conversion that should result in a warning.

Definition at line 1966 of file SemaOverload.cpp.

References clang::ASTContext::areCompatibleVectorTypes(), BuildSimilarlyQualifiedPointerType(), Context, clang::frontend::CPlusPlus, clang::Type::getAs(), clang::Stmt::getLocStart(), clang::PointerType::getPointeeType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), isNullPointerConstantForConversion(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVectorType(), clang::Type::isVoidType(), and clang::ASTContext::typesAreCompatible().

Referenced by IsStandardConversion().

bool Sema::IsQualificationConversion ( QualType  FromType,
QualType  ToType,
bool  CStyle,
bool ObjCLifetimeConversion 
)

Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions). If any of parameter and argument is not a function, just perform type comparison.

Parameters:
Paramthe template parameter type.
Argthe argument type.

Definition at line 930 of file SemaTemplateDeduction.cpp.

References Context, clang::CanQual< T >::getAs(), and clang::ASTContext::getCanonicalType().

Referenced by DeduceTemplateArgumentsByTypeMatch().

bool Sema::isSelfExpr ( Expr RExpr)

Private Helper predicate to check for 'self'.

Definition at line 1455 of file SemaExprObjC.cpp.

References CurContext, and clang::DeclContext::getNonClosureAncestor().

Referenced by BuildInstanceMessage(), DiagnoseAssignmentAsCondition(), and LookupMethodInReceiverType().

bool Sema::isSelfExpr ( Expr RExpr,
const ObjCMethodDecl Method 
)

Determine whether the token kind starts a simple-type-specifier.

Definition at line 95 of file SemaDecl.cpp.

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
Ctxthe class/context from which to start the search
Returns:
true if the Decl is accessible from the Class, false otherwise.

Definition at line 1853 of file SemaAccess.cpp.

References AR_inaccessible, clang::AS_public, Context, clang::declaresSameEntity(), clang::Decl::getAccess(), clang::Type::getCanonicalTypeInternal(), IsAccessible(), clang::NamedDecl::isCXXClassMember(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::DeclAccessPair::make(), clang::sema::AccessedEntity::Member, clang::ObjCIvarDecl::Package, clang::ObjCIvarDecl::Private, and clang::ObjCIvarDecl::Public.

Is the given special member function accessible for the purposes of deciding whether to define a special member function as deleted?

Definition at line 1566 of file SemaAccess.cpp.

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

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

References clang::StringLiteral::Ascii, clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::IgnoreParens(), clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.

Referenced by DiagnoseAssignmentResult(), and IsStandardConversion().

isTagName() - This method is called *for error recovery purposes only* to determine if the specified name is a valid tag name ("struct foo"). If so, this returns the TST for the tag corresponding to it (TST_enum, TST_union, TST_struct, TST_interface, TST_class). This is used to diagnose cases in C where the user forgot to specify the tag.

Definition at line 466 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_interface, clang::TST_struct, clang::TST_union, clang::TST_unspecified, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.

TemplateNameKind Sema::isTemplateName ( Scope S,
CXXScopeSpec SS,
bool  hasTemplateKeyword,
UnqualifiedId Name,
ParsedType  ObjectType,
bool  EnteringContext,
TemplateTy Template,
bool MemberOfUnknownSpecialization 
)

Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.

Definition at line 876 of file SemaExprCXX.cpp.

References CXXThisTypeOverride, clang::Type::getAsCXXRecordDecl(), clang::TagDecl::isBeingDefined(), and clang::QualType::isNull().

Referenced by ActOnStartCXXMemberReference(), and LookupMemberExprInRecord().

Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.

Definition at line 6594 of file Sema.h.

References ExprEvalContexts.

Referenced by CheckCXXThisCapture(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DoMarkVarDeclReferenced(), inferARCLifetimeForPointee(), MarkVTableUsed(), recordUseOfEvaluatedWeak(), and TransformToPotentiallyEvaluated().

Determine whether it's possible for an unexpanded parameter pack to be valid in this location. This only happens when we're in a declaration that is nested within an expression that could be expanded, such as a lambda-expression within a function call.

Determine whether an unexpanded parameter pack might be permitted in this location. Useful for error recovery.

This is conservatively correct, but may claim that some unexpanded packs are permitted when they are not.

Definition at line 207 of file SemaTemplateVariadic.cpp.

References FunctionScopes.

Determine if type T is a valid subject for a nonnull and similar attributes. By default, we look through references (the behavior used by nonnull), but if the second parameter is true, then we treat a reference type as valid.

Definition at line 1129 of file SemaDeclAttr.cpp.

References clang::Type::getAsUnionType(), clang::QualType::getNonReferenceType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), and clang::Type::isReferenceType().

Referenced by AddAssumeAlignedAttr(), attrNonNullArgCheck(), CheckNonNullArguments(), and handleNonNullAttr().

Determine the degree of POD-ness for an expression. Incomplete types are considered POD, since this check can be performed when we're in an unevaluated context.

Definition at line 767 of file SemaExpr.cpp.

References Context, clang::Type::getAsCXXRecordDecl(), clang::QualType::isCXX98PODType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::Type::isVoidType(), and Record.

IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'.

Definition at line 1481 of file SemaObjCProperty.cpp.

References clang::ObjCMethodDecl::getSelector(), clang::ObjCIvarDecl::getSynthesize(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCInterfaceDecl::lookupMethod(), and clang::ObjCContainerDecl::properties().

Referenced by LookupMemberExpr().

NamedDecl * Sema::LazilyCreateBuiltin ( IdentifierInfo II,
unsigned  ID,
Scope S,
bool  ForRedeclaration,
SourceLocation  Loc 
)

Load any externally-stored vtable uses.

Definition at line 12896 of file SemaDeclCXX.cpp.

References clang::ExternalSemaSource::ReadUsedVTables(), VTablesUsed, and VTableUses.

Referenced by DefineUsedVTables(), and MarkVTableUsed().

Load weak undeclared identifiers from the external source.

Definition at line 507 of file Sema.cpp.

References clang::ExternalSemaSource::ReadWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.

Referenced by ActOnEndOfTranslationUnit(), and ProcessPragmaWeak().

CXXMethodDecl * Sema::LookupCopyingAssignment ( CXXRecordDecl Class,
unsigned  Quals,
bool  RValueThis,
unsigned  ThisQuals 
)

Look up the copying constructor for the given class.

Definition at line 2560 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

Referenced by ComputeDefaultedCopyCtorExceptionSpec().

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 3017 of file Sema.h.

Referenced by BuildClassMessage(), BuildInstanceMessage(), and ParseObjCSelectorExpression().

LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.

Definition at line 2433 of file SemaDeclObjC.cpp.

References clang::ObjCMethodDecl::isDefined(), and MethodPool.

Referenced by DiagnoseUseOfUnimplementedSelectors().

bool Sema::LookupInlineAsmField ( StringRef  Base,
StringRef  Member,
unsigned Offset,
SourceLocation  AsmLoc 
)
ExprResult Sema::LookupInlineAsmIdentifier ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
llvm::InlineAsmIdentifierInfo &  Info,
bool  IsUnevaluatedContext 
)
ExprResult Sema::LookupInObjCMethod ( LookupResult Lookup,
Scope S,
IdentifierInfo II,
bool  AllowBuiltinCreation = false 
)

LookupInObjCMethod - The parser has read a name in, and Sema has detected that we're currently inside an ObjC method. Perform some additional lookup.

Ideally, most of this would be done by lookup, but there's actually quite a lot of extra work involved.

Returns a null sentinel to indicate trivial success.

Definition at line 2243 of file SemaExpr.cpp.

References clang::LookupResult::addDecl(), clang::ASTContext::BuiltinInfo, Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::declaresSameEntity(), Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::ObjCIvarDecl::getAccessControl(), clang::IdentifierInfo::getBuiltinID(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::LookupResult::getNameLoc(), clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), clang::ASTContext::Idents, clang::UnqualifiedId::IK_ImplicitSelfParam, clang::ObjCMethodDecl::isClassMethod(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::LookupResult::isForRedeclaration(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Builtin::Context::isPredefinedLibFunction(), clang::LookupResult::isSingleResult(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::Qualifiers::OCL_Weak, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::ObjCIvarDecl::Private, clang::UnqualifiedId::setIdentifier(), and clang::UnqualifiedId::setKind().

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 3008 of file Sema.h.

Referenced by BuildInstanceMessage(), hasIsEqualMethod(), and ParseObjCSelectorExpression().

Perform qualified name lookup into all base classes of the given class.

Parameters:
Rcaptures both the lookup criteria and any lookup results found.
ClassThe context in which qualified name lookup will search. Name lookup will search in all base classes merging the results.
Returns:
True if any decls were found (but possibly ambiguous)

Definition at line 1828 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), Context, clang::LookupResult::empty(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getRecordType(), clang::LookupResult::resolveKind(), and clang::LookupResult::setBaseObjectType().

Sema::LiteralOperatorLookupResult Sema::LookupLiteralOperator ( Scope S,
LookupResult R,
ArrayRef< QualType ArgTys,
bool  AllowRaw,
bool  AllowTemplate,
bool  AllowStringTemplate 
)

LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext].

Normal overload resolution is not used to select which literal operator to call for a user-defined literal. Look up the provided literal operator name, and filter the results to the appropriate set for the given argument types.

Definition at line 2650 of file SemaLookup.cpp.

References clang::LookupResult::Ambiguous, clang::LookupResult::begin(), Context, Diag(), clang::LookupResult::end(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getResultKind(), clang::ASTContext::hasSameUnqualifiedType(), clang::Decl::isInvalidDecl(), clang::LookupResult::makeFilter(), and clang::TemplateParameterList::size().

Referenced by BuildCookedLiteralOperatorCall().

LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.

Definition at line 1497 of file SemaExprObjC.cpp.

References clang::ObjCObjectPointerType::quals().

Referenced by BuildInstanceMessage(), HandleExprPropertyRefExpr(), and hasIsEqualMethod().

CXXMethodDecl * Sema::LookupMovingAssignment ( CXXRecordDecl Class,
unsigned  Quals,
bool  RValueThis,
unsigned  ThisQuals 
)

Look up the moving assignment operator for the given class.

Definition at line 2616 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

Referenced by ComputeDefaultedMoveAssignmentExceptionSpec().

Look up the moving constructor for the given class.

Definition at line 2572 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

Referenced by ComputeDefaultedMoveCtorExceptionSpec().

bool Sema::LookupName ( LookupResult R,
Scope S,
bool  AllowBuiltinCreation = false 
)

Perform unqualified name lookup starting from a given scope.

Unqualified name lookup (C++ [basic.lookup.unqual], C99 6.2.1) is used to find names within the current scope. For example, 'x' in

 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.
[in,out]RSpecifies the lookup to perform (e.g., the name to look up and the lookup kind), and is updated with the results of lookup including zero or more declarations and possibly additional information used to diagnose ambiguities.
Returns:
true if lookup succeeded and false otherwise.

Definition at line 1299 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::frontend::CPlusPlus, clang::Scope::DeclScope, clang::DeclContext::Equals(), clang::LookupResult::getAcceptableDecl(), clang::Scope::getEntity(), clang::Scope::getFlags(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), clang::Scope::isDeclScope(), isNamespaceOrTranslationUnitScope(), clang::DeclContext::isTransparentContext(), LookupBuiltin(), LookupRedeclarationWithLinkage, clang::LookupResult::resolveKind(), and clang::LookupResult::setShadowed().

Referenced by ActOnAliasDeclaration(), ActOnFriendFunctionDecl(), ActOnMethodDeclaration(), ActOnObjCBoolLiteral(), ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), buildMemcpyForAssignmentOp(), BuildUsingDeclaration(), CheckAnonMemberRedeclaration(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), DiagnoseInvalidRedeclaration(), emitReplacement(), FindFirstQualifierInScope(), getObjCMessageKind(), HandleMSProperty(), isKnownName(), isNonTypeNestedNameSpecifier(), LookupPredefedObjCSuperType(), and warnAboutAmbiguousFunction().

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 3233 of file SemaLookup.cpp.

References Context, clang::LabelDecl::Create(), clang::Decl::getDeclContext(), clang::Scope::getFnParent(), and clang::SourceLocation::isValid().

bool Sema::LookupParsedName ( LookupResult R,
Scope S,
CXXScopeSpec SS,
bool  AllowBuiltinCreation = false,
bool  EnteringContext = false 
)

Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.

This routine is a convenience routine meant to be called from contexts that receive a name and an optional C++ scope specifier (e.g., "N::M::x"). It will then perform either qualified or unqualified name lookup (with LookupQualifiedName or LookupName, respectively) on the given name and return those results. It will perform a special type of lookup for "__super::" scope specifier.

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 1784 of file SemaLookup.cpp.

References clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::LookupResult::setContextRange(), clang::LookupResult::setNotFoundInCurrentInstantiation(), and clang::NestedNameSpecifier::Super.

Referenced by ActOnNamespaceAliasDef(), ActOnOpenMPIdExpression(), ActOnPragmaUnused(), ActOnUsingDirective(), BuildMemInitializer(), CheckMicrosoftIfExistsSymbol(), isTagTypeWithMissingTag(), and LookupPotentialTypoResult().

bool Sema::LookupQualifiedName ( LookupResult R,
DeclContext LookupCtx,
bool  InUnqualifiedLookup = false 
)

Perform qualified name lookup into a given context.

Qualified name lookup (C++ [basic.lookup.qual]) is used to find names when the context of those names is explicit specified, e.g., "std::vector" or "x->member", or as part of unqualified name lookup.

Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.

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 1583 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::AS_none, clang::CXXBasePathElement::Base, clang::CXXBasePaths::begin(), Context, 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::ASTContext::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(), AddMemberOperatorCandidates(), BuildCallToObjectOfClassType(), BuildCXXNestedNameSpecifier(), BuildNonArrayForRange(), BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), BuildUsingDeclaration(), BuildVariableInstantiation(), CheckUsingDeclQualifier(), CXXRecordMembersNamed(), DiagnoseInvalidRedeclaration(), DiagnoseTwoPhaseLookup(), doesUsualArrayDeleteWantSize(), emitReplacement(), FindAllocationFunctions(), FindAllocationOverload(), FindDeallocationFunction(), FindUsualDeallocationFunction(), HasNoThrowOperator(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), LookupPotentialTypoResult(), LookupStdInitializerList(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

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 2323 of file SemaLookup.cpp.

References clang::LookupResult::getAsSingle().

Referenced by ActOnAtEnd(), ActOnCompatibilityAlias(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), ActOnNamespaceAliasDef(), ActOnPragmaRedefineExtname(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnTypedefedProtocols(), createFriendTagNNSFixIt(), DiagnoseDirectIsaAccess(), getNSNumberFactoryMethod(), and maybeDiagnoseTemplateParameterShadow().

Sema::SpecialMemberOverloadResult * Sema::LookupSpecialMember ( CXXRecordDecl D,
CXXSpecialMember  SM,
bool  ConstArg,
bool  VolatileArg,
bool  RValueThis,
bool  ConstThis,
bool  VolatileThis 
)
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 3062 of file Sema.h.

References clang::Expr::getExprLoc().

Referenced by buildSingleCopyAssignRecursively().

Definition at line 3065 of file Sema.h.

References ActOnFinishFullExpr().

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 254 of file Sema.cpp.

References ActiveTemplateInstantiations, clang::Decl::addAttr(), Context, CurContext, clang::ASTContext::getSourceManager(), clang::Decl::hasAttr(), and clang::SourceManager::isInSystemHeader().

Referenced by diagnoseObjCARCConversion().

void Sema::MarkAnyDeclReferenced ( SourceLocation  Loc,
Decl D,
bool  OdrUse 
)

Perform marking for a reference to an arbitrary declaration. It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building a normal expression which refers to a variable.

Definition at line 12656 of file SemaExpr.cpp.

References MarkFunctionReferenced(), MarkVariableReferenced(), and clang::Decl::setReferenced().

Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), CheckTemplateArgumentAddressOfObjectOrFunction(), and MarkExprReferenced().

void Sema::MarkAsLateParsedTemplate ( FunctionDecl FD,
Decl FnD,
CachedTokens Toks 
)
void Sema::MarkDeclarationsReferencedInExpr ( Expr E,
bool  SkipLocalVariables = false 
)

Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".

Parameters:
SkipLocalVariablesIf true, don't mark local variables as 'referenced'.

Definition at line 12792 of file SemaExpr.cpp.

Referenced by PopExpressionEvaluationContext().

void clang::Sema::MarkDeducedTemplateParameters ( const FunctionTemplateDecl FunctionTemplate,
llvm::SmallBitVector &  Deduced 
) [inline]

Definition at line 6239 of file Sema.h.

References Context.

Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().

void Sema::MarkDeducedTemplateParameters ( ASTContext Ctx,
const FunctionTemplateDecl FunctionTemplate,
llvm::SmallBitVector &  Deduced 
) [static]
void Sema::MarkFunctionReferenced ( SourceLocation  Loc,
FunctionDecl Func,
bool  OdrUse = true 
)

Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)

Definition at line 11407 of file SemaExpr.cpp.

References ActiveTemplateInstantiations, Consumer, Context, CurContext, DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), Func, clang::Type::getAs(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::ValueDecl::getType(), clang::ASTConsumer::HandleCXXImplicitFunctionInstantiation(), clang::Decl::hasAttr(), InstantiateFunctionDefinition(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isImplicitlyInstantiable(), clang::FunctionDecl::isInlined(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), IsPotentiallyEvaluatedContext(), clang::isUnresolvedExceptionSpec(), clang::Decl::isUsed(), clang::CXXMethodDecl::isUserProvided(), LangOpts, MarkVTableUsed(), PendingInstantiations, PendingLocalImplicitInstantiations, clang::Redeclarable< decl_type >::redecls(), ResolveExceptionSpec(), clang::Decl::setReferenced(), clang::TSK_ImplicitInstantiation, and UndefinedButUsed.

Referenced by ActOnCUDAExecConfigExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPReductionClause(), BuildCXXConstructExpr(), BuildCXXNew(), CheckDestructor(), checkDLLAttribute(), DefineImplicitLambdaToFunctionPointerConversion(), EndOpenMPDSABlock(), FinalizeVarWithDestructor(), FindConditionalOverload(), MarkAnyDeclReferenced(), MarkBaseAndMemberDestructorsReferenced(), MarkVirtualMembersReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), SetDelegatingInitializer(), and SetIvarInitializers().

If it's a file scoped decl that must warn if not used, keep track of it.

Definition at line 1372 of file SemaDecl.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl().

void Sema::MarkUsedTemplateParameters ( const TemplateArgumentList TemplateArgs,
bool  OnlyDeduced,
unsigned  Depth,
llvm::SmallBitVector &  Used 
)

Mark which template parameters can be deduced from a given template argument list.

Parameters:
TemplateArgsthe template argument list from which template parameters will be deduced.
Useda bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced.

Definition at line 5055 of file SemaTemplateDeduction.cpp.

References Context, clang::TemplateArgumentList::data(), hasPackExpansionBeforeEnd(), MarkUsedTemplateParameters(), and clang::TemplateArgumentList::size().

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

References DoMarkVarDeclReferenced().

Referenced by MarkAnyDeclReferenced().

Mark the exception specifications of all virtual member functions in the given class as needed.

Definition at line 13057 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::methods(), and ResolveExceptionSpec().

Referenced by DefineUsedVTables().

MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.

Definition at line 13064 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::bases(), clang::CXXRecordDecl::getFinalOverriders(), clang::CXXRecordDecl::getNumVBases(), and MarkFunctionReferenced().

Referenced by DefineUsedVTables(), and MarkVTableUsed().

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 CDecl,
bool IncompleteImpl,
bool  ImmediateClass,
bool  WarnCategoryMethodImpl = false 
)

MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations.

MatchAllMethodDeclarations - Check methods declared in interface or protocol against those declared in their implementations.

Definition at line 1806 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::class_methods(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCContainerDecl::instance_methods(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), and WarnUndefinedMethod().

Referenced by CheckCategoryVsClassMethodMatches(), and ImplMethodsVsClassMethods().

TemplateParameterList * Sema::MatchTemplateParametersToScopeSpecifier ( SourceLocation  DeclStartLoc,
SourceLocation  DeclLoc,
const CXXScopeSpec SS,
TemplateIdAnnotation TemplateId,
ArrayRef< TemplateParameterList * >  ParamLists,
bool  IsFriend,
bool IsExplicitSpecialization,
bool Invalid 
)

Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name.

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.
TemplateIdThe template-id following the scope specifier, if there is one. Used to check for a missing 'template<>'.
ParamListsthe template parameter lists, from the outermost to the innermost template parameter lists.
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 1613 of file SemaTemplate.cpp.

References Context, clang::TemplateParameterList::Create(), clang::FixItHint::CreateInsertion(), DependsOnTemplateParameters(), Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::DeclContext::getParent(), getRangeOfTypeInNestedNameSpecifier(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::RAngleLoc, Record, and clang::TSK_ExplicitSpecialization.

Referenced by ActOnTemplatedFriendTag().

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 2184 of file SemaDeclObjC.cpp.

References Context, getLangOpts(), clang::ObjCMethodDecl::getReturnType(), clang::Decl::hasAttr(), clang::NamedDecl::isHidden(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by ActOnAtEnd(), addMethodToGlobalList(), DiagnoseClassExtensionDupMethods(), and HelperToDiagnoseMismatchedMethodsInGlobalPool().

MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr. Otherwise it simply returns the passed in expression.

Definition at line 4845 of file SemaExprCXX.cpp.

References Bind, clang::ASTContext::BoundMemberTy, CheckDestructorAccess(), clang::CK_ARCConsumeObject, clang::CK_ARCReclaimReturnedObject, Context, clang::CXXTemporary::Create(), clang::CXXBindTemporaryExpr::Create(), clang::ImplicitCastExpr::Create(), DiagnoseUseOfDecl(), clang::ExprError(), ExprEvalContexts, ExprNeedsCleanups, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::RecordType::getDecl(), getElementType(), clang::Expr::getExprLoc(), clang::FunctionType::getExtInfo(), getLangOpts(), clang::ObjCMethodDecl::getMethodFamily(), clang::Type::getPointeeType(), clang::FunctionType::ExtInfo::getProducesResult(), clang::Expr::getType(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::Expr::IgnoreParens(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCRetainableType(), clang::Expr::isRValue(), clang::FunctionDecl::isTrivial(), LookupDestructor(), MarkFunctionReferenced(), clang::OMF_performSelector, PDiag(), Record, and clang::VK_RValue.

Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXCastArgument(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), CopyObject(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().

This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators.

Definition at line 5357 of file SemaExpr.cpp.

References clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getLParenLoc(), clang::ParenListExpr::getNumExprs(), and clang::ParenListExpr::getRParenLoc().

Referenced by ActOnInstanceMessage(), and ActOnStartCXXMemberReference().

AvailabilityAttr * Sema::mergeAvailabilityAttr ( NamedDecl D,
SourceRange  Range,
IdentifierInfo Platform,
VersionTuple  Introduced,
VersionTuple  Deprecated,
VersionTuple  Obsoleted,
bool  IsUnavailable,
StringRef  Message,
bool  Override,
unsigned  AttrSpellingListIndex 
)
bool Sema::MergeCompatibleFunctionDecls ( FunctionDecl New,
FunctionDecl Old,
Scope S,
bool  MergeTypeWithOld 
)

Completes the merge of two function declarations that are known to be compatible.

This routine handles the merging of attributes and other properties of function declarations from the old declaration to the new declaration, once we know that New is in fact a redeclaration of Old.

Returns:
false

Definition at line 2996 of file SemaDecl.cpp.

References Context, clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::FunctionDecl::isPure(), clang::Decl::isUsed(), mergeParamDeclAttributes(), clang::ASTContext::mergeTypes(), clang::Decl::setIsUsed(), clang::FunctionDecl::setPure(), and clang::ValueDecl::setType().

MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that they have the same type. Subroutine of MergeFunctionDecl. Returns true if there was an error, false otherwise.

Definition at line 423 of file SemaDeclCXX.cpp.

References CheckEquivalentExceptionSpec(), Diag(), clang::Decl::FOK_Undeclared, functionDeclHasDefaultArgument(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArgRange(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getFriendObjectKind(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), getSpecialMember(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::FunctionDecl::isConstexpr(), isDeclInScope(), clang::FunctionDecl::isDefined(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isInlined(), clang::Decl::isLocalExternDecl(), clang::DeclContext::isRecord(), Record, clang::ParmVarDecl::setDefaultArg(), clang::ParmVarDecl::setHasInheritedDefaultArg(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

DLLExportAttr * Sema::mergeDLLExportAttr ( Decl D,
SourceRange  Range,
unsigned  AttrSpellingListIndex 
)
DLLImportAttr * Sema::mergeDLLImportAttr ( Decl D,
SourceRange  Range,
unsigned  AttrSpellingListIndex 
)
FormatAttr * Sema::mergeFormatAttr ( Decl D,
SourceRange  Range,
IdentifierInfo Format,
int  FormatIdx,
int  FirstArg,
unsigned  AttrSpellingListIndex 
)

Definition at line 2526 of file SemaDeclAttr.cpp.

References Context, and clang::Decl::specific_attrs().

Referenced by handleFormatAttr(), and mergeDeclAttribute().

bool Sema::MergeFunctionDecl ( FunctionDecl New,
NamedDecl *&  OldD,
Scope S,
bool  MergeTypeWithOld 
)

MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'. Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.

In C++, New and Old must be declarations that are not overloaded. Use IsOverload to determine whether New and Old are overloaded, and to select the Old declaration that New should be merged with.

Returns true if there was an error, false otherwise.

Definition at line 2472 of file SemaDecl.cpp.

References clang::ASTContext::adjustFunctionType(), clang::ASTContext::BuiltinInfo, canRedefineFunction(), clang::Type::castAs(), Context, clang::frontend::CPlusPlus, clang::ParmVarDecl::Create(), clang::ASTContext::DependentTy, Diag(), clang::DeclContext::Equals(), clang::Decl::FOK_None, clang::Type::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::ASTContext::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::Type::getContainedAutoType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::AutoType::getDeducedType(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionType::getNameForCallConv(), clang::FunctionType::ExtInfo::getNoReturn(), getNoteDiagForInvalidRedeclaration(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionType::ExtInfo::getProducesResult(), clang::DeclContext::getRedeclContext(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getRegParmType(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::FunctionDecl::hasPrototype(), clang::ASTContext::hasSameType(), haveIncompatibleLanguageLinkages(), clang::QualType::isCanonical(), clang::NamedDecl::isCXXClassMember(), clang::AutoType::isDeduced(), clang::FunctionDecl::isDefined(), clang::Type::isDependentType(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isExternC(), clang::DeclContext::isFunctionOrMethod(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::FunctionDecl::isOutOfLine(), clang::Builtin::Context::isPredefinedLibFunction(), clang::CXXMethodDecl::isStatic(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isTrivial(), clang::Decl::isUsed(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Builtin::NotBuiltin, clang::SC_None, clang::SC_Static, clang::IdentifierInfo::setBuiltinID(), clang::FunctionDecl::setHasInheritedPrototype(), clang::Decl::setImplicit(), clang::ParmVarDecl::setScopeInfo(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), clang::ASTContext::typesAreCompatible(), Warnings, clang::FunctionType::ExtInfo::withCallingConv(), clang::FunctionType::ExtInfo::withNoReturn(), clang::FunctionType::ExtInfo::withProducesResult(), and clang::FunctionType::ExtInfo::withRegParm().

MSInheritanceAttr * Sema::mergeMSInheritanceAttr ( Decl D,
SourceRange  Range,
bool  BestCase,
unsigned  AttrSpellingListIndex,
MSInheritanceAttr::Spelling  SemanticSpelling 
)
SectionAttr * Sema::mergeSectionAttr ( Decl D,
SourceRange  Range,
StringRef  Name,
unsigned  AttrSpellingListIndex 
)
void Sema::MergeTypedefNameDecl ( TypedefNameDecl New,
LookupResult OldDecls 
)
TypeVisibilityAttr * Sema::mergeTypeVisibilityAttr ( Decl D,
SourceRange  Range,
TypeVisibilityAttr::VisibilityType  Vis,
unsigned  AttrSpellingListIndex 
)

Definition at line 1985 of file SemaDeclAttr.cpp.

Referenced by handleVisibilityAttr(), and mergeDeclAttribute().

void Sema::MergeVarDecl ( VarDecl New,
LookupResult Previous 
)

MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.

Tentative definition rules (C99 6.9.2p2) are checked by FinalizeDeclaratorGroup. Unfortunately, we can't analyze tentative definitions here, since the initializer hasn't been attached.

Definition at line 3175 of file SemaDecl.cpp.

References clang::frontend::CPlusPlus, clang::VarDecl::Definition, Diag(), clang::Decl::dropAttr(), clang::Decl::getAccess(), clang::VarDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), getNoteDiagForInvalidRedeclaration(), clang::LookupResult::getRepresentativeDecl(), clang::VarDecl::getStorageClass(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTLSKind(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::NamedDecl::hasLinkage(), haveIncompatibleLanguageLinkages(), clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::Decl::isUsed(), mergeTypeWithPrevious(), clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Decl::setIsUsed(), clang::Redeclarable< decl_type >::setPreviousDecl(), and clang::VarDecl::TLS_Dynamic.

Referenced by InstantiateVariableDefinition().

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

References CheckEquivalentExceptionSpec(), Context, clang::Type::getAs(), getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isFunctionProtoType(), P, and clang::Decl::setInvalidDecl().

void Sema::MergeVarDeclTypes ( VarDecl New,
VarDecl Old,
bool  MergeTypeWithOld 
)

MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. Figure out how to merge their types, emitting diagnostics as appropriate.

Declarations using the auto type specifier (C++ [decl.spec.auto]) call back to here in AddInitializerToDecl. We can't check them before the initializer is attached.

Definition at line 3057 of file SemaDecl.cpp.

References Context, clang::ASTContext::DependentTy, Diag(), clang::ASTContext::getAsArrayType(), clang::NamedDecl::getDeclName(), clang::ArrayType::getElementType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isUndeducedType(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().

VisibilityAttr * Sema::mergeVisibilityAttr ( Decl D,
SourceRange  Range,
VisibilityAttr::VisibilityType  Vis,
unsigned  AttrSpellingListIndex 
)

Definition at line 1978 of file SemaDeclAttr.cpp.

Referenced by handleVisibilityAttr(), and mergeDeclAttribute().

void Sema::NoteAllOverloadCandidates ( Expr E,
QualType  DestType = QualType() 
)
void Sema::NoteHiddenVirtualMethods ( CXXMethodDecl MD,
SmallVectorImpl< CXXMethodDecl * > &  OverloadedMethods 
)
void Sema::NoteOverloadCandidate ( FunctionDecl Fn,
QualType  DestType = QualType() 
)

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. "struct foo;") is parsed.

Definition at line 3358 of file SemaDecl.cpp.

Decl * Sema::ParsedFreeStandingDeclSpec ( Scope S,
AccessSpecifier  AS,
DeclSpec DS,
MultiTemplateParamsArg  TemplateParams,
bool  IsExplicitInstantiation = false 
)

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. "struct foo;") is parsed. It also accepts template parameters to cope with template friend declarations.

Definition at line 3393 of file SemaDecl.cpp.

References Context, clang::frontend::CPlusPlus, clang::FixItHint::CreateRemoval(), Diag(), clang::ParsedAttributes::empty(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAsStructureType(), clang::Type::getAsUnionType(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getAttributes(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParsedAttributes::getList(), clang::AttributeList::getLoc(), clang::DeclSpec::getLocStart(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::AttributeList::getName(), clang::AttributeList::getNext(), clang::ASTContext::getPrintingPolicy(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TagDecl::getTagKind(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecScope(), clang::DeclSpec::getTypeSpecType(), HandleTagNumbering(), clang::TagDecl::isCompleteDefinition(), clang::DeclSpec::isConstexprSpecified(), clang::DeclSpec::isExternInLinkageSpec(), clang::DeclSpec::isFriendSpecified(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isMissingDeclaratorOk(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::TagDecl::isUnion(), Record, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TagDecl::setFreeStanding(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_volatile, clang::DeclSpec::TST_class, clang::TST_enum, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_error, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, clang::TST_typename, and clang::DeclSpec::TST_union.

ExprResult Sema::ParseObjCProtocolExpression ( IdentifierInfo ProtocolName,
SourceLocation  AtLoc,
SourceLocation  ProtoLoc,
SourceLocation  LParenLoc,
SourceLocation  ProtoIdLoc,
SourceLocation  RParenLoc 
)
ExprResult Sema::ParseObjCSelectorExpression ( Selector  Sel,
SourceLocation  AtLoc,
SourceLocation  SelLoc,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
bool  WarnMultipleSelectors 
)
ExprResult Sema::ParseObjCStringLiteral ( SourceLocation AtLocs,
Expr **  Strings,
unsigned  NumStrings 
)
PartialDiagnostic clang::Sema::PDiag ( unsigned  DiagID = 0) [inline]

Perform a contextual implicit conversion.

Attempt to convert the given expression to a type which is accepted by the given converter.

This routine will attempt to convert an expression of class type to a type accepted by the specified converter. In C++11 and before, the class must have a single non-explicit conversion function converting to a matching type. In C++1y, there can be multiple such conversion functions, but only one target type.

Parameters:
LocThe source location of the construct that requires the conversion.
FromThe expression we're converting from.
ConverterUsed to control and diagnose the conversion process.
Returns:
The expression, converted to an integral or enumeration type if successful.

Definition at line 5266 of file SemaOverload.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::OverloadCandidateSet::BestViableFunction(), CheckPlaceholderExpr(), collectViableConversionCandidates(), clang::frontend::CPlusPlus14, clang::OverloadCandidateSet::CSK_Normal, DefaultLvalueConversion(), diagnoseAmbiguousConversion(), clang::Sema::ContextualImplicitConverter::diagnoseIncomplete(), clang::Sema::ContextualImplicitConverter::diagnoseNoMatch(), diagnoseNoViableConversion(), clang::ExprError(), finishContextualImplicitConversion(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::RecordType::getDecl(), getLangOpts(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::DeclAccessPair::make(), clang::Sema::ContextualImplicitConverter::match(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, recordConversion(), RequireCompleteType(), clang::UnresolvedSetImpl::size(), and clang::Sema::ContextualImplicitConverter::Suppress.

Referenced by ActOnCXXDelete(), BuildCXXNew(), PerformOpenMPImplicitIntegerConversion(), and VerifyIntegerConstantExpression().

PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.

Definition at line 5103 of file SemaOverload.cpp.

References AA_Converting, checkPlaceholderForOverload(), Context, clang::ExprError(), clang::ASTContext::getObjCIdType(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and TryContextuallyConvertToObjCPointer().

Referenced by BuildInstanceMessage().

ExprResult Sema::PerformCopyInitialization ( const InitializedEntity Entity,
SourceLocation  EqualLoc,
ExprResult  Init,
bool  TopLevelOfInitList = false,
bool  AllowExplicit = false 
)
void Sema::PerformDependentDiagnostics ( const DeclContext Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)
ExprResult Sema::PerformImplicitConversion ( Expr From,
QualType  ToType,
AssignmentAction  Action,
bool  AllowExplicit = false 
)

PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType. Returns the converted expression. Flavor is the kind of conversion we're performing, used in the error message. If AllowExplicit, explicit user-defined conversions are permitted.

Definition at line 1251 of file SemaOverload.cpp.

Referenced by BuildCounterUpdate(), BuildCXXNew(), CheckConvertedConstantExpression(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), FindConditionalOverload(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), and WidenIterationCount().

ExprResult Sema::PerformImplicitConversion ( Expr From,
QualType  ToType,
AssignmentAction  Action,
bool  AllowExplicit,
ImplicitConversionSequence ICS 
)

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

References AA_Converting, clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), clang::CK_ConstructorConversion, clang::CK_UserDefinedConversion, Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), clang::UserDefinedConversionSequence::EllipsisConversion, clang::ImplicitConversionSequence::EllipsisConversion, clang::ExprError(), clang::UserDefinedConversionSequence::FoundConversionFunction, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::Stmt::getLocStart(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::Stmt::getSourceRange(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), PDiag(), PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ImplicitConversionSequence::UserDefined, and clang::ImplicitConversionSequence::UserDefinedConversion.

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

References AA_Assigning, AA_Casting, AA_Initializing, clang::ASTContext::BoolTy, BuildCXXConstructExpr(), clang::Type::castAs(), CCK_CStyleCast, CCK_FunctionalCast, CheckDerivedToBaseConversion(), CheckExceptionSpecCompatibility(), CheckMemberPointerConversion(), CheckObjCARCConversion(), CheckObjCARCUnavailableWeakConversion(), CheckPointerConversion(), CheckTransparentUnionArgumentConstraints(), 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_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_Invalid, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_VectorSplat, clang::CK_ZeroToOCLEvent, Compatible, CompleteConstructorCall(), Context, clang::StandardConversionSequence::CopyConstructor, DefaultLvalueConversion(), clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, Diag(), DiagnoseUseOfDecl(), EmitRelatedResultTypeNote(), clang::ExprError(), clang::StandardConversionSequence::First, FixOverloadedFunctionReference(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::EnumType::getDecl(), clang::ComplexType::getElementType(), getElementType(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getLocStart(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Expr::getObjectKind(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::AtomicType::getValueType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ICK_Array_To_Pointer, clang::ICK_Block_Pointer_Conversion, clang::ICK_Boolean_Conversion, clang::ICK_Compatible_Conversion, clang::ICK_Complex_Conversion, clang::ICK_Complex_Promotion, clang::ICK_Complex_Real, clang::ICK_Derived_To_Base, clang::ICK_Floating_Conversion, clang::ICK_Floating_Integral, clang::ICK_Floating_Promotion, clang::ICK_Function_To_Pointer, clang::ICK_Identity, clang::ICK_Integral_Conversion, clang::ICK_Integral_Promotion, clang::ICK_Lvalue_To_Rvalue, clang::ICK_NoReturn_Adjustment, clang::ICK_Num_Conversion_Kinds, clang::ICK_Pointer_Conversion, clang::ICK_Pointer_Member, clang::ICK_Qualification, clang::ICK_TransparentUnionConversion, clang::ICK_Vector_Conversion, clang::ICK_Vector_Splat, clang::ICK_Writeback_Conversion, clang::ICK_Zero_Event_Conversion, ImpCastExprToType(), clang::StandardConversionSequence::IncompatibleObjC, clang::Type::isBooleanType(), clang::EnumDecl::isFixed(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::OK_ObjCProperty, clang::ASTContext::OverloadTy, PrepareCastToObjCObjectPointer(), RequireCompleteType(), ResolveAddressOfOverloadedFunction(), ScalarTypeToBooleanCastKind(), clang::StandardConversionSequence::Second, clang::StandardConversionSequence::Third, and clang::VK_RValue.

Perform conversions on the LHS of a member access expression.

Definition at line 1160 of file SemaExprMember.cpp.

References clang::Expr::getType(), and clang::Type::isFunctionType().

Referenced by LookupMemberExpr().

ExprResult Sema::PerformMoveOrCopyInitialization ( const InitializedEntity Entity,
const VarDecl NRVOCandidate,
QualType  ResultType,
Expr Value,
bool  AllowNRVO = true 
)

Perform the initialization of a potentially-movable value, which is the result of return value.

This routine implements C++0x [class.copy]p33, which attempts to treat returned lvalues as rvalues in certain cases (to prefer move construction), then falls back to treating them as lvalues if that failed.

Definition at line 2506 of file SemaStmt.cpp.

References clang::CK_NoOp, Context, clang::ImplicitCastExpr::Create(), clang::InitializationKind::CreateCopy(), clang::ExprError(), clang::Type::getAs(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ImplicitCastExpr::OnStack, clang::InitializationSequence::SK_ConstructorInitialization, and clang::VK_XValue.

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

References clang::CK_UncheckedDerivedToBase, Context, clang::ExprError(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), and clang::Type::isRecordType().

Referenced by BuildFieldReferenceExpr(), and PerformObjectArgumentInitialization().

Definition at line 1138 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().

void Sema::PopFunctionScopeInfo ( const sema::AnalysisBasedWarnings::Policy WP = nullptr,
const Decl D = nullptr,
const BlockExpr blkExpr = nullptr 
)

Definition at line 3317 of file Sema.h.

References clang::Sema::DelayedDiagnostics::popUndelayed().

void Sema::PopParsingDeclaration ( ParsingDeclState  state,
Decl decl 
)
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 585 of file SemaAttr.cpp.

References Diag(), FreeVisContext(), NoVisibility, Stack, and VisContext.

Referenced by ActOnFinishNamespaceDef(), and ActOnPragmaVisibility().

Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.

Definition at line 4937 of file SemaExpr.cpp.

References clang::Type::castAs(), clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingComplexToBoolean, clang::CK_FloatingComplexToIntegralComplex, clang::CK_FloatingComplexToReal, clang::CK_FloatingRealToComplex, clang::CK_FloatingToBoolean, clang::CK_FloatingToIntegral, clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralComplexToBoolean, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralComplexToReal, clang::CK_IntegralRealToComplex, clang::CK_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_IntegralToPointer, clang::CK_NoOp, clang::CK_NullToPointer, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), getElementType(), clang::Type::getPointeeType(), clang::Type::getScalarTypeKind(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isNullPointerConstant(), maybeExtendBlockObject(), clang::Expr::NPC_ValueDependentIsNull, clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.

Referenced by CXXCheckConditionalOperands().

void Sema::PrintStats ( ) const

Print out statistics about the semantic analysis.

Definition at line 301 of file Sema.cpp.

References AnalysisWarnings, BumpAlloc, NumSFINAEErrors, and clang::sema::AnalysisBasedWarnings::PrintStats().

Referenced by clang::ParseAST().

Definition at line 4742 of file SemaDeclAttr.cpp.

References Diag(), clang::AttributeList::getNext(), and handleAnnotateAttr().

Referenced by ActOnAccessSpecifier().

void Sema::ProcessDeclAttributeList ( Scope S,
Decl D,
const AttributeList AttrList,
bool  IncludeCXX11Attributes = true 
)
void Sema::ProcessDeclAttributes ( Scope S,
Decl D,
const Declarator PD 
)

ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D. This is a bit tricky because PD can have attributes specified in many different places, and we need to find and apply them all.

Definition at line 4886 of file SemaDeclAttr.cpp.

References clang::DeclSpec::getAttributes(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclSpec(), clang::ParsedAttributes::getList(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), and ProcessDeclAttributeList().

Referenced by ActOnExceptionDeclarator(), ActOnObjCExceptionDecl(), CreatePropertyDecl(), HandleMSProperty(), and HandlePropertyInClassExtension().

void Sema::ProcessPragmaWeak ( Scope S,
Decl D 
)
void Sema::ProcessPropertyDecl ( ObjCPropertyDecl property,
ObjCContainerDecl CD,
ObjCPropertyDecl redeclaredProperty = nullptr,
ObjCContainerDecl lexicalDC = nullptr 
)

Process the specified property declaration and create decls for the setters and getters as needed.

Parameters:
propertyThe property declaration being processed
CDThe 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 1907 of file SemaObjCProperty.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), CheckARCMethodDecl(), CheckObjCMethodOverrides(), Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), Diag(), DiagnosePropertyAccessorMismatch(), clang::Decl::getAttr(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCPropertyDecl::getSetterName(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Decl::isInvalidDecl(), 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, RTC_Unknown, clang::SC_None, clang::Decl::setLexicalDeclContext(), clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setPropertyAccessor(), and clang::ASTContext::VoidTy.

Referenced by ActOnAtEnd(), and HandlePropertyInClassExtension().

Stmt attributes - this routine is the top level dispatcher.

Definition at line 214 of file SemaStmtAttr.cpp.

References CheckForIncompatibleAttributes(), clang::SourceRange::getBegin(), clang::AttributeList::getNext(), ProcessStmtAttribute(), and S.

void Sema::PushBlockScope ( Scope BlockScope,
BlockDecl Block 
)

Definition at line 1098 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

void Sema::PushCapturedRegionScope ( Scope RegionScope,
CapturedDecl CD,
RecordDecl RD,
CapturedRegionKind  K 
)

Definition at line 1134 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().

void Sema::PushDeclContext ( Scope S,
DeclContext DC 
)

Set the current declaration context until it gets popped.

Definition at line 1030 of file SemaDecl.cpp.

References clang::Scope::setEntity().

Referenced by ActOnStartDelayedMemberDeclarations(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), and ActOnStartOfObjCMethodDef().

void Sema::PushExpressionEvaluationContext ( ExpressionEvaluationContext  NewContext,
Decl LambdaContextDecl = nullptr,
bool  IsDecltype = false 
)

Definition at line 11296 of file SemaExpr.cpp.

References ExprEvalContexts, and PushExpressionEvaluationContext().

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

Definition at line 1103 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

Referenced by RebuildLambdaScopeInfo().

void Sema::PushNamespaceVisibilityAttr ( const VisibilityAttr *  Attr,
SourceLocation  Loc 
)

PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.

Definition at line 576 of file SemaAttr.cpp.

References NoVisibility, and PushPragmaVisibility().

Referenced by ActOnStartNamespaceDef().

void Sema::PushOnScopeChains ( NamedDecl D,
Scope S,
bool  AddToContext = true 
)

Definition at line 3314 of file Sema.h.

References clang::Sema::DelayedDiagnostics::pushUndelayed().

Read the contents of the method pool for a given selector from external storage.

Definition at line 2279 of file SemaDeclObjC.cpp.

References clang::ExternalSemaSource::ReadMethodPool().

Referenced by AddClassMessageCompletions(), and CollectMultipleMethodsInGlobalPool().

Definition at line 8070 of file SemaTemplate.cpp.

References clang::Expr::getExprLoc().

Referenced by RebuildDeclaratorInCurrentInstantiation().

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

References clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().

Referenced by RebuildDeclaratorInCurrentInstantiation().

This is used to inform Sema what the current TemplateParameterDepth is during Parsing. Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.

Definition at line 1109 of file Sema.cpp.

References Depth, and getCurLambda().

template<typename ExprT >
void clang::Sema::recordUseOfEvaluatedWeak ( const ExprT *  E,
bool  IsRead = true 
) [inline]

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 1612 of file SemaPseudoObject.cpp.

References Context, clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), and stripOpaqueValuesFromPseudoObjectRef().

Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context instead of in the given pool. Essentially, this just moves them to the current pool.

Definition at line 5088 of file SemaDeclAttr.cpp.

References clang::Sema::DelayedDiagnostics::getCurrentPool(), and clang::sema::DelayedDiagnosticPool::steal().

Referenced by clang::SuppressAccessChecks::redelay().

Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations. We include any extern "C" declaration that is not visible in the translation unit here, not just function-scope declarations.

Definition at line 4804 of file SemaDecl.cpp.

References clang::frontend::CPlusPlus, clang::NamedDecl::getDeclName(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isTranslationUnit().

void Sema::RegisterTypeTagForDatatype ( const IdentifierInfo ArgumentKind,
uint64_t  MagicValue,
QualType  Type,
bool  LayoutCompatible,
bool  MustBeNull 
)

Register a magic integral constant to be used as a type tag.

Definition at line 8502 of file SemaChecking.cpp.

Require that the context specified by SS be complete.

If SS refers to a type, this routine checks whether the type is complete enough (or can be made complete enough) for name lookup into the DeclContext. A type that is not yet completed can be considered "complete enough" if it is a class/struct/union/enum that is currently being defined. Or, if we have a type that names a class template specialization that is not a complete type, we will attempt to instantiate that class template.

Definition at line 191 of file SemaCXXScopeSpec.cpp.

References Context, Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::EnumType::getDecl(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::EnumDecl::getMemberSpecializationInfo(), clang::CXXScopeSpec::getRange(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTContext::getTypeDeclType(), InstantiateEnum(), clang::TagType::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), RequireCompleteType(), clang::CXXScopeSpec::SetInvalid(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::ast_matchers::type.

Referenced by ActOnCXXEnterDeclaratorScope(), ActOnFriendFunctionDecl(), BuildCXXNestedNameSpecifier(), BuildUsingDeclaration(), CheckUsingDeclQualifier(), isNonTypeNestedNameSpecifier(), LookupMemberExprInRecord(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

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.
DiagnoserThe object that will emit a diagnostic if the type is incomplete.
Returns:
true if the type of E is incomplete and diagnosed, false otherwise.

Definition at line 4968 of file SemaType.cpp.

References clang::Type::getAs(), getASTMutationListener(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::Expr::getType(), clang::Expr::IgnoreParens(), InstantiateVariableDefinition(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::SourceLocation::isInvalid(), clang::isTemplateInstantiation(), RequireCompleteType(), clang::VarTemplateSpecializationDecl::setPointOfInstantiation(), and clang::Expr::setType().

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), and RequireCompleteExprType().

Definition at line 5047 of file SemaType.cpp.

References RequireCompleteExprType().

template<typename T1 >
bool clang::Sema::RequireCompleteExprType ( Expr E,
unsigned  DiagID,
const T1 &  Arg1 
) [inline]

Definition at line 1352 of file Sema.h.

References RequireCompleteExprType().

template<typename T1 , typename T2 >
bool clang::Sema::RequireCompleteExprType ( Expr E,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2 
) [inline]

Definition at line 1358 of file Sema.h.

References RequireCompleteExprType().

template<typename T1 , typename T2 , typename T3 >
bool clang::Sema::RequireCompleteExprType ( Expr E,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2,
const T3 &  Arg3 
) [inline]

Definition at line 1365 of file Sema.h.

References RequireCompleteExprType().

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.
Returns:
true if T is incomplete and a diagnostic was emitted, false otherwise.

Definition at line 5069 of file SemaType.cpp.

References Consumer, clang::Type::getAs(), and clang::ASTConsumer::HandleTagDeclRequiredDefinition().

Referenced by ActOnCXXDelete(), ActOnEndOfTranslationUnit(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPPrivateClause(), ActOnOpenMPReductionClause(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), AddConversionCandidate(), AddMemberOperatorCandidates(), BuildArrayType(), BuildAtomicType(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildCXXTypeConstructExpr(), BuildExceptionDeclaration(), BuildInstanceMessage(), BuildOverloadedArrowExpr(), captureInLambda(), CheckAllocatedType(), checkArithmeticIncompletePointerType(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCommaOperands(), CheckForModifiableLvalue(), CheckMessageArgumentTypes(), CheckOMPThreadPrivateDecl(), CheckOverridingFunctionReturnType(), CheckPointerToMemberOperands(), CheckSpecifiedExceptionType(), CheckTemplateArgumentPointerToMember(), CheckUnaryTypeTraitTypeCompleteness(), CompareReferenceRelationship(), CopyObject(), DeduceTemplateArgumentsByTypeMatch(), clang::InitializationSequence::Diagnose(), DiagnoseMultipleUserDefinedConversion(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), FindInstantiatedDecl(), HandleExprPropertyRefExpr(), IgnoredValueConversions(), IsUserDefinedConversion(), LookupMemberExpr(), LookupMemberExprInRecord(), PerformContextualImplicitConversion(), PerformImplicitConversion(), RequireCompleteDeclContext(), RequireCompleteExprType(), RequireCompleteType(), RequireLiteralType(), SetParamDefaultArgument(), TryConstructorInitialization(), TryInitializerListConstruction(), TryListConversion(), TryListInitialization(), TryReferenceInit(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticDowncast(), TryStaticImplicitCast(), TryStaticMemberPointerUpcast(), and TryUserDefinedConversion().

Definition at line 5295 of file SemaType.cpp.

References RequireCompleteType().

template<typename T1 >
bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1 
) [inline]

Definition at line 1326 of file Sema.h.

References RequireCompleteType().

template<typename T1 , typename T2 >
bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2 
) [inline]

Definition at line 1333 of file Sema.h.

References RequireCompleteType().

template<typename T1 , typename T2 , typename T3 >
bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2,
const T3 &  Arg3 
) [inline]

Definition at line 1340 of file Sema.h.

References RequireCompleteType().

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.
DiagnoserEmits a diagnostic if T is not a literal type.
Returns:
true if T is not a literal type and a diagnostic was emitted, false otherwise.

Definition at line 5333 of file SemaType.cpp.

References clang::CXXRecordDecl::bases(), Context, CXXDestructor, Diag(), clang::Sema::TypeDiagnoser::diagnose(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDestructor(), getLiteralDiagFromTagKind(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::TagDecl::getTagKind(), clang::CXXRecordDecl::hasConstexprNonCopyMoveConstructor(), clang::CXXRecordDecl::hasNonLiteralTypeFieldsOrBases(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::isAggregate(), clang::TagDecl::isCompleteDefinition(), clang::Type::isDependentType(), clang::Type::isLiteralType(), clang::CXXMethodDecl::isUserProvided(), clang::Type::isVariableArrayType(), RequireCompleteType(), SpecialMemberIsTrivial(), clang::Sema::TypeDiagnoser::Suppressed, and clang::CXXRecordDecl::vbases().

Referenced by CheckCompletedCXXClass(), CheckConstexprDeclStmt(), CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), and RequireLiteralType().

Definition at line 5414 of file SemaType.cpp.

References RequireLiteralType().

template<typename T1 >
bool clang::Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1 
) [inline]

Definition at line 1377 of file Sema.h.

References RequireLiteralType().

template<typename T1 , typename T2 >
bool clang::Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2 
) [inline]

Definition at line 1384 of file Sema.h.

References RequireLiteralType().

template<typename T1 , typename T2 , typename T3 >
bool clang::Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2,
const T3 &  Arg3 
) [inline]

Definition at line 1391 of file Sema.h.

References RequireLiteralType().

template<typename T1 >
bool clang::Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1 
) [inline]

Definition at line 5278 of file Sema.h.

References RequireNonAbstractType().

template<typename T1 , typename T2 >
bool clang::Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2 
) [inline]

Definition at line 5286 of file Sema.h.

References RequireNonAbstractType().

template<typename T1 , typename T2 , typename T3 >
bool clang::Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const T1 &  Arg1,
const T2 &  Arg2,
const T3 &  Arg3 
) [inline]

Definition at line 5294 of file Sema.h.

References RequireNonAbstractType().

Definition at line 4343 of file SemaDeclCXX.cpp.

References Diag(), and RequireNonAbstractType().

FunctionDecl * Sema::ResolveAddressOfOverloadedFunction ( Expr AddressOfExpr,
QualType  TargetType,
bool  Complain,
DeclAccessPair FoundResult,
bool pHadMultipleCandidates = nullptr 
)

ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to. For example:

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

References CheckAddressOfMemberAccess(), Context, clang::Expr::getType(), and clang::ASTContext::OverloadTy.

Referenced by clang::InitializationSequence::Diagnose(), clang::InitializationSequence::InitializeFrom(), IsStandardConversion(), PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), TryReferenceInit(), and TryStaticMemberPointerUpcast().

bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization ( ExprResult SrcExpr,
bool  DoFunctionPointerConverion = false,
bool  Complain = false,
const SourceRange OpRangeForComplaining = SourceRange(),
QualType  DestTypeForComplaining = QualType(),
unsigned  DiagIDForComplaining = 0 
)
FunctionDecl * Sema::ResolveSingleFunctionTemplateSpecialization ( OverloadExpr ovl,
bool  Complain = false,
DeclAccessPair FoundResult = nullptr 
)

Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.

This routine can only resolve template-ids that refer to a single function template, where that template-id refers to a single template whose template arguments are either provided by the template-id or have defaults, as described in C++0x [temp.arg.explicit]p3.

If no template-ids are found, no diagnostics are emitted and NULL is returned.

Definition at line 10133 of file SemaOverload.cpp.

References Context, clang::ASTTemplateArgumentListInfo::copyInto(), clang::frontend::CPlusPlus14, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceReturnType(), DeduceTemplateArguments(), Diag(), clang::OverloadExpr::getExplicitTemplateArgs(), clang::Expr::getExprLoc(), getLangOpts(), clang::OverloadExpr::getName(), clang::OverloadExpr::getNameLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::MakeDeductionFailureInfo(), and NoteAllOverloadCandidates().

Referenced by handleCleanupAttr(), ResolveAndFixSingleFunctionTemplateSpecialization(), and ResolveOverloadForDeduction().

void Sema::RestoreNestedNameSpecifierAnnotation ( void *  Annotation,
SourceRange  AnnotationRange,
CXXScopeSpec SS 
)

Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.

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

References clang::CXXScopeSpec::Adopt(), and clang::CXXScopeSpec::SetInvalid().

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 936 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().

ExprResult Sema::SemaConvertVectorExpr ( Expr E,
TypeSourceInfo TInfo,
SourceLocation  BuiltinLoc,
SourceLocation  RParenLoc 
)
bool Sema::SetCtorInitializers ( CXXConstructorDecl Constructor,
bool  AnyErrors,
ArrayRef< CXXCtorInitializer * >  Initializers = None 
)
void Sema::SetDeclDefaulted ( Decl dcl,
SourceLocation  DefaultLoc 
)
void Sema::SetDeclDeleted ( Decl dcl,
SourceLocation  DelLoc 
)
void Sema::SetIvarInitializers ( ObjCImplementationDecl ObjCImplementation)
void clang::Sema::SetLateTemplateParser ( LateTemplateParserCB LTP,
LateTemplateParserCleanupCB LTPCleanup,
void *  P 
) [inline]

Definition at line 489 of file Sema.h.

References LateTemplateParser, LateTemplateParserCleanup, OpaqueParser, and P.

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

bool Sema::SetMemberAccessSpecifier ( NamedDecl MemberDecl,
NamedDecl PrevMemberDecl,
AccessSpecifier  LexicalAS 
)

SetMemberAccessSpecifier - Set the access specifier of a member. Returns true on error (when the previous member decl access specifier is different from the new member decl access specifier).

Definition at line 39 of file SemaAccess.cpp.

References clang::AS_none, Diag(), clang::Decl::getAccess(), clang::Decl::getLocation(), and clang::Decl::setAccess().

bool Sema::SetParamDefaultArgument ( ParmVarDecl Param,
Expr DefaultArg,
SourceLocation  EqualLoc 
)
CXXMethodDecl * Sema::startLambdaDefinition ( CXXRecordDecl Class,
SourceRange  IntroducerRange,
TypeSourceInfo MethodType,
SourceLocation  EndLoc,
ArrayRef< ParmVarDecl * >  Params 
)
void Sema::StartOpenMPDSABlock ( OpenMPDirectiveKind  K,
const DeclarationNameInfo DirName,
Scope CurScope,
SourceLocation  Loc 
)

Called on start of new data sharing attribute block.

Definition at line 556 of file SemaOpenMP.cpp.

References DSAStack, PotentiallyEvaluated, and PushExpressionEvaluationContext().

stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.

Definition at line 3904 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 
)
QualType Sema::SubstAutoType ( QualType  TypeWithAuto,
QualType  Replacement 
)

Substitute Replacement for auto in TypeWithAuto.

Definition at line 4075 of file SemaTemplateDeduction.cpp.

Referenced by SubstAutoWithinFunctionReturnType().

TypeSourceInfo * Sema::SubstAutoTypeSourceInfo ( TypeSourceInfo TypeWithAuto,
QualType  Replacement 
)

Substitute Replacement for auto in TypeWithAuto.

Definition at line 4081 of file SemaTemplateDeduction.cpp.

bool Sema::SubstBaseSpecifiers ( CXXRecordDecl Instantiation,
CXXRecordDecl Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Perform substitution on the base class specifiers of the given class template specialization.

Produces a diagnostic and returns true on error, returns false and attaches the instantiated base classes to the class template specialization if successful.

Definition at line 1765 of file SemaTemplateInstantiate.cpp.

References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases(), CheckBaseSpecifier(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), Context, clang::Decl::setInvalidDecl(), and SubstType().

Referenced by InstantiateClass().

Decl * Sema::SubstDecl ( Decl D,
DeclContext Owner,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Do template substitution on declaration name info.

Definition at line 2735 of file SemaTemplateInstantiate.cpp.

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

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

TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable ( TemplateDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  RAngleLoc,
Decl Param,
SmallVectorImpl< TemplateArgument > &  Converted,
bool HasDefaultArg 
)
void Sema::SubstExceptionSpec ( FunctionDecl New,
const FunctionProtoType Proto,
const MultiLevelTemplateArgumentList Args 
)
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 2710 of file SemaTemplateInstantiate.cpp.

TypeSourceInfo * Sema::SubstFunctionDeclType ( TypeSourceInfo T,
const MultiLevelTemplateArgumentList Args,
SourceLocation  Loc,
DeclarationName  Entity,
CXXRecordDecl ThisContext,
unsigned  ThisTypeQuals 
)

A form of SubstType intended specifically for instantiating the type of a FunctionDecl. Its purpose is solely to force the instantiation of default-argument expressions and to avoid instantiating an exception-specification.

Definition at line 1586 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations, Context, clang::TypeLoc::getAs(), clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), clang::QualType::isNull(), NeedsInstantiationAsFunctionType(), and clang::TypeLocBuilder::reserve().

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

ExprResult Sema::SubstInitializer ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs,
bool  CXXDirectInit 
)
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.
ExplicitTemplateArgsthe 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 2504 of file SemaTemplateDeduction.cpp.

References Builder, Context, clang::frontend::CPlusPlus11, clang::TemplateArgumentList::CreateCopy(), clang::TemplateArgumentList::get(), clang::Type::getAs(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::TemplateArgument::getKind(), clang::sema::TemplateDeductionInfo::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::TemplateParameterList::getParam(), clang::DeclContext::getParent(), clang::FunctionType::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::FunctionProtoType::hasTrailingReturn(), clang::QualType::isNull(), makeTemplateParameter(), P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::params(), clang::sema::TemplateDeductionInfo::reset(), clang::TemplateParameterList::size(), clang::TemplateArgumentList::size(), clang::TemplateArgumentListInfo::size(), and Unevaluated.

bool Sema::SubstParmTypes ( SourceLocation  Loc,
ParmVarDecl **  Params,
unsigned  NumParams,
const MultiLevelTemplateArgumentList TemplateArgs,
SmallVectorImpl< QualType > &  ParamTypes,
SmallVectorImpl< ParmVarDecl * > *  OutParams = nullptr 
)

Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution.

Definition at line 1742 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations.

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

ParmVarDecl * Sema::SubstParmVarDecl ( ParmVarDecl D,
const MultiLevelTemplateArgumentList TemplateArgs,
int  indexAdjustment,
Optional< unsigned NumExpansions,
bool  ExpectParameterPack 
)
StmtResult Sema::SubstStmt ( Stmt S,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 2680 of file SemaTemplateInstantiate.cpp.

References S.

Referenced by InstantiateFunctionDefinition().

Definition at line 2743 of file SemaTemplateInstantiate.cpp.

References clang::CXXScopeSpec::Adopt().

Referenced by SubstDefaultTemplateArgument().

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.
Argsthe 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 1487 of file SemaTemplateInstantiate.cpp.

References ActiveTemplateInstantiations, clang::TypeSourceInfo::getType(), clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().

Referenced by addInstantiatedParametersToScope(), CompleteVarTemplateSpecializationDecl(), FinishTemplateArgumentDeduction(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), SubstBaseSpecifiers(), SubstDefaultTemplateArgument(), and SubstParmVarDecl().

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

References clang::TemplateParameterList::begin(), DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), MatchTemplateParameterKind(), and clang::TemplateParameterList::size().

Referenced by ActOnAliasDeclaration(), and MatchTemplateParameterKind().

Definition at line 11270 of file SemaExpr.cpp.

References ExprEvalContexts, and isUnevaluatedContext().

Referenced by HandleExprEvaluationContextForTypeof().

Translates template arguments as provided by the parser into template arguments used by semantic analysis.

Definition at line 521 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::LangAS::Last, and translateTemplateArgument().

Referenced by ActOnCXXNestedNameSpecifier(), and makeTemplateArgumentListInfo().

Try to capture an implicit reference to 'self'.

Definition at line 1124 of file SemaExprObjC.cpp.

References getFunctionLevelDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), and tryCaptureVariable().

Referenced by ActOnClassPropertyRefExpr(), and ActOnSuperMessage().

bool Sema::tryCaptureVariable ( VarDecl Var,
SourceLocation  Loc,
TryCaptureKind  Kind,
SourceLocation  EllipsisLoc,
bool  BuildAndDiagnose,
QualType CaptureType,
QualType DeclRefType,
const unsigned *const  FunctionScopeIndexToStopAt 
)

Try to capture the given variable.

Parameters:
VarThe variable to capture.
LocThe location at which the capture occurs.
KindThe kind of capture, which may be implicit (for either a block or a lambda), or explicit by-value or by-reference (for a lambda).
EllipsisLocThe location of the ellipsis, if one is provided in an explicit lambda capture.
BuildAndDiagnoseWhether we are actually supposed to add the captures or diagnose errors. If false, this routine merely check whether the capture can occur without performing the capture itself or complaining if the variable cannot be captured.
CaptureTypeWill be set to the type of the field used to capture this variable in the innermost block or lambda. Only valid when the variable can be captured.
DeclRefTypeWill be set to the type of a reference to the capture from within the current scope. Only valid when the variable can be captured.
FunctionScopeIndexToStopAtIf non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture variables that may or may not be used in certain specializations of a nested generic lambda.
Returns:
true if an error occurred (i.e., the variable cannot be captured) and false if the capture succeeded.

Definition at line 12097 of file SemaExpr.cpp.

References clang::DeclContext::addDecl(), clang::sema::CapturingScopeInfo::addVLATypeCapture(), clang::AS_private, captureInBlock(), captureInCapturedRegion(), captureInLambda(), Context, clang::FieldDecl::Create(), CurContext, Diag(), diagnoseUncapturableValueReference(), clang::DeclContext::Equals(), FunctionScopes, getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ArrayType::getElementType(), getElementType(), clang::getLambdaAwareParentOfDeclContext(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::QualType::getNonReferenceType(), getParentOfCapturingContextOrNull(), clang::QualType::getSingleStepDesugaredType(), clang::VariableArrayType::getSizeExpr(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::VarDecl::hasLocalStorage(), clang::ICIS_NoInit, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::isGenericLambdaCallOperatorSpecialization(), clang::VarDecl::isInitCapture(), clang::QualType::isNull(), isVariableAlreadyCapturedInScopeInfo(), isVariableCapturable(), clang::Type::isVariablyModifiedType(), clang::sema::CapturingScopeInfo::isVLATypeCaptured(), clang::sema::LambdaScopeInfo::Lambda, Paren, Record, and TryCapture_Implicit.

Referenced by CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), getCapturedDeclRefType(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), clang::MarkVarDeclODRUsed(), tryCaptureObjCSelf(), and tryCaptureVariable().

Try to capture the given variable.

Definition at line 12361 of file SemaExpr.cpp.

References tryCaptureVariable().

bool Sema::tryExprAsCall ( Expr E,
QualType ZeroArgCallReturnTy,
UnresolvedSetImpl OverloadSet 
)

Figure out if an expression could be turned into a call.

Use this when trying to recover from an error where the programmer may have written just the name of a function instead of actually calling it.

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 1260 of file Sema.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::ASTContext::BoundMemberTy, BuildCallToMemberFunction(), clang::UnresolvedSetImpl::clear(), Context, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), getDiagnostics(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::DiagnosticsEngine::getSuppressAllDiagnostics(), clang::Expr::getType(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::Expr::IgnoreParens(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::ASTContext::OverloadTy, and clang::DiagnosticsEngine::setSuppressAllDiagnostics().

Referenced by tryToRecoverWithCall().

ImplicitConversionSequence Sema::TryImplicitConversion ( Expr From,
QualType  ToType,
bool  SuppressUserConversions,
bool  AllowExplicit,
bool  InOverloadResolution,
bool  CStyle,
bool  AllowObjCWritebackConversion 
)
bool Sema::tryToRecoverWithCall ( ExprResult E,
const PartialDiagnostic PD,
bool  ForceComplain = false,
bool(*)(QualType IsPlausibleResult = nullptr 
)
bool Sema::UnifySection ( StringRef  SectionName,
int  SectionFlags,
DeclaratorDecl TheDecl 
)
bool Sema::UnifySection ( StringRef  SectionName,
int  SectionFlags,
SourceLocation  PragmaSectionLocation 
)

Definition at line 8187 of file SemaTemplate.cpp.

References clang::FunctionDecl::setLateTemplateParsed().

bool Sema::UseArgumentDependentLookup ( const CXXScopeSpec SS,
const LookupResult R,
bool  HasTrailingLParen 
)
QualType Sema::UsualArithmeticConversions ( ExprResult LHS,
ExprResult RHS,
bool  IsCompAssign = false 
)

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

References clang::CK_FloatingCast, clang::CK_IntegralCast, Context, clang::ExprError(), clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), clang::Type::isHalfType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isPromotableBitField(), and clang::Type::isPromotableIntegerType().

Referenced by BuildObjCBridgedCast(), and CheckIndirectionOperand().

ExprResult Sema::VerifyBitField ( SourceLocation  FieldLoc,
IdentifierInfo FieldName,
QualType  FieldTy,
bool  IsMsStruct,
Expr BitWidth,
bool ZeroWidth = nullptr 
)
ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
VerifyICEDiagnoser Diagnoser,
bool  AllowFold = true 
)
ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
unsigned  DiagID,
bool  AllowFold = true 
)

Definition at line 11069 of file SemaExpr.cpp.

References Diag(), and VerifyIntegerConstantExpression().

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result = nullptr 
)

Definition at line 11057 of file SemaExpr.cpp.

References Diag(), LangOpts, and VerifyIntegerConstantExpression().

void Sema::WarnConflictingTypedMethods ( ObjCMethodDecl Method,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)
void Sema::WarnExactTypedMethods ( ObjCMethodDecl ImpMethodDecl,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)
SmallVectorImpl<Decl *>& clang::Sema::WeakTopLevelDecls ( ) [inline]

WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.

Definition at line 1124 of file Sema.h.

References WeakTopLevelDecl.

Referenced by clang::ParseAST().


Friends And Related Function Documentation

friend class ArgumentPackSubstitutionRAII [friend]

Definition at line 6443 of file Sema.h.

friend class ASTReader [friend]

Definition at line 8662 of file Sema.h.

friend class ASTWriter [friend]

Definition at line 8663 of file Sema.h.

friend class InitializationSequence [friend]

Definition at line 8661 of file Sema.h.

friend class Parser [friend]

Definition at line 8660 of file Sema.h.


Member Data Documentation

When true, access checking violations are treated as SFINAE failures rather than hard errors.

Definition at line 5262 of file Sema.h.

Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

Extra modules inspected when performing a lookup during a template instantiation. Computed lazily.

Definition at line 6383 of file Sema.h.

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 6379 of file Sema.h.

Referenced by CheckFriendTypeDecl(), CheckLiteralOperatorDeclaration(), CheckTemplateSpecializationScope(), DiagnoseSelfAssignment(), DiagnoseTwoPhaseLookup(), EmitCurrentDiagnostic(), getCurBlock(), getCurLambda(), handleNonNullAttr(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), isSFINAEContext(), clang::LookupResult::isVisible(), makeUnavailableInSystemHeader(), MarkFunctionReferenced(), PrintInstantiationStack(), SubstFunctionDeclType(), SubstParmTypes(), and SubstType().

A flag to indicate that we're in a context that permits abstract references to fields. This is really a

Definition at line 706 of file Sema.h.

Worker object for performing CFG-based warnings.

Definition at line 6685 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 6422 of file Sema.h.

Referenced by clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII(), FindInstantiatedDecl(), and getPackSubstitutedTemplateArgument().

The declaration of the arrayWithObjects:count: method.

Definition at line 683 of file Sema.h.

Definition at line 329 of file Sema.h.

Referenced by ActOnPragmaMSSeg().

llvm::BumpPtrAllocator clang::Sema::BumpAlloc

Definition at line 865 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 6449 of file Sema.h.

Code-completion consumer.

Definition at line 250 of file Sema.h.

Definition at line 331 of file Sema.h.

Referenced by ActOnPragmaMSSeg().

Flag indicating whether or not to collect detailed statistics.

Definition at line 247 of file Sema.h.

Referenced by clang::ParseAST().

Definition at line 330 of file Sema.h.

Referenced by ActOnPragmaMSSeg().

Definition at line 241 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnArrayTypeTrait(), ActOnAtEnd(), ActOnClassMessage(), ActOnClassPropertyRefExpr(), ActOnComment(), ActOnCompatibilityAlias(), ActOnConversionDeclarator(), ActOnCUDAExecConfigExpr(), ActOnCXXDelete(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnCXXTypeConstructExpr(), ActOnDecltypeExpression(), ActOnDefs(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnFileScopeAsmDecl(), ActOnFinishFullExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnInstanceMessage(), ActOnMemInitializer(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnNamespaceAliasDef(), ActOnObjCBoolLiteral(), ActOnObjCBridgedCast(), ActOnObjCInstanceType(), ActOnOpenMPAlignedClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPBarrierDirective(), ActOnOpenMPCaptureClause(), ActOnOpenMPCollapseClause(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDefaultClause(), ActOnOpenMPFinalClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPIdExpression(), ActOnOpenMPIfClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPMasterDirective(), ActOnOpenMPMergeableClause(), ActOnOpenMPNowaitClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPOrderedClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReadClause(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionStart(), ActOnOpenMPSafelenClause(), ActOnOpenMPScheduleClause(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSeqCstClause(), ActOnOpenMPSharedClause(), ActOnOpenMPSimdDirective(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTaskyieldDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPUntiedClause(), ActOnOpenMPUpdateClause(), ActOnOpenMPWriteClause(), ActOnParamDefaultArgumentError(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaWeakID(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartNamespaceDef(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnTypeTrait(), ActOnUsingDirective(), AddAlignedAttr(), AddAlignmentAttributesForRecord(), AddAlignValueAttr(), addAsFieldToClosureType(), AddAssumeAlignedAttr(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), AddBuiltinCandidate(), AddBuiltinOperatorCandidates(), AddCFAuditedAttribute(), AddConversionCandidate(), AddFunctionCandidates(), addFunctionPointerConversion(), addImplicitTypedef(), AddMemberOperatorCandidates(), AddMethodTemplateCandidate(), AddMsStructLayoutForRecord(), AddOptnoneAttributeIfNoConflicts(), AddOverloadCandidate(), AddPropertyAttrs(), AddPushedVisibilityAttribute(), AddSuperSendCompletion(), AddSurrogateCandidate(), AddTemplateConversionCandidate(), AddTemplateOverloadCandidate(), addThisCompletion(), adjustBlockReturnsToEnum(), AdjustFunctionParmAndArgTypesForDeduction(), adjustMemberFunctionCC(), AttachBaseSpecifiers(), BuildArrayType(), BuildArrayTypeTrait(), BuildAtomicType(), BuildBaseInitializer(), BuildBlockPointerType(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildClassMessage(), BuildClassMessageImplicit(), BuildCookedLiteralOperatorCall(), BuildCStyleCastExpr(), BuildCXXCastArgument(), BuildCXXFoldExpr(), BuildCXXFunctionalCastExpr(), BuildCXXMemberCallExpr(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXTypeConstructExpr(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExpressionTrait(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFloatingLiteral(), BuildForRangeBeginEndCall(), BuildFunctionType(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildLiteralOperatorCall(), BuildMemberInitializer(), BuildMemberPointerType(), buildMemcpyForAssignmentOp(), BuildMemInitializer(), BuildMSPropertyRefExpr(), buildNestedType(), BuildObjCBridgedCast(), BuildObjCExceptionDecl(), BuildOverloadedArrowExpr(), buildOverloadedCallSet(), BuildParenType(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildQualifiedType(), BuildReferenceType(), buildSingleCopyAssign(), buildSingleCopyAssignRecursively(), BuildStdInitializerList(), BuildTypeofExprType(), BuildTypeTrait(), BuildUnaryTransformType(), BuildUsingDeclaration(), BuildUsingShadowDecl(), BuildVarDecl(), BuildVariableInstantiation(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::canCalleeThrow(), clang::canTypeidThrow(), captureInBlock(), captureInCapturedRegion(), captureInLambda(), captureThis(), CastForMoving(), CastsAwayConstness(), CheckAlignasUnderalignment(), CheckAllocatedType(), CheckARCMethodDecl(), checkARCPropertyImpl(), CheckAsmLValue(), CheckBaseSpecifier(), checkBlockPointerTypesForAssignment(), checkBuiltinArgument(), CheckCallingConvAttr(), CheckCaseExpression(), CheckCompatibleReinterpretCast(), CheckCompletedCXXClass(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConditionVariable(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConvertedConstantExpression(), CheckCXXThisCapture(), CheckDerivedToBaseConversion(), CheckDestructor(), CheckDestructorDeclarator(), checkDLLAttribute(), checkDLLAttributeRedeclaration(), CheckEnableIf(), checkEnumComparison(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitlyDefaultedMemberExceptionSpec(), CheckExplicitlyDefaultedSpecialMember(), CheckExtVectorComponent(), CheckForIncompatibleAttributes(), checkFormatStringExpr(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), checkFunctionOrMethodParameterIndex(), checkGlobalOrExternCConflict(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckImplementationIvars(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), checkIntToPointerCast(), CheckKeyForObjCARCConversion(), CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckNonNullExpr(), CheckObjCARCConversion(), CheckObjCARCUnavailableWeakConversion(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCPointerTypesForAssignment(), CheckOMPThreadPrivateDecl(), CheckOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckPackExpansion(), CheckPlaceholderExpr(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckRealImagOperand(), CheckRegparmAttr(), CheckSpecifiedExceptionType(), CheckStringInit(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkTrivialClassMembers(), checkUInt32Argument(), CheckUnaryTypeTraitTypeCompleteness(), checkUnknownAnyArg(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CloneDesignatedInitExpr(), CollectFieldInitializer(), CollectIvarsToConstructOrDestruct(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), computeDeclContext(), ComputeDefaultedDefaultCtorExceptionSpec(), ComputeInheritingCtorExceptionSpec(), ConvertDeclSpecToType(), ConvertDeducedTemplateArgument(), CopyObject(), clang::CodeCompletionResult::CreateCodeCompletionString(), CreateFunctionRefExpr(), CreateNewFunctionDecl(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CreatePropertyDecl(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), CXXCheckConditionalOperands(), CXXRecordMembersNamed(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DeclApplyPragmaWeak(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitDefaultConstructor(), DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), defaultedSpecialMemberIsConstexpr(), DefaultSynthesizeProperties(), DefineImplicitDefaultConstructor(), DelayDependentAccess(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseAssignmentResult(), DiagnoseBadAccess(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCastOfObjCSEL(), DiagnoseDirectIsaAccess(), DiagnoseEqualityWithExtraParens(), DiagnoseInvalidRedeclaration(), diagnoseListInit(), DiagnoseNarrowingInInitList(), DiagnoseNontrivial(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), DiagnoseReinterpretUpDownCast(), DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), DiagnoseUseOfUnimplementedSelectors(), doesUsualArrayDeleteWantSize(), DoMarkVarDeclReferenced(), EmitCurrentDiagnostic(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EndOpenMPDSABlock(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), ExpandAnonymousFieldDesignator(), ExtractUnqualifiedFunctionType(), FindAllocationFunctions(), FindBaseInitializer(), findCapturingExpr(), FindCompositePointerType(), FindInstantiatedDecl(), FindOverriddenMethod(), FindUsualDeallocationFunction(), PackDeductionScope::finish(), FinishTemplateArgumentDeduction(), FitsInto(), FixOverloadedFunctionReference(), getAmbiguousPathsDisplayString(), getASTContext(), getCCForDeclaratorChunk(), getCompletionPrintingPolicy(), clang::TypoCorrectionConsumer::getContext(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), GetDiagForGotoScopeDecl(), getElaboratedType(), getFloat128Identifier(), GetFullTypeForDeclarator(), getGenericLambdaTemplateParameterList(), getImplicitMethodEPI(), getMessageSendResultType(), getNSNumberFactoryMethod(), getObjCMessageKind(), getOrCreateStdNamespace(), getPrintingPolicy(), getStdBadAlloc(), getStdNamespace(), getSuperIdentifier(), getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), GetTypeOfFunction(), GetTypeSourceInfoForDeclarator(), getUndefinedButUsed(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAttrWithMessage(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleComplexFloatConversion(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDestructorAttr(), handleDLLAttr(), handleEnableIfAttr(), handleExclusiveTrylockFunctionAttr(), HandleExprPropertyRefExpr(), handleFallThroughAttr(), handleFloatConversion(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleIntegerConversion(), handleInterruptAttr(), handleIntToFloatConversion(), handleLaunchBoundsAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLoopHintAttr(), handleMallocAttr(), handleModeAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), HandleNeonVectorTypeAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCGCTypeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), HandlePropertyInClassExtension(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), HandleTagNumbering(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), hasDeducibleTemplateParameters(), IgnoredValueConversions(), ImpCastExprToType(), inferARCLifetimeForPointee(), inferARCWriteback(), inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), InjectAnonymousStructOrUnionMembers(), InstantiateAttrs(), InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateClassTemplateSpecialization(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isAcceptableNestedNameSpecifier(), isAllowableExplicitConversion(), isAtLeastAsSpecializedAs(), isForbiddenTypeAllowed(), isFunctionDefinitionDiscarded(), IsInitializerListConstructorConversion(), isKnownName(), isLibstdcxxEagerExceptionSpecHack(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isPermittedNeonBaseType(), IsStandardConversion(), IsUserDefinedConversion(), isValidSubjectOfNSAttribute(), IsVectorConversion(), LookupBuiltin(), LookupDirect(), LookupMemberExpr(), LookupMethodInReceiverType(), LookupPredefedObjCSuperType(), LookupVisibleDecls(), makeUnavailableInSystemHeader(), MarkBaseAndMemberDestructorsReferenced(), MarkDeclarationsReferencedInType(), MarkDeducedTemplateParameters(), MarkFunctionReferenced(), clang::MarkVarDeclODRUsed(), MatchesFriend(), MatchTemplateParameterKind(), MatchTwoMethodDeclarations(), MaybeAddOverrideCalls(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), maybeExtendBlockObject(), mergeAlignedAttrs(), mergeAvailabilityAttr(), mergeDeclAttribute(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeFormatAttr(), mergeMSInheritanceAttr(), mergeParamDeclAttributes(), mergeSectionAttr(), MergeVarDeclExceptionSpecs(), mergeVisibilityAttr(), MightInstantiateTo(), NoteAllOverloadCandidates(), NoteSurrogateCandidate(), ParseObjCEncodeExpression(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), PDiag(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), PerformObjectArgumentInitialization(), PrintInstantiationStack(), ProcessDeclAttribute(), ProcessPropertyDecl(), PushCapturedRegionScope(), RebuildDeclaratorInCurrentInstantiation(), recordConversion(), recoverFromTypeInKnownDependentBase(), RequireCompleteDeclContext(), RequireLiteralType(), RequireNonAbstractType(), ResolveAddressOfOverloadedFunction(), ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), ResolveSingleFunctionTemplateSpecialization(), SaveNestedNameSpecifierAnnotation(), Sema(), SemaBuiltinMemChkCall(), SetCtorInitializers(), SetDelegatingInitializer(), SetIvarInitializers(), SetParamDefaultArgument(), ShouldDeleteSpecialMember(), ShouldRemoveFromUnused(), ShouldTryAgainWithRedefinitionType(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), SpecialMemberIsTrivial(), stripARCUnbridgedCast(), SubstAutoWithinFunctionReturnType(), SubstBaseSpecifiers(), SubstFunctionDeclType(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), SubstType(), threadSafetyCheckIsSmartPointer(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), translateTemplateArgument(), tryCaptureVariable(), TryClassUnification(), TryConstCast(), TryContextuallyConvertToBool(), TryContextuallyConvertToObjCPointer(), TryDefaultInitialization(), TryDiagnoseProtectedAccess(), tryExprAsCall(), TryImplicitConversion(), TryInitializerListConstruction(), TryListConversion(), tryObjCWritebackConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticImplicitCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UnifySection(), UpdateExceptionSpec(), UpdateMarkingForLValueToRValue(), VectorTypesMatch(), VerifyIntegerConstantExpression(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), WarnExactTypedMethods(), WidenIterationCount(), clang::ASTWriter::WriteAST(), and ~Sema().

CurContext - This is the current declaration context of parsing.

Definition at line 253 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAtEnd(), ActOnCompatibilityAlias(), ActOnCXXMemberDeclarator(), ActOnEmptyDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFileScopeAsmDecl(), ActOnFinishCXXMemberDecls(), ActOnFinishFullExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnMethodDeclaration(), ActOnModuleImport(), ActOnModuleInclude(), ActOnNamespaceAliasDef(), ActOnOpenMPAtomicDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPForDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPSimdDirective(), ActOnOpenMPThreadprivateDirective(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnTemplatedFriendTag(), ActOnUsingDirective(), addAsFieldToClosureType(), AddClassMessageCompletions(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverloadCandidate(), BuildBaseInitializer(), BuildCallToMemberFunction(), BuildCXXNestedNameSpecifier(), BuildDelegatingInitializer(), BuildExceptionDeclaration(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildObjCExceptionDecl(), buildOverloadedCallSet(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), BuildUsingDeclaration(), BuildUsingShadowDecl(), BuildVarDecl(), CheckAccess(), CheckExplicitInstantiationScope(), CheckFriendTypeDecl(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckInheritingConstructorUsingDecl(), CheckNakedParmReference(), CheckObjCDeclScope(), CheckOpenMPIterationSpace(), CheckOpenMPLoop(), CheckTemplateSpecializationScope(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), clang::Sema::ContextRAII::ContextRAII(), CreateNewFunctionDecl(), DeclApplyPragmaWeak(), clang::InitializationSequence::Diagnose(), DiagnoseBadTarget(), DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReference(), DoMarkVarDeclReferenced(), EmitRelatedResultTypeNoteForReturn(), FindInstantiatedDecl(), FinishForRangeVarDecl(), getCurBlock(), getCurLambda(), getCurLexicalContext(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getFunctionLevelDeclContext(), getFunctionStorageClass(), getObjCContainerKind(), getObjCDeclContext(), HandlePropertyInClassExtension(), InstantiateMemInitializers(), isCurrentClassName(), isCurrentClassNameTypo(), isLibstdcxxEagerExceptionSpecHack(), IsPotentiallyEvaluatedContext(), isReferenceToNonConstCapture(), isSelfExpr(), LookupMethodInReceiverType(), makeUnavailableInSystemHeader(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkVTableUsed(), MaybeAddOverrideCalls(), clang::Sema::ContextRAII::pop(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), ShouldEnterDeclaratorScope(), SubstParmVarDecl(), tryCaptureVariable(), TryTypoCorrectionForCall(), and warnAboutAmbiguousFunction().

Last section used with #pragma init_seg.

Definition at line 334 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg().

Definition at line 335 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg().

When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function. In such cases, this provides the type used for 'this'.

Definition at line 4351 of file Sema.h.

Referenced by ClassifyImplicitMemberAccess(), clang::Sema::ContextRAII::ContextRAII(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), isThisOutsideMemberFunctionBody(), clang::Sema::ContextRAII::pop(), and clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII().

The C++ "type_info" declaration, which is defined in <typeinfo>.

Definition at line 653 of file Sema.h.

Definition at line 328 of file Sema.h.

Referenced by ActOnPragmaMSSeg().

List of decls defined in a function prototype. This contains EnumConstants that incorrectly end up in translation unit scope because there is no function to pin them on. ActOnFunctionDeclarator reads this list and patches them into the FunctionDecl.

Definition at line 1416 of file Sema.h.

All the members seen during a class definition which were both explicitly defaulted and had explicitly-specified exception specifications, along with the function type containing their user-specified exception specification. Those exception specifications were overridden with the default specifications, but we still need to check whether they are compatible with the default specification, and we can't do that until the nesting set of class definitions is complete.

Definition at line 476 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckExplicitlyDefaultedSpecialMember().

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 466 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckOverridingFunctionExceptionSpec().

All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.

Definition at line 459 of file Sema.h.

Referenced by CheckDelegatingCtorCycles(), and SetDelegatingInitializer().

The declaration of the dictionaryWithObjects:forKeys:count: method.

Definition at line 689 of file Sema.h.

Tracks whether we are in a context where typo correction is disabled.

Definition at line 6660 of file Sema.h.

Referenced by clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope(), and clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope().

A list of all of the dynamic classes in this translation unit.

Definition at line 5034 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 358 of file Sema.h.

Referenced by DiscardCleanupsInEvaluationContext(), MaybeCreateExprWithCleanups(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().

ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared. Used in Solaris system headers to define functions that occur in multiple standards to call the version in the currently selected standard.

Definition at line 621 of file Sema.h.

Referenced by ActOnPragmaRedefineExtname().

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 383 of file Sema.h.

Referenced by CheckExtVectorComponent(), and handleExtVectorTypeAttr().

FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.

Definition at line 386 of file Sema.h.

Referenced by ActOnCXXMemberDeclarator(), ActOnFinishCXXMemberSpecification(), and Sema().

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 374 of file Sema.h.

Referenced by CheckCXXThisCapture(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DiagnoseUnexpandedParameterPacks(), DiagRuntimeBehavior(), getCurBlock(), getCurCapturedRegion(), getCurFunction(), getCurLambda(), getEnclosingFunction(), isUnexpandedParameterPackPermitted(), PopFunctionScopeInfo(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), Sema(), tryCaptureVariable(), and ~Sema().

A flag to remember whether the implicit forms of operator new and delete have been declared.

Definition at line 702 of file Sema.h.

Referenced by DeclareGlobalNewDelete().

Source location for newly created implicit MSInheritanceAttrs.

Definition at line 302 of file Sema.h.

Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().

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 6400 of file Sema.h.

Referenced by isSFINAEContext(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

Flag indicating if Sema is building a recovery call expression.

This flag is used to avoid building recovery call expressions if Sema is already doing so, which would cause infinite recursions.

Definition at line 349 of file Sema.h.

Referenced by BuildRecoveryCallExpr().

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 6414 of file Sema.h.

Referenced by EmitCurrentDiagnostic().

Definition at line 480 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and ~Sema().

Definition at line 485 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and SetLateTemplateParser().

Definition at line 486 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and SetLateTemplateParser().

A mapping from external names to the most recent locally-scoped extern "C" declaration with that name.

This map contains external declarations introduced in local scopes, e.g.,

 extern "C" void f() {
   void foo(int, int);
 }

Here, the name "foo" will be associated with the declaration of "foo" within f. This name is not visible outside of "f". However, we still find it in two cases:

  • If we are declaring another global or extern "C" entity 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 433 of file Sema.h.

Cache of additional modules that should be used for name lookup within the current template instantiation. Computed lazily; use getLookupModules() to get a complete set.

Definition at line 6388 of file Sema.h.

llvm::SmallPtrSet<Expr*, 2> clang::Sema::MaybeODRUseExprs

Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression. This is cleared at the end of each full expression.

Definition at line 366 of file Sema.h.

Referenced by CleanupVarDeclMarking(), DiscardCleanupsInEvaluationContext(), DoMarkVarDeclReferenced(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), and UpdateMarkingForLValueToRValue().

Method Pool - allows efficient lookup when typechecking messages to "id". We need to maintain a list, since selectors can have differing signatures across classes. In Cocoa, this happens to be extremely uncommon (only 1% of selectors are "overloaded"). At the head of the list it is recorded whether there were 0, 1, or >= 2 methods inside categories with a particular selector.

Definition at line 903 of file Sema.h.

Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CheckObjCMethodOverrides(), CollectMultipleMethodsInGlobalPool(), DiagnoseMismatchedSelectors(), LookupImplementedMethodInGlobalPool(), moveMethodToBackOfGlobalList(), clang::ASTReader::ReadMethodPool(), and SelectorsForTypoCorrection().

counter for internal MS Asm label names.

Definition at line 698 of file Sema.h.

Controls member pointer representation format under the MS ABI.

Definition at line 271 of file Sema.h.

Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().

Definition at line 267 of file Sema.h.

Referenced by ActOnPragmaMSStruct(), and AddMsStructLayoutForRecord().

The MSVC "_GUID" struct, which is defined in MSVC header files.

Definition at line 656 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 6405 of file Sema.h.

std::unique_ptr<NSAPI> clang::Sema::NSAPIObj

Caches identifiers/selectors for NSFoundation APIs.

Definition at line 659 of file Sema.h.

Referenced by ActOnAtEnd(), applyCocoaAPICheck(), CheckObjCCollectionLiteralElement(), getNSNumberFactoryMethod(), hasIsEqualMethod(), and Sema().

The declaration of the Objective-C NSArray class.

Definition at line 680 of file Sema.h.

The declaration of the Objective-C NSDictionary class.

Definition at line 686 of file Sema.h.

The declaration of the Objective-C NSNumber class.

Definition at line 662 of file Sema.h.

Referenced by getNSNumberFactoryMethod().

The Objective-C NSNumber methods used to create NSNumber literals.

Definition at line 668 of file Sema.h.

Referenced by getNSNumberFactoryMethod(), and Sema().

Pointer to NSNumber type (NSNumber *).

Definition at line 665 of file Sema.h.

Referenced by getNSNumberFactoryMethod().

The declaration of the Objective-C NSString class.

Definition at line 671 of file Sema.h.

Pointer to NSString type (NSString *).

Definition at line 674 of file Sema.h.

The number of SFINAE diagnostics that have been trapped.

Definition at line 868 of file Sema.h.

Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::hasErrorOccurred(), PrintStats(), and clang::Sema::SFINAETrap::~SFINAETrap().

Definition at line 236 of file Sema.h.

Referenced by getOpenCLOptions().

This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet. If optimizations are currently "on", this is set to an invalid location.

Definition at line 343 of file Sema.h.

Referenced by ActOnPragmaOptimize(), AddRangeBasedOptnone(), and getOptimizeOffPragmaLocation().

Generally null except when we temporarily switch decl contexts, like in.

See also:
ActOnObjCTemporaryExitContainerContext.

Definition at line 257 of file Sema.h.

Referenced by getCurLexicalContext().

PackContext - Manages the stack for #pragma pack. An alignment of 0 indicates default alignment.

Definition at line 265 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 406 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and checkAttributesAfterMerging().

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 6733 of file Sema.h.

Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), PerformPendingInstantiations(), clang::Sema::SavePendingLocalImplicitInstantiationsRAII::SavePendingLocalImplicitInstantiationsRAII(), 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 402 of file Sema.h.

Referenced by DiagnoseAbstractType().

id<NSCopying> type.

Definition at line 692 of file Sema.h.

Method selectors used in a @selector expression. Used for implementation of -Wselector.

Definition at line 907 of file Sema.h.

Referenced by DiagnoseUseOfUnimplementedSelectors(), ParseObjCSelectorExpression(), and RemoveSelectorFromWarningCache().

will hold 'respondsToSelector:'

Definition at line 695 of file Sema.h.

Referenced by ActOnInstanceMessage().

A cache of special member function overload resolution results for C++ records.

Definition at line 854 of file Sema.h.

The C++ special members which we are currently in the process of declaring. If this process recursively triggers the declaration of the same special member, we should act as if it is not yet declared.

Definition at line 925 of file Sema.h.

The C++ "std::bad_alloc" class, which is defined by the C++ standard library.

Definition at line 646 of file Sema.h.

Referenced by DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), and getStdBadAlloc().

The C++ "std::initializer_list" template, which is defined in <initializer_list>.

Definition at line 650 of file Sema.h.

Referenced by BuildStdInitializerList(), and isStdInitializerList().

The C++ "std" namespace, where the standard library resides.

Definition at line 642 of file Sema.h.

Referenced by ActOnStartNamespaceDef(), getOrCreateStdNamespace(), getStdNamespace(), and isStdInitializerList().

The declaration of the stringWithUTF8String: method.

Definition at line 677 of file Sema.h.

Definition at line 6458 of file Sema.h.

All the tentative definitions encountered in the TU.

Definition at line 443 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 863 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and isMainFileLoc().

A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.

Definition at line 6682 of file Sema.h.

The number of typos corrected by CorrectTypo.

Definition at line 6663 of file Sema.h.

UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.

Definition at line 888 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), checkUndefinedButUsed(), getUndefinedButUsed(), MarkFunctionReferenced(), and clang::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 880 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 6674 of file Sema.h.

Referenced by CorrectTypo().

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 451 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

Set containing all typedefs that are likely unused.

Definition at line 395 of file Sema.h.

Referenced by emitAndClearUnusedLocalTypedefWarnings().

Set containing all declared private fields that are not used.

Definition at line 391 of file Sema.h.

Referenced by ActOnCXXMemberDeclarator(), ActOnEndOfTranslationUnit(), and BuildFieldReferenceExpr().

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 261 of file Sema.h.

Referenced by Initialize().

VisContext - Manages the stack for #pragma GCC visibility.

Definition at line 338 of file Sema.h.

Referenced by AddPushedVisibilityAttribute(), FreeVisContext(), PopPragmaVisibility(), PushPragmaVisibility(), and ~Sema().

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 5023 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 5017 of file Sema.h.

Referenced by DefineUsedVTables(), LoadExternalVTableUses(), MarkVTableUsed(), and clang::Sema::SavePendingInstantiationsAndVTableUsesRAII::SavePendingInstantiationsAndVTableUsesRAII().

SmallVector<MSVtorDispAttr::Mode, 2> clang::Sema::VtorDispModeStack

Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. Possible values are 0, 1, and 2, which mean:

0: Suppress all vtordisps 1: Insert vtordisps in the presence of vbase overrides and non-trivial structors 2: Always insert vtordisps to support RTTI on partially constructed objects

The stack always has at least one element in it.

Definition at line 299 of file Sema.h.

Referenced by ActOnPragmaMSVtorDisp(), and AddMsStructLayoutForRecord().

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 632 of file Sema.h.

Referenced by DeclApplyPragmaWeak(), and WeakTopLevelDecls().

WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared. rare. may alias another identifier, declared or undeclared

Definition at line 615 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), LoadExternalWeakUndeclaredIdentifiers(), and ProcessPragmaWeak().


The documentation for this class was generated from the following files: