|
clang 24.0.0git
|
#include "TypeLocBuilder.h"#include "clang/AST/ASTConsumer.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/CharUnits.h"#include "clang/AST/ComparisonCategories.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/DynamicRecursiveASTVisitor.h"#include "clang/AST/EvaluatedExprVisitor.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/RecordLayout.h"#include "clang/AST/StmtVisitor.h"#include "clang/AST/TypeLoc.h"#include "clang/AST/TypeOrdering.h"#include "clang/Basic/AttributeCommonInfo.h"#include "clang/Basic/PartialDiagnostic.h"#include "clang/Basic/Specifiers.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/LiteralSupport.h"#include "clang/Lex/Preprocessor.h"#include "clang/Sema/CXXFieldCollector.h"#include "clang/Sema/DeclSpec.h"#include "clang/Sema/EnterExpressionEvaluationContext.h"#include "clang/Sema/Initialization.h"#include "clang/Sema/Lookup.h"#include "clang/Sema/Ownership.h"#include "clang/Sema/ParsedTemplate.h"#include "clang/Sema/Scope.h"#include "clang/Sema/ScopeInfo.h"#include "clang/Sema/SemaCUDA.h"#include "clang/Sema/SemaInternal.h"#include "clang/Sema/SemaObjC.h"#include "clang/Sema/SemaOpenMP.h"#include "clang/Sema/SemaProxy.h"#include "clang/Sema/Template.h"#include "clang/Sema/TemplateDeduction.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringExtras.h"#include "llvm/Support/ConvertUTF.h"#include "llvm/Support/SaveAndRestore.h"#include <map>#include <optional>#include <set>#include "clang/AST/TypeLocNodes.def"#include "clang/Basic/OperatorKinds.def"Go to the source code of this file.
Classes | |
| class | clang::Sema::InheritedConstructorInfo |
Macros | |
| #define | ABSTRACT_TYPELOC(CLASS, PARENT) |
| #define | TYPELOC(CLASS, PARENT) |
| #define | CheckPolymorphic(Type) |
| #define | OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) |
Typedefs | |
| typedef llvm::SmallPtrSet< QualType, 4 > | IndirectBaseSet |
| Use small set to collect indirect bases. | |
Enumerations | |
| enum | ImplicitInitializerKind { IIK_Default , IIK_Copy , IIK_Move , IIK_Inherit } |
| ImplicitInitializerKind - How an implicit base or member initializer should initialize its base or member. More... | |
| enum | TrivialSubobjectKind { TSK_BaseClass , TSK_Field , TSK_CompleteObject } |
| The kind of subobject we are checking for triviality. More... | |
| enum class | AllocationOperatorKind { New , Delete } |
Functions | |
| static bool | functionDeclHasDefaultArgument (const FunctionDecl *FD) |
| static bool | CheckBindingsCount (Sema &S, DecompositionDecl *DD, QualType DecompType, ArrayRef< BindingDecl * > Bindings, unsigned MemberCount) |
| static bool | checkSimpleDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const llvm::APSInt &NumElemsAPS, QualType ElemType, llvm::function_ref< ExprResult(SourceLocation, Expr *, unsigned)> GetInit) |
| static bool | checkArrayLikeDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const llvm::APSInt &NumElems, QualType ElemType) |
| static bool | checkArrayDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const ConstantArrayType *CAT) |
| static bool | checkVectorDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const VectorType *VT) |
| static bool | checkComplexDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const ComplexType *CT) |
| static std::string | printTemplateArgs (const PrintingPolicy &PrintingPolicy, TemplateArgumentListInfo &Args, const TemplateParameterList *Params) |
| static QualType | getStdTrait (Sema &S, SourceLocation Loc, StringRef Trait, TemplateArgumentListInfo &Args, unsigned DiagID) |
| static bool | lookupMember (Sema &S, CXXRecordDecl *RD, LookupResult &MemberLookup) |
| static TemplateArgumentLoc | getTrivialIntegralTemplateArgument (Sema &S, SourceLocation Loc, QualType T, uint64_t I) |
| static TemplateArgumentLoc | getTrivialTypeTemplateArgument (Sema &S, SourceLocation Loc, QualType T) |
| static IsTupleLike | isTupleLike (Sema &S, SourceLocation Loc, QualType T, unsigned &OutSize) |
| static QualType | getTupleLikeElementType (Sema &S, SourceLocation Loc, unsigned I, QualType T) |
| static bool | checkTupleLikeDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, VarDecl *Src, QualType DecompType, unsigned NumElems) |
| static DeclAccessPair | findDecomposableBaseClass (Sema &S, SourceLocation Loc, const CXXRecordDecl *RD, CXXCastPath &BasePath) |
| Find the base class to decompose in a built-in decomposition of a class type. | |
| static bool | CheckMemberDecompositionFields (Sema &S, SourceLocation Loc, const CXXRecordDecl *OrigRD, QualType DecompType, DeclAccessPair BasePair) |
| static bool | checkMemberDecomposition (Sema &S, ArrayRef< BindingDecl * > Bindings, ValueDecl *Src, QualType DecompType, const CXXRecordDecl *OrigRD) |
| template<typename... Ts> | |
| static bool | CheckLiteralType (Sema &SemaRef, Sema::CheckConstexprKind Kind, SourceLocation Loc, QualType T, unsigned DiagID, Ts &&...DiagArgs) |
| Check that the given type is a literal type. | |
| static bool | CheckConstexprDestructorSubobjects (Sema &SemaRef, const CXXDestructorDecl *DD, Sema::CheckConstexprKind Kind) |
| Determine whether a destructor cannot be constexpr due to. | |
| static bool | CheckConstexprParameterTypes (Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexprKind Kind) |
| Check whether a function's parameter types are all literal types. | |
| static bool | CheckConstexprReturnType (Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexprKind Kind) |
| Check whether a function's return type is a literal type. | |
| static unsigned | getRecordDiagFromTagKind (TagTypeKind Tag) |
| Get diagnostic select index for tag kind for record diagnostic message. | |
| static bool | CheckConstexprFunctionBody (Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) |
| Check the body for the given constexpr function declaration only contains the permitted types of statement. | |
| static bool | CheckConstexprMissingReturn (Sema &SemaRef, const FunctionDecl *Dcl) |
| static bool | CheckConstexprDeclStmt (Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) |
| Check the given declaration statement is legal within a constexpr function body. | |
| static bool | CheckConstexprCtorInitializer (Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallPtrSet< Decl *, 16 > &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) |
| Check that the given field is initialized within a constexpr constructor. | |
| static bool | CheckConstexprFunctionStmt (Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S, SmallVectorImpl< SourceLocation > &ReturnStmts, SourceLocation &Cxx1yLoc, SourceLocation &Cxx2aLoc, SourceLocation &Cxx2bLoc, Sema::CheckConstexprKind Kind) |
| Check the provided statement is allowed in a constexpr function definition. | |
| static void | NoteIndirectBases (ASTContext &Context, IndirectBaseSet &Set, const QualType &Type) |
| Recursively add the bases of Type. Don't add Type itself. | |
| static void | BuildBasePathArray (const CXXBasePath &Path, CXXCastPath &BasePathArray) |
| static bool | InitializationHasSideEffects (const FieldDecl &FD) |
| template<typename AttrType> | |
| static bool | HasAttribute (const QualType &T) |
| static bool | IsUnusedPrivateField (const FieldDecl *FD) |
| static bool | FindBaseInitializer (Sema &SemaRef, CXXRecordDecl *ClassDecl, QualType BaseType, const CXXBaseSpecifier *&DirectBaseSpec, const CXXBaseSpecifier *&VirtualBaseSpec) |
| Find the direct and/or virtual base specifiers that correspond to the given base type, for use in base initialization within a constructor. | |
| static Expr * | CastForMoving (Sema &SemaRef, Expr *E) |
| static bool | BuildImplicitBaseInitializer (Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, CXXBaseSpecifier *BaseSpec, bool IsInheritedVirtualBase, CXXCtorInitializer *&CXXBaseInit) |
| static bool | RefersToRValueRef (Expr *MemRef) |
| static bool | BuildImplicitMemberInitializer (Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) |
| static bool | isIncompleteOrZeroLengthArrayType (ASTContext &Context, QualType T) |
| Determine whether the given type is an incomplete or zero-lenfgth array type. | |
| static bool | CollectFieldInitializer (Sema &SemaRef, BaseAndFieldInfo &Info, FieldDecl *Field, IndirectFieldDecl *Indirect=nullptr) |
| static CXXDestructorDecl * | LookupDestructorIfRelevant (Sema &S, CXXRecordDecl *Class) |
| static void | MarkFieldDestructorReferenced (Sema &S, SourceLocation Location, FieldDecl *Field) |
| static void | MarkBaseDestructorsReferenced (Sema &S, SourceLocation Location, CXXRecordDecl *ClassDecl) |
| static void | PopulateKeysForFields (FieldDecl *Field, SmallVectorImpl< const void * > &IdealInits) |
| static const void * | GetKeyForBase (ASTContext &Context, QualType BaseType) |
| static const void * | GetKeyForMember (ASTContext &Context, CXXCtorInitializer *Member) |
| static void | AddInitializerToDiag (const Sema::SemaDiagnosticBuilder &Diag, const CXXCtorInitializer *Previous, const CXXCtorInitializer *Current) |
| static void | DiagnoseBaseOrMemInitializerOrder (Sema &SemaRef, const CXXConstructorDecl *Constructor, ArrayRef< CXXCtorInitializer * > Inits) |
| static void | CheckAbstractClassUsage (AbstractUsageInfo &Info, FunctionDecl *FD) |
| Check for invalid uses of an abstract type in a function declaration. | |
| static void | CheckAbstractClassUsage (AbstractUsageInfo &Info, VarDecl *VD) |
| Check for invalid uses of an abstract type in a variable0 declaration. | |
| static void | CheckAbstractClassUsage (AbstractUsageInfo &Info, CXXRecordDecl *RD) |
| Check for invalid uses of an abstract type within a class definition. | |
| static void | ReferenceDllExportedMembers (Sema &S, CXXRecordDecl *Class) |
| static void | checkForMultipleExportedDefaultConstructors (Sema &S, CXXRecordDecl *Class) |
| static void | checkCUDADeviceBuiltinSurfaceClassTemplate (Sema &S, CXXRecordDecl *Class) |
| static void | checkCUDADeviceBuiltinTextureClassTemplate (Sema &S, CXXRecordDecl *Class) |
| static void | DefineDefaultedFunction (Sema &S, FunctionDecl *FD, SourceLocation DefaultLoc) |
| static bool | canPassInRegisters (Sema &S, CXXRecordDecl *D, TargetInfo::CallingConvKind CCK) |
| Determine whether a type is permitted to be passed or returned in registers, per C++ [class.temporary]p3. | |
| static bool | ReportOverrides (Sema &S, unsigned DiagID, const CXXMethodDecl *MD, llvm::function_ref< bool(const CXXMethodDecl *)> Report) |
| Report an error regarding overriding, along with any relevant overridden methods. | |
| static Sema::SpecialMemberOverloadResult | lookupCallFromSpecialMember (Sema &S, CXXRecordDecl *Class, CXXSpecialMemberKind CSM, unsigned FieldQuals, bool ConstRHS) |
| Look up the special member function that would be called by a special member function for a subobject of class type. | |
| static bool | specialMemberIsConstexpr (Sema &S, CXXRecordDecl *ClassDecl, CXXSpecialMemberKind CSM, unsigned Quals, bool ConstRHS, CXXConstructorDecl *InheritedCtor=nullptr, Sema::InheritedConstructorInfo *Inherited=nullptr) |
| Is the special member function which would be selected to perform the specified operation on the specified class type a constexpr constructor? | |
| static bool | defaultedSpecialMemberIsConstexpr (Sema &S, CXXRecordDecl *ClassDecl, CXXSpecialMemberKind CSM, bool ConstArg, CXXConstructorDecl *InheritedCtor=nullptr, Sema::InheritedConstructorInfo *Inherited=nullptr) |
| Determine whether the specified special member function would be constexpr if it were implicitly defined. | |
| static Sema::ImplicitExceptionSpecification | ComputeDefaultedSpecialMemberExceptionSpec (Sema &S, SourceLocation Loc, CXXMethodDecl *MD, CXXSpecialMemberKind CSM, Sema::InheritedConstructorInfo *ICI) |
| static Sema::ImplicitExceptionSpecification | ComputeDefaultedComparisonExceptionSpec (Sema &S, SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK) |
| static Sema::ImplicitExceptionSpecification | ComputeDefaultedPostfixOperatorExceptionSpec (Sema &S, SourceLocation Loc, FunctionDecl *FD, PostfixOperatorKind Kind) |
| static Sema::ImplicitExceptionSpecification | computeImplicitExceptionSpec (Sema &S, SourceLocation Loc, FunctionDecl *FD) |
| static FunctionProtoType::ExtProtoInfo | getImplicitMethodEPI (Sema &S, CXXMethodDecl *MD) |
| static void | lookupOperatorsForDefaultedComparison (Sema &Self, Scope *S, UnresolvedSetImpl &Operators, OverloadedOperatorKind Op) |
| Perform the unqualified lookups that might be needed to form a defaulted comparison function for the given operator. | |
| static void | defineDefaultedFunctionWithSynthesizedBody (Sema &S, SourceLocation UseLoc, FunctionDecl *FD, llvm::function_ref< StmtResult(SourceLocation BodyLoc)> BuildBody) |
Define a defaulted function whose body is synthesized by BuildBody: a defaulted comparison operator function or a defaulted postfix increment or decrement operator function. | |
| static Sema::ImplicitExceptionSpecification | computeExceptionSpecFromSynthesizedBody (Sema &S, SourceLocation Loc, FunctionDecl *FD, llvm::function_ref< StmtResult(SourceLocation BodyLoc)> BuildBody) |
Compute the exception specification of a defaulted function whose body is synthesized by BuildBody: a defaulted comparison operator function or a defaulted postfix increment or decrement operator function. | |
| static QualType | getPostfixOperatorFirstParamType (const FunctionDecl *FD) |
| Get the type of the first parameter of a postfix increment or decrement operator function, where the implicit object parameter (if any) is considered to be the first parameter. | |
| static bool | canCopyAndDestroyForDefaultedPostfixOperator (Sema &S, FunctionDecl *FD, CXXRecordDecl *RD, QualType C, Expr *Obj, bool Diagnose, llvm::function_ref< void(const FunctionDecl *)> CheckConstexpr) |
Determine whether the implicit definition of the defaulted postfix increment or decrement operator function FD can direct-initialize a variable of class type C from the lvalue Obj of type C, and then destroy it, using functions that are usable from the current context. | |
| static DefaultedPostfixOperatorInfo | analyzeDefaultedPostfixOperator (Sema &S, FunctionDecl *FD, PostfixOperatorKind Kind, QualType C, bool Diagnose) |
Determine whether a defaulted postfix increment or decrement operator function for type C should be defined as deleted, as specified in C++2d [over.inc.default]p2, and whether every function it would invoke is constexpr. | |
| static StmtResult | buildDefaultedPostfixOperatorBody (Sema &S, FunctionDecl *FD, PostfixOperatorKind Kind, SourceLocation Loc) |
| Build the body of a defaulted postfix increment or decrement operator function. | |
| static bool | findTrivialSpecialMember (Sema &S, CXXRecordDecl *RD, CXXSpecialMemberKind CSM, unsigned Quals, bool ConstRHS, TrivialABIHandling TAH, CXXMethodDecl **Selected) |
| Perform lookup for a special member of the specified kind, and determine whether it is trivial. | |
| static CXXConstructorDecl * | findUserDeclaredCtor (CXXRecordDecl *RD) |
| static bool | checkTrivialSubobjectCall (Sema &S, SourceLocation SubobjLoc, QualType SubType, bool ConstRHS, CXXSpecialMemberKind CSM, TrivialSubobjectKind Kind, TrivialABIHandling TAH, bool Diagnose) |
| Check whether the special member selected for a given type would be trivial. | |
| static bool | checkTrivialClassMembers (Sema &S, CXXRecordDecl *RD, CXXSpecialMemberKind CSM, bool ConstArg, TrivialABIHandling TAH, bool Diagnose) |
| Check whether the members of a class type allow a special member to be trivial. | |
| static void | AddMostOverridenMethods (const CXXMethodDecl *MD, llvm::SmallPtrSetImpl< const CXXMethodDecl * > &Methods) |
| Add the most overridden methods from MD to Methods. | |
| static void | findImplicitlyDeclaredEqualityComparisons (ASTContext &Ctx, CXXRecordDecl *RD, llvm::SmallVectorImpl< FunctionDecl * > &Spaceships) |
| Find the equality comparison functions that should be implicitly declared in a given class definition, per C++2a [class.compare.default]p3. | |
| static void | checkMethodTypeQualifiers (Sema &S, Declarator &D, unsigned DiagID) |
| static void | diagnoseInvalidDeclaratorChunks (Sema &S, Declarator &D, unsigned Kind) |
| static void | extendLeft (SourceRange &R, SourceRange Before) |
| static void | extendRight (SourceRange &R, SourceRange After) |
| static void | DiagnoseNamespaceInlineMismatch (Sema &S, SourceLocation KeywordLoc, SourceLocation Loc, IdentifierInfo *II, bool *IsInline, NamespaceDecl *PrevNS) |
| Diagnose a mismatch in 'inline' qualifiers when a namespace is reopened. | |
| static NamespaceDecl * | getNamespaceDecl (NamespaceBaseDecl *D) |
| getNamespaceDecl - Returns the namespace a decl represents. | |
| static bool | isStdClassTemplate (Sema &S, QualType SugaredType, QualType *TypeArg, const char *ClassName, ClassTemplateDecl **CachedDecl, const Decl **MalformedDecl) |
| static ClassTemplateDecl * | LookupStdClassTemplate (Sema &S, SourceLocation Loc, const char *ClassName, bool *WasMalformed) |
| static QualType | BuildStdClassTemplate (Sema &S, ClassTemplateDecl *CTD, QualType TypeParam, SourceLocation Loc) |
| static bool | IsUsingDirectiveInToplevelContext (DeclContext *CurContext) |
| Determine whether a using statement is in a context where it will be apply in all contexts. | |
| static void | DiagnoseInvisibleNamespace (const TypoCorrection &Corrected, Sema &S) |
| static bool | TryNamespaceTypoCorrection (Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) |
| static bool | IsEquivalentForUsingDecl (ASTContext &Context, NamedDecl *D1, NamedDecl *D2) |
| Determine whether a using declaration considers the given declarations as "equivalent", e.g., if they are redeclarations of the same entity or are both typedefs of the same type. | |
| static bool | isVirtualDirectBase (CXXRecordDecl *Derived, CXXRecordDecl *Base) |
| Determine whether a direct base class is a virtual base class. | |
| static CXXBaseSpecifier * | findDirectBaseWithType (CXXRecordDecl *Derived, QualType DesiredBase, bool &AnyDependentBases) |
| Find the base specifier for a base class with the given type. | |
| static StmtResult | buildMemcpyForAssignmentOp (Sema &S, SourceLocation Loc, QualType T, const ExprBuilder &ToB, const ExprBuilder &FromB) |
| When generating a defaulted copy or move assignment operator, if a field should be copied with __builtin_memcpy rather than via explicit assignments, do so. | |
| static StmtResult | buildSingleCopyAssignRecursively (Sema &S, SourceLocation Loc, QualType T, const ExprBuilder &To, const ExprBuilder &From, bool CopyingBaseSubobject, bool Copying, unsigned Depth=0) |
Builds a statement that copies/moves the given entity from From to To. | |
| static StmtResult | buildSingleCopyAssign (Sema &S, SourceLocation Loc, QualType T, const ExprBuilder &To, const ExprBuilder &From, bool CopyingBaseSubobject, bool Copying) |
| static void | diagnoseDeprecatedCopyOperation (Sema &S, CXXMethodDecl *CopyOp) |
| Diagnose an implicit copy operation for a class which is odr-used, but which is deprecated because the class has a user-declared copy constructor, copy assignment operator, or destructor. | |
| static void | checkMoveAssignmentForRepeatedMove (Sema &S, CXXRecordDecl *Class, SourceLocation CurrentLocation) |
| Check if we're implicitly defining a move assignment operator for a class with virtual bases. | |
| static bool | hasOneRealArgument (MultiExprArg Args) |
| Determine whether the given list arguments contains exactly one "real" (non-default) argument. | |
| static bool | CheckOperatorNewDeleteDeclarationScope (Sema &SemaRef, const FunctionDecl *FnDecl) |
| static CanQualType | RemoveAddressSpaceFromPtr (Sema &SemaRef, const PointerType *PtrTy) |
| static bool | IsPotentiallyTypeAwareOperatorNewOrDelete (Sema &SemaRef, const FunctionDecl *FD, bool *WasMalformed) |
| static bool | isDestroyingDeleteT (QualType Type) |
| static bool | IsPotentiallyDestroyingOperatorDelete (Sema &SemaRef, const FunctionDecl *FD) |
| static bool | CheckOperatorNewDeleteTypes (Sema &SemaRef, FunctionDecl *FnDecl, AllocationOperatorKind OperatorKind, CanQualType ExpectedResultType, CanQualType ExpectedSizeOrAddressParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) |
| static bool | CheckOperatorNewDeclaration (Sema &SemaRef, FunctionDecl *FnDecl) |
| static bool | CheckOperatorDeleteDeclaration (Sema &SemaRef, FunctionDecl *FnDecl) |
| static bool | checkLiteralOperatorTemplateParameterList (Sema &SemaRef, FunctionTemplateDecl *TpDecl) |
| static void | WriteCharTypePrefix (BuiltinType::Kind BTK, llvm::raw_ostream &OS) |
| static void | WriteCharValueForDiagnostic (uint32_t Value, const BuiltinType *BTy, unsigned TyWidth, SmallVectorImpl< char > &Str) |
| Convert character's value, interpreted as a code unit, to a string. | |
| static bool | ConvertAPValueToString (const APValue &V, QualType T, SmallVectorImpl< char > &Str, ASTContext &Context) |
| Convert \V to a string we can present to the user in a diagnostic \T is the type of the expression that has been evaluated into \V. | |
| static bool | UsefulToPrintExpr (const Expr *E) |
| Some Expression types are not useful to print notes about, e.g. | |
| template<typename ResultType> | |
| static bool | EvaluateAsStringImpl (Sema &SemaRef, Expr *Message, ResultType &Result, ASTContext &Ctx, Sema::StringEvaluationContext EvalContext, bool ErrorOnInvalidMessage) |
| static QualType | IgnorePackIndexing (QualType T) |
| static const TemplateSpecializationType * | GetClassTemplateSpecializationType (ASTContext &Context, QualType T) |
| static void | DiagnoseDependentFriendNotMember (Sema &S, SourceLocation Loc, NestedNameSpecifier NNS) |
| static void | SearchForReturnInStmt (Sema &Self, Stmt *S) |
| static void | DelegatingCycleHelper (CXXConstructorDecl *Ctor, llvm::SmallPtrSet< CXXConstructorDecl *, 4 > &Valid, llvm::SmallPtrSet< CXXConstructorDecl *, 4 > &Invalid, llvm::SmallPtrSet< CXXConstructorDecl *, 4 > &Current, Sema &S) |
| #define ABSTRACT_TYPELOC | ( | CLASS, | |
| PARENT ) |
| #define CheckPolymorphic | ( | Type | ) |
Definition at line 6206 of file SemaDeclCXX.cpp.
| #define OVERLOADED_OPERATOR | ( | Name, | |
| Spelling, | |||
| Token, | |||
| Unary, | |||
| Binary, | |||
| MemberOnly ) |
| #define TYPELOC | ( | CLASS, | |
| PARENT ) |
| typedef llvm::SmallPtrSet<QualType, 4> IndirectBaseSet |
Use small set to collect indirect bases.
As this is only used locally, there's no need to abstract the small size parameter.
Definition at line 2967 of file SemaDeclCXX.cpp.
|
strong |
| Enumerator | |
|---|---|
| New | |
| Delete | |
Definition at line 17285 of file SemaDeclCXX.cpp.
ImplicitInitializerKind - How an implicit base or member initializer should initialize its base or member.
| Enumerator | |
|---|---|
| IIK_Default | |
| IIK_Copy | |
| IIK_Move | |
| IIK_Inherit | |
Definition at line 4977 of file SemaDeclCXX.cpp.
| enum TrivialSubobjectKind |
The kind of subobject we are checking for triviality.
The values of this enumeration are used in diagnostics.
| Enumerator | |
|---|---|
| TSK_BaseClass | The subobject is a base class. |
| TSK_Field | The subobject is a non-static data member. |
| TSK_CompleteObject | The object is actually the complete object. |
Definition at line 10856 of file SemaDeclCXX.cpp.
|
static |
Definition at line 5724 of file SemaDeclCXX.cpp.
References Diag(), clang::CXXCtorInitializer::getAnyMember(), clang::TypeSourceInfo::getType(), clang::CXXCtorInitializer::getTypeSourceInfo(), clang::CXXCtorInitializer::isAnyMemberInitializer(), and Previous.
Referenced by DiagnoseBaseOrMemInitializerOrder().
|
static |
Add the most overridden methods from MD to Methods.
Definition at line 11197 of file SemaDeclCXX.cpp.
References AddMostOverridenMethods(), clang::CXXMethodDecl::getCanonicalDecl(), clang::CXXMethodDecl::overridden_methods(), and clang::CXXMethodDecl::size_overridden_methods().
Referenced by AddMostOverridenMethods(), and clang::Sema::FindHiddenVirtualMethods().
|
static |
Determine whether a defaulted postfix increment or decrement operator function for type C should be defined as deleted, as specified in C++2d [over.inc.default]p2, and whether every function it would invoke is constexpr.
If Diagnose is true, explain why the function is defined as deleted.
Definition at line 9594 of file SemaDeclCXX.cpp.
References clang::UnresolvedSetImpl::assign(), clang::OverloadCandidateSet::BestViableFunction(), clang::C, canCopyAndDestroyForDefaultedPostfixOperator(), clang::OverloadCandidateSet::CSK_Operator, clang::Deleted, clang::SemaBase::Diag(), clang::FunctionDecl::getDefaultedOrDeletedInfo(), clang::Decl::getLocation(), clang::Increment, clang::NamedDecl::isCXXClassMember(), clang::Sema::isMemberAccessibleForDeletion(), clang::Sema::LookupOverloadedUnaryOp(), clang::OverloadCandidateSet::NoteCandidates(), clang::Sema::NoteDeletedFunction(), clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::SemaBase::PDiag(), and clang::VK_LValue.
Referenced by clang::Sema::CheckExplicitlyDefaultedPostfixOperator(), and clang::Sema::DiagnoseDeletedDefaultedFunction().
|
static |
Definition at line 3143 of file SemaDeclCXX.cpp.
Referenced by clang::Sema::CheckDerivedToBaseConversion(), and clang::Sema::CheckMemberPointerConversion().
|
static |
Build the body of a defaulted postfix increment or decrement operator function.
C++2d [over.inc.default]p3: The implicit definition of a defaulted postfix increment or decrement operator function F that is not defined as deleted for a type C is equivalent to: C tmp(c); ++c; // or –c return tmp; where tmp is a variable defined for exposition only, and c is an lvalue that denotes *this if F is an implicit object member function, or the first parameter of F otherwise.
Definition at line 9920 of file SemaDeclCXX.cpp.
References clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnCXXThis(), clang::Sema::ActOnDeclStmt(), clang::Sema::ActOnExprStmt(), clang::Sema::AddInitializerToDecl(), clang::UnresolvedSetImpl::assign(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildReturnStmt(), clang::C, clang::cast(), clang::Sema::Context, clang::Sema::ConvertDeclToDeclGroup(), clang::ParenListExpr::Create(), clang::VarDecl::Create(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CurContext, clang::Sema::DiagnoseUseOfDecl(), clang::ActionResult< PtrTy, Compress >::get(), clang::FunctionDecl::getDefaultedOrDeletedInfo(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Increment, clang::Invalid, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::SC_None, clang::VarDecl::setNRVOVariable(), clang::StmtError(), and clang::VK_LValue.
Referenced by ComputeDefaultedPostfixOperatorExceptionSpec(), and clang::Sema::DefineDefaultedPostfixOperator().
|
static |
Definition at line 4985 of file SemaDeclCXX.cpp.
References clang::cast(), CastForMoving(), clang::Constructor, clang::Sema::Context, clang::DeclRefExpr::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CXXBaseSpecifier::getType(), clang::QualType::getUnqualifiedType(), IIK_Copy, IIK_Default, IIK_Inherit, IIK_Move, clang::Sema::ImpCastExprToType(), clang::InitializedEntity::InitializeBase(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXBaseSpecifier::isVirtual(), clang::Sema::MarkDeclRefReferenced(), clang::Sema::MaybeCreateExprWithCleanups(), clang::InitializationSequence::Perform(), clang::VK_LValue, and clang::VK_XValue.
Referenced by clang::Sema::SetCtorInitializers().
|
static |
Definition at line 5068 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), clang::AS_public, clang::Sema::BuildMemberReferenceExpr(), clang::cast(), CastForMoving(), clang::Constructor, clang::Sema::Context, clang::DeclRefExpr::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getCanonicalTagType(), clang::QualType::hasNonTrivialObjCLifetime(), IIK_Copy, IIK_Default, IIK_Inherit, IIK_Move, clang::InitializedEntity::InitializeMemberImplicit(), int, clang::QualType::isConstQualified(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Sema::LookupMemberName, clang::Sema::MarkDeclRefReferenced(), clang::Sema::MaybeCreateExprWithCleanups(), RefersToRValueRef(), clang::LookupResult::resolveKind(), and clang::VK_LValue.
Referenced by CollectFieldInitializer().
|
static |
When generating a defaulted copy or move assignment operator, if a field should be copied with __builtin_memcpy rather than via explicit assignments, do so.
This optimization only applies for arrays of scalars, and for arrays of class type where the selected copy/move-assignment operator is trivial.
Definition at line 15503 of file SemaDeclCXX.cpp.
References clang::Sema::BuildCallExpr(), clang::Sema::BuildDeclRefExpr(), clang::ASTContext::BuiltinFnTy, clang::Call, clang::Sema::Context, clang::IntegerLiteral::Create(), clang::UnaryOperator::Create(), clang::Sema::CurFPFeatureOverrides(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::ASTContext::getPointerType(), clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::RecordDecl::hasObjectMember(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::OK_Ordinary, clang::StmtError(), clang::T, clang::Sema::TUScope, and clang::VK_PRValue.
Referenced by buildSingleCopyAssign(), clang::Sema::DefineImplicitCopyAssignment(), and clang::Sema::DefineImplicitMoveAssignment().
|
static |
Definition at line 15770 of file SemaDeclCXX.cpp.
References buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), clang::Sema::Context, and clang::T.
Referenced by clang::Sema::DefineImplicitCopyAssignment(), and clang::Sema::DefineImplicitMoveAssignment().
|
static |
Builds a statement that copies/moves the given entity from From to To.
This routine is used to copy/move the members of a class with an implicitly-declared copy/move assignment operator. When the entities being copied are arrays, this routine builds for loops to copy them.
| S | The Sema object used for type-checking. |
| Loc | The location where the implicit copy/move is being generated. |
| T | The type of the expressions being copied/moved. Both expressions must have this type. |
| To | The expression we are copying/moving to. |
| From | The expression we are copying/moving from. |
| CopyingBaseSubobject | Whether we're copying/moving a base subobject. Otherwise, it's a non-static member subobject. |
| Copying | Whether we're copying or moving. |
| Depth | Internal parameter recording the depth of the recursion. |
Definition at line 15582 of file SemaDeclCXX.cpp.
References clang::Sema::ActOnCondition(), clang::Sema::ActOnExprStmt(), clang::Sema::ActOnForStmt(), clang::AS_protected, clang::AS_public, clang::Assignment, clang::LookupResult::begin(), clang::Sema::Boolean, clang::ASTContext::BoolTy, clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildMemberReferenceExpr(), buildSingleCopyAssignRecursively(), clang::Call, clang::Comparison, clang::Sema::Context, clang::Copy, clang::BinaryOperator::Create(), clang::IntegerLiteral::Create(), clang::UnaryOperator::Create(), clang::VarDecl::Create(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CurContext, clang::Sema::CurFPFeatureOverrides(), clang::ASTContext::DeclarationNames, clang::LookupResult::Filter::done(), clang::LookupResult::end(), clang::LookupResult::Filter::erase(), clang::IdentifierTable::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::ArrayType::getElementType(), clang::Sema::getLangOpts(), clang::CXXMemberCallExpr::getMethodDecl(), clang::ConstantArrayType::getSize(), clang::ASTContext::getSizeType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeSize(), clang::LookupResult::Filter::hasNext(), clang::ASTContext::Idents, clang::Increment, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::FunctionDecl::isTrivial(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::LookupResult::makeFilter(), clang::Sema::MakeFullDiscardedValueExpr(), clang::CXXScopeSpec::MakeTrivial(), clang::LookupResult::Filter::next(), clang::OK_Ordinary, clang::SC_None, clang::VarDecl::setInit(), clang::StmtError(), clang::T, clang::VK_LValue, clang::VK_PRValue, and clang::Zero.
Referenced by buildSingleCopyAssign(), and buildSingleCopyAssignRecursively().
|
static |
Definition at line 13050 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Sema::CheckTemplateIdType(), clang::Sema::Context, clang::Sema::getStdNamespace(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::None, and clang::TemplateName.
Referenced by clang::Sema::BuildStdInitializerList(), and clang::Sema::tryBuildStdTypeIdentity().
|
static |
Determine whether the implicit definition of the defaulted postfix increment or decrement operator function FD can direct-initialize a variable of class type C from the lvalue Obj of type C, and then destroy it, using functions that are usable from the current context.
CheckConstexpr is called on each constructor the initialization invokes. If Diagnose is true, explain why the copy or destruction is not possible.
Definition at line 9538 of file SemaDeclCXX.cpp.
References clang::C, clang::InitializationKind::CreateDirect(), clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::InitializedEntity::InitializeTemporary(), clang::Sema::isMemberAccessibleForDeletion(), clang::Sema::LookupDestructor(), clang::DeclAccessPair::make(), clang::Sema::NoteDeletedFunction(), clang::SemaBase::PDiag(), clang::Seq, and clang::InitializationSequence::SK_ConstructorInitialization.
Referenced by analyzeDefaultedPostfixOperator().
|
static |
Determine whether a type is permitted to be passed or returned in registers, per C++ [class.temporary]p3.
Definition at line 6962 of file SemaDeclCXX.cpp.
References clang::TargetInfo::CCK_ClangABI4OrPS4, clang::TargetInfo::CCK_MicrosoftWin64, clang::Sema::Context, clang::CXXRecordDecl::ctors(), clang::CXXRecordDecl::defaultedCopyConstructorIsDeleted(), clang::CXXRecordDecl::defaultedDestructorIsDeleted(), clang::CXXRecordDecl::defaultedMoveConstructorIsDeleted(), clang::Sema::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::CXXRecordDecl::getDestructor(), clang::Sema::getLangOpts(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSize(), clang::CXXRecordDecl::hasNonTrivialCopyConstructorForCall(), clang::CXXRecordDecl::hasNonTrivialDestructorForCall(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialCopyConstructorForCall(), clang::CXXRecordDecl::hasTrivialDestructorForCall(), clang::CXXRecordDecl::hasTrivialMoveConstructorForCall(), clang::isa(), clang::TagDecl::isDependentType(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::methods(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), and clang::CXXRecordDecl::needsImplicitMoveConstructor().
Referenced by clang::Sema::CheckCompletedCXXClass(), and clang::TextNodeDumper::VisitCXXRecordDecl().
Definition at line 4962 of file SemaDeclCXX.cpp.
References clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildReferenceType(), clang::Sema::Context, clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::Expr::getType().
Referenced by BuildImplicitBaseInitializer(), and BuildImplicitMemberInitializer().
|
static |
Check for invalid uses of an abstract type within a class definition.
Definition at line 6286 of file SemaDeclCXX.cpp.
References clang::Sema::AbstractFieldType, CheckAbstractClassUsage(), clang::DeclContext::decls(), clang::TypeSourceInfo::getTypeLoc(), and clang::DeclaratorDecl::getTypeSourceInfo().
|
static |
Check for invalid uses of an abstract type in a function declaration.
Definition at line 6259 of file SemaDeclCXX.cpp.
References clang::Sema::AbstractNone, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::TypeSourceInfo::getTypeLoc(), and clang::DeclaratorDecl::getTypeSourceInfo().
Referenced by CheckAbstractClassUsage(), and clang::Sema::CheckCompletedCXXClass().
|
static |
Check for invalid uses of an abstract type in a variable0 declaration.
Definition at line 6274 of file SemaDeclCXX.cpp.
References clang::Sema::AbstractVariableType, clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::VarDecl::isThisDeclarationADefinition().
|
static |
Definition at line 1097 of file SemaDeclCXX.cpp.
References checkArrayLikeDecomposition(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration().
|
static |
Definition at line 1082 of file SemaDeclCXX.cpp.
References clang::Sema::ActOnIntegerConstant(), checkSimpleDecomposition(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by checkArrayDecomposition(), and checkVectorDecomposition().
|
static |
Definition at line 1010 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::BindingDecl::Create(), clang::FunctionParmPackExpr::Create(), clang::ASTContext::DependentTy, clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ASTContext::getPackExpansionType(), clang::ValueDecl::isParameterPack(), clang::BindingDecl::setBinding(), and clang::BindingDecl::setDecomposedDecl().
Referenced by checkMemberDecomposition(), checkSimpleDecomposition(), and checkTupleLikeDecomposition().
|
static |
Definition at line 1114 of file SemaDeclCXX.cpp.
References checkSimpleDecomposition(), clang::Sema::Context, clang::ComplexType::getElementType(), clang::ASTContext::getQualifiedType(), and clang::QualType::getQualifiers().
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration().
|
static |
Check that the given field is initialized within a constexpr constructor.
| Dcl | The constexpr constructor being checked. |
| Field | The field being checked. This may be a member of an anonymous struct or union nested within the class being checked. |
| Inits | All declarations, including anonymous struct/union members and indirect members, for which any initialization was provided. |
| Diagnosed | Whether we've emitted the error message yet. Used to attach multiple notes for different members to the same error. |
| Kind | Whether we're diagnosing a constructor as written or determining whether the formal requirements are satisfied. |
false if we're checking for validity and the constructor does not satisfy the requirements on a constexpr constructor. Definition at line 2212 of file SemaDeclCXX.cpp.
References CheckConstexprCtorInitializer(), clang::Sema::CheckValid, clang::SemaBase::Diag(), clang::SemaBase::DiagCompat(), clang::Sema::Diagnose, clang::Sema::getLangOpts(), clang::Decl::getLocation(), and clang::Inits.
Referenced by CheckConstexprCtorInitializer(), and CheckConstexprFunctionBody().
|
static |
Check the given declaration statement is legal within a constexpr function body.
C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.
Definition at line 2070 of file SemaDeclCXX.cpp.
References clang::cast(), CheckLiteralType(), clang::DeclStmt::decls(), clang::SemaBase::Diag(), clang::SemaBase::DiagCompat(), clang::Sema::Diagnose, clang::DeclStmt::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::Sema::getLangOpts(), clang::TypeLoc::getSourceRange(), clang::TypeLoc::getType(), clang::isa(), clang::FunctionDecl::isConsteval(), clang::SourceLocation::isValid(), clang::Sema::LangOpts, and clang::VarDecl::TLS_Dynamic.
Referenced by CheckConstexprFunctionStmt().
|
static |
Determine whether a destructor cannot be constexpr due to.
Definition at line 1890 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::SemaBase::Diag(), clang::Sema::Diagnose, clang::RecordDecl::fields(), clang::FunctionDecl::getConstexprKind(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::hasConstexprDestructor(), and clang::T.
Referenced by clang::Sema::CheckConstexprFunctionDefinition().
|
static |
Check the body for the given constexpr function declaration only contains the permitted types of statement.
C++11 [dcl.constexpr]p3,p4.
Definition at line 2420 of file SemaDeclCXX.cpp.
References CheckConstexprCtorInitializer(), CheckConstexprFunctionStmt(), CheckConstexprMissingReturn(), clang::Sema::CheckValid, clang::Stmt::children(), clang::Constructor, clang::SemaBase::Diag(), Diag(), clang::SemaBase::DiagCompat(), clang::Sema::Diagnose, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::RecordDecl::fields(), clang::Stmt::getBeginLoc(), clang::Sema::getDiagnostics(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNameInfo(), clang::CXXRecordDecl::getNumBases(), clang::Sema::getSourceManager(), clang::DeclarationNameInfo::getSourceRange(), clang::CXXRecordDecl::hasVariantMembers(), clang::Inits, clang::isa(), clang::FunctionDecl::isConsteval(), clang::DiagnosticsEngine::isIgnored(), clang::SourceManager::isInSystemHeader(), clang::Expr::isPotentialConstantExpr(), clang::TagDecl::isUnion(), and clang::SourceLocation::isValid().
Referenced by clang::Sema::CheckConstexprFunctionDefinition().
|
static |
Check the provided statement is allowed in a constexpr function definition.
Definition at line 2266 of file SemaDeclCXX.cpp.
References clang::cast(), CheckConstexprDeclStmt(), CheckConstexprFunctionStmt(), clang::Stmt::children(), clang::SemaBase::Diag(), clang::Sema::Diagnose, clang::Stmt::getBeginLoc(), clang::Sema::getLangOpts(), clang::Stmt::getStmtClass(), clang::If, clang::isa(), clang::FunctionDecl::isConsteval(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().
Referenced by CheckConstexprFunctionBody(), and CheckConstexprFunctionStmt().
|
static |
Definition at line 2610 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::isConsteval(), clang::Type::isDependentType(), and clang::Type::isVoidType().
Referenced by CheckConstexprFunctionBody().
|
static |
Check whether a function's parameter types are all literal types.
If so, return true. If not, produce a suitable diagnostic and return false.
Definition at line 1923 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckLiteralType(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::isa(), and clang::FunctionDecl::isConsteval().
Referenced by clang::Sema::CheckConstexprFunctionDefinition(), clang::Sema::CheckExplicitlyDefaultedComparison(), and clang::Sema::CheckExplicitlyDefaultedPostfixOperator().
|
static |
Check whether a function's return type is a literal type.
If so, return true. If not, produce a suitable diagnostic and return false.
Definition at line 1947 of file SemaDeclCXX.cpp.
References CheckLiteralType(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), and clang::FunctionDecl::isConsteval().
Referenced by clang::Sema::CheckConstexprFunctionDefinition(), clang::Sema::CheckExplicitlyDefaultedComparison(), and clang::Sema::CheckExplicitlyDefaultedPostfixOperator().
|
static |
Definition at line 6464 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::isa(), and clang::TemplateParameterList::size().
Referenced by clang::Sema::CheckCompletedCXXClass().
|
static |
Definition at line 6518 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::isa(), and clang::TemplateParameterList::size().
Referenced by clang::Sema::CheckCompletedCXXClass().
|
static |
Definition at line 6417 of file SemaDeclCXX.cpp.
References clang::Sema::BuildCtorClosureDefaultArgs(), checkForMultipleExportedDefaultConstructors(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiscardCleanupsInEvaluationContext(), clang::TargetInfo::getCXXABI(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::TargetCXXABI::isMicrosoft(), and clang::Member.
Referenced by clang::Sema::ActOnFinishCXXMemberDecls(), and checkForMultipleExportedDefaultConstructors().
|
static |
Definition at line 17724 of file SemaDeclCXX.cpp.
References clang::ASTContext::CharTy, clang::Sema::Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::Type::getAsCanonical(), clang::SourceRange::getBegin(), clang::TemplateTypeParmDecl::getDepth(), clang::TemplateTypeParmDecl::getIndex(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateParameterList::getSourceRange(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Sema::inTemplateInstantiation(), clang::Type::isRecordType(), clang::Decl::isTemplateParameterPack(), and clang::TemplateParameterList::size().
Referenced by clang::Sema::CheckLiteralOperatorDeclaration().
|
static |
Check that the given type is a literal type.
Issue a diagnostic if not, if Kind is Diagnose.
true if a problem has been found (and optionally diagnosed). Definition at line 1871 of file SemaDeclCXX.cpp.
References clang::Sema::CheckValid, clang::Sema::Context, clang::Sema::Diagnose, clang::Sema::RequireLiteralType(), and clang::T.
|
static |
Definition at line 1592 of file SemaDeclCXX.cpp.
References clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildQualifiedType(), clang::cast(), CheckBindingsCount(), CheckMemberDecompositionFields(), clang::Sema::Context, findDecomposableBaseClass(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAccess(), clang::ASTContext::getCanonicalTagType(), clang::DeclAccessPair::getDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::Sema::ImpCastExprToType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::FieldDecl::isMutable(), clang::FieldDecl::isUnnamedBitField(), clang::DeclAccessPair::make(), clang::Qualifiers::removeConst(), clang::Sema::RequireCompleteType(), clang::BindingDecl::setBinding(), and clang::VK_LValue.
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration().
|
static |
Definition at line 1550 of file SemaDeclCXX.cpp.
References clang::Sema::CheckStructuredBindingMemberAccess(), clang::SemaBase::Diag(), clang::DeclAccessPair::getAccess(), clang::DeclAccessPair::getDecl(), clang::Type::isUnionType(), clang::DeclAccessPair::make(), and clang::CXXRecordDecl::MergeAccess().
Referenced by checkMemberDecomposition(), and clang::Sema::GetDecompositionElementCount().
|
static |
Definition at line 11666 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::DeclSpec::forEachQualifier(), clang::Declarator::getFunctionTypeInfo(), clang::DeclaratorChunk::FunctionTypeInfo::hasMethodTypeQualifiers(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::MethodQualifiers, and clang::Declarator::setInvalidType().
Referenced by clang::Sema::CheckConstructorDeclarator(), and clang::Sema::CheckDestructorDeclarator().
|
static |
Check if we're implicitly defining a move assignment operator for a class with virtual bases.
Such a move assignment might move-assign the virtual base multiple times.
Definition at line 16252 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Type::getAsCXXRecordDecl(), clang::CXXBaseSpecifier::getBeginLoc(), clang::CXXRecordDecl::getCanonicalDecl(), clang::Sema::SpecialMemberOverloadResult::getMethod(), clang::CXXBaseSpecifier::getSourceRange(), clang::CXXBaseSpecifier::getType(), clang::FunctionDecl::isDefaulted(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isTrivial(), clang::CXXBaseSpecifier::isVirtual(), clang::Sema::LookupSpecialMember(), and clang::MoveAssignment.
Referenced by clang::Sema::DefineImplicitMoveAssignment().
|
static |
Definition at line 17479 of file SemaDeclCXX.cpp.
References CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::Context, Delete, clang::SemaBase::Diag(), clang::ASTContext::getCanonicalTagType(), clang::ASTContext::getCanonicalType(), clang::Decl::getLocation(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::DeclContext::isDependentContext(), isDestroyingDeleteT(), clang::FunctionDecl::isDestroyingOperatorDelete(), IsPotentiallyDestroyingOperatorDelete(), IsPotentiallyTypeAwareOperatorNewOrDelete(), clang::Sema::isUsualDeallocationFunction(), clang::FunctionDecl::parameters(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by clang::Sema::CheckOverloadedOperatorDeclaration().
|
static |
Definition at line 17458 of file SemaDeclCXX.cpp.
References CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::Context, clang::ASTContext::getCanonicalType(), clang::ASTContext::getSizeType(), New, and clang::ASTContext::VoidPtrTy.
Referenced by clang::Sema::CheckOverloadedOperatorDeclaration().
|
inlinestatic |
Definition at line 17257 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), clang::FunctionDecl::getStorageClass(), clang::isa(), and clang::SC_Static.
Referenced by CheckOperatorDeleteDeclaration(), and CheckOperatorNewDeclaration().
|
inlinestatic |
Definition at line 17325 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ASTContext::getCanonicalTagType(), clang::ASTContext::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArgRange(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getSizeType(), clang::ParmVarDecl::getSourceRange(), clang::Sema::getStdAlignValT(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ParmVarDecl::hasDefaultArg(), IsPotentiallyDestroyingOperatorDelete(), IsPotentiallyTypeAwareOperatorNewOrDelete(), clang::FunctionDecl::isTemplateInstantiation(), New, RemoveAddressSpaceFromPtr(), clang::FunctionDecl::RequiredTypeAwareDeleteParameterCount, clang::FunctionDecl::RequiredTypeAwareNewParameterCount, clang::FunctionDecl::setIsDestroyingOperatorDelete(), clang::FunctionDecl::setIsTypeAwareOperatorNewOrDelete(), and clang::T.
Referenced by CheckOperatorDeleteDeclaration(), and CheckOperatorNewDeclaration().
|
static |
Definition at line 1057 of file SemaDeclCXX.cpp.
References clang::Sema::BuildDeclRefExpr(), clang::cast(), CheckBindingsCount(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), UINT_MAX, and clang::VK_LValue.
Referenced by checkArrayLikeDecomposition(), and checkComplexDecomposition().
|
static |
Check whether the members of a class type allow a special member to be trivial.
Definition at line 10917 of file SemaDeclCXX.cpp.
References checkTrivialClassMembers(), checkTrivialSubobjectCall(), clang::Sema::Context, clang::DefaultConstructor, clang::SemaBase::Diag(), clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::QualType::getObjCLifetime(), clang::QualType::hasNonTrivialObjCLifetime(), and TSK_Field.
Referenced by checkTrivialClassMembers(), and clang::Sema::SpecialMemberIsTrivial().
|
static |
Check whether the special member selected for a given type would be trivial.
Definition at line 10866 of file SemaDeclCXX.cpp.
References clang::QualType::addConst(), clang::DefaultConstructor, clang::SemaBase::Diag(), findTrivialSpecialMember(), findUserDeclaredCtor(), clang::Type::getAsCXXRecordDecl(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::QualType::getUnqualifiedType(), clang::IgnoreTrivialABI, clang::FunctionDecl::isUserProvided(), clang::Sema::SpecialMemberIsTrivial(), and TSK_CompleteObject.
Referenced by checkTrivialClassMembers(), clang::Sema::DiagnoseNontrivial(), and clang::Sema::SpecialMemberIsTrivial().
|
static |
Definition at line 1334 of file SemaDeclCXX.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::TemplateArgumentListInfo::addArgument(), clang::Sema::BuildCallExpr(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildReferenceType(), clang::cast(), CheckBindingsCount(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::Context, clang::ImplicitCastExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::VarDecl::Create(), clang::InitializationKind::CreateCopy(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::Preprocessor::getIdentifierInfo(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::ASTContext::getSizeType(), clang::VarDecl::getStorageClass(), getTrivialIntegralTemplateArgument(), clang::VarDecl::getTSCSpec(), getTupleLikeElementType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Init, clang::InitializedEntity::InitializeBinding(), clang::isa(), clang::LookupResult::isAmbiguous(), clang::Sema::isCompleteType(), clang::VarDecl::isConstexpr(), clang::VarDecl::isInlineSpecified(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), clang::Type::isLValueReferenceType(), clang::Expr::isPRValue(), clang::Sema::LookupMemberName, clang::Sema::LookupQualifiedName(), clang::Sema::PP, clang::Seq, clang::TemplateParameterList::size(), clang::T, clang::VK_LValue, and clang::VK_XValue.
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration().
|
static |
Definition at line 1105 of file SemaDeclCXX.cpp.
References checkArrayLikeDecomposition(), clang::Sema::Context, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::ASTContext::getQualifiedType(), and clang::QualType::getQualifiers().
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration().
|
static |
Definition at line 5327 of file SemaDeclCXX.cpp.
References clang::Sema::BuildCXXCtorDefaultInitExpr(), BuildImplicitMemberInitializer(), clang::Sema::checkInitializerLifetime(), clang::Sema::Context, clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getLocation(), clang::Init, clang::InitializedEntity::InitializeMemberImplicit(), isIncompleteOrZeroLengthArrayType(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by clang::Sema::SetCtorInitializers().
|
static |
Definition at line 9495 of file SemaDeclCXX.cpp.
References clang::cast(), computeExceptionSpecFromSynthesizedBody(), clang::Decl::FOK_None, clang::Decl::getDeclContext(), clang::Decl::getFriendObjectKind(), and clang::Decl::getLexicalDeclContext().
Referenced by computeImplicitExceptionSpec().
|
static |
Definition at line 9998 of file SemaDeclCXX.cpp.
References buildDefaultedPostfixOperatorBody(), and computeExceptionSpecFromSynthesizedBody().
Referenced by computeImplicitExceptionSpec().
|
static |
Definition at line 14741 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::ASTContext::getCanonicalTagType(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Decl::isInvalidDecl(), and clang::Sema::RequireCompleteType().
Referenced by computeImplicitExceptionSpec().
|
static |
Compute the exception specification of a defaulted function whose body is synthesized by BuildBody: a defaulted comparison operator function or a defaulted postfix increment or decrement operator function.
Definition at line 9453 of file SemaDeclCXX.cpp.
References clang::Sema::ImplicitExceptionSpecification::CalledStmt(), clang::FunctionDecl::getBody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::Sema::Unevaluated.
Referenced by ComputeDefaultedComparisonExceptionSpec(), and ComputeDefaultedPostfixOperatorExceptionSpec().
|
static |
Definition at line 7816 of file SemaDeclCXX.cpp.
References clang::cast(), ComputeDefaultedComparisonExceptionSpec(), ComputeDefaultedPostfixOperatorExceptionSpec(), ComputeDefaultedSpecialMemberExceptionSpec(), clang::DefaultConstructor, and clang::FunctionDecl::getDefaultedFunctionKind().
Referenced by clang::Sema::EvaluateImplicitExceptionSpec().
|
static |
Convert \V to a string we can present to the user in a diagnostic \T is the type of the expression that has been evaluated into \V.
Definition at line 18308 of file SemaDeclCXX.cpp.
References clang::APValue::ComplexFloat, clang::APValue::ComplexInt, clang::APValue::Float, clang::APValue::Int, int64_t, clang::APValue::LValue, clang::T, uint32_t, V, WriteCharTypePrefix(), and WriteCharValueForDiagnostic().
Referenced by clang::Sema::DiagnoseStaticAssertDetails().
|
static |
Determine whether the specified special member function would be constexpr if it were implicitly defined.
Definition at line 7668 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::cast(), clang::Sema::Context, clang::CopyAssignment, clang::CopyConstructor, clang::DefaultConstructor, clang::CXXRecordDecl::defaultedDefaultConstructorIsConstexpr(), clang::CXXRecordDecl::defaultedDestructorIsConstexpr(), clang::Destructor, clang::RecordDecl::fields(), clang::ASTContext::getBaseElementType(), clang::Sema::getLangOpts(), clang::CXXRecordDecl::getNumVBases(), clang::CXXRecordDecl::hasInClassInitializer(), clang::CXXRecordDecl::hasVariantMembers(), clang::Invalid, clang::CXXRecordDecl::isLiteral(), clang::TagDecl::isUnion(), clang::MoveAssignment, clang::MoveConstructor, and specialMemberIsConstexpr().
Referenced by clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), and clang::Sema::findInheritingConstructor().
|
static |
Definition at line 6926 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::DefaultedFunctionKind::asComparison(), clang::FunctionDecl::DefaultedFunctionKind::asPostfixOperator(), clang::FunctionDecl::DefaultedFunctionKind::asSpecialMember(), clang::cast(), clang::CopyAssignment, clang::CopyConstructor, clang::DefaultConstructor, clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineDefaultedPostfixOperator(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Destructor, clang::FunctionDecl::getDefaultedFunctionKind(), clang::Invalid, clang::FunctionDecl::DefaultedFunctionKind::isComparison(), clang::FunctionDecl::DefaultedFunctionKind::isPostfixOperator(), clang::MoveAssignment, and clang::MoveConstructor.
Referenced by clang::Sema::ActOnFinishCXXNonNestedClass(), clang::Sema::CheckCompletedCXXClass(), and clang::Sema::SetDeclDefaulted().
|
static |
Define a defaulted function whose body is synthesized by BuildBody: a defaulted comparison operator function or a defaulted postfix increment or decrement operator function.
Definition at line 9401 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), clang::Sema::Context, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Sema::getASTMutationListener(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::Sema::ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().
Referenced by clang::Sema::DefineDefaultedComparison(), and clang::Sema::DefineDefaultedPostfixOperator().
|
static |
Definition at line 20226 of file SemaDeclCXX.cpp.
References clang::C, clang::cast(), DelegatingCycleHelper(), clang::SemaBase::Diag(), clang::CXXConstructorDecl::getCanonicalDecl(), clang::CXXConstructorDecl::getTargetConstructor(), clang::CXXConstructorDecl::init_begin(), clang::Invalid, clang::Decl::isInvalidDecl(), and clang::Valid.
Referenced by clang::Sema::CheckDelegatingCtorCycles(), and DelegatingCycleHelper().
|
static |
Definition at line 5738 of file SemaDeclCXX.cpp.
References AddInitializerToDiag(), clang::CXXRecordDecl::bases(), clang::Constructor, clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::Sema::Diags, clang::RecordDecl::fields(), GetKeyForBase(), GetKeyForMember(), clang::Sema::getLangOpts(), clang::CXXCtorInitializer::getSourceLocation(), clang::Sema::getSourceManager(), clang::CXXCtorInitializer::getSourceRange(), clang::Lexer::getSourceText(), clang::CharSourceRange::getTokenRange(), clang::Init, clang::Inits, clang::DiagnosticsEngine::isIgnored(), PopulateKeysForFields(), and clang::CXXRecordDecl::vbases().
Referenced by clang::Sema::ActOnMemInitializers().
|
static |
Definition at line 18758 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), IgnorePackIndexing(), and clang::T.
Referenced by clang::Sema::CheckDependentFriend().
|
static |
Diagnose an implicit copy operation for a class which is odr-used, but which is deprecated because the class has a user-declared copy constructor, copy assignment operator, or destructor.
Definition at line 15878 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::ctors(), clang::SemaBase::Diag(), clang::CXXRecordDecl::getDestructor(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::hasUserDeclaredCopyAssignment(), clang::CXXRecordDecl::hasUserDeclaredCopyConstructor(), clang::CXXRecordDecl::hasUserDeclaredDestructor(), clang::isa(), clang::Decl::isImplicit(), clang::FunctionDecl::isUserProvided(), and clang::CXXRecordDecl::methods().
Referenced by clang::Sema::DefineImplicitCopyAssignment(), and clang::Sema::DefineImplicitCopyConstructor().
|
static |
Definition at line 11685 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::DeclaratorChunk::Function, clang::SourceRange::getBegin(), clang::Declarator::getNumTypeObjects(), clang::DeclaratorChunk::getSourceRange(), clang::Declarator::getTypeObject(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Paren, and clang::Declarator::setInvalidType().
Referenced by clang::Sema::CheckConstructorDeclarator(), and clang::Sema::CheckDestructorDeclarator().
|
static |
Definition at line 13133 of file SemaDeclCXX.cpp.
References clang::cast(), clang::Sema::Declaration, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionRange(), clang::TypoCorrection::getFoundDecl(), clang::Module::getTopLevelModuleName(), int, and clang::Module::isExplicitGlobalModule().
Referenced by TryNamespaceTypoCorrection().
|
static |
Diagnose a mismatch in 'inline' qualifiers when a namespace is reopened.
Definition at line 12509 of file SemaDeclCXX.cpp.
References clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getLocation(), and clang::NamespaceDecl::isInline().
Referenced by clang::Sema::ActOnStartNamespaceDef().
|
static |
Definition at line 18469 of file SemaDeclCXX.cpp.
References clang::APValue, clang::Sema::BuildCallExpr(), clang::Sema::BuildConvertedConstantExpression(), clang::Sema::BuildMemberReferenceExpr(), clang::ASTContext::CharTy, clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::Diags, clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getAsConstantArrayType(), clang::Sema::getASTContext(), clang::ASTContext::getConstType(), clang::ArrayType::getElementType(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), clang::ASTContext::getTypeSize(), clang::DiagnosticsEngine::isIgnored(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerType(), clang::Expr::isValueDependent(), clang::Sema::LookupMemberName, clang::Sema::LookupQualifiedName(), clang::Member, clang::Note, clang::Sema::PP, SizeT, clang::StaticAssertMessageData, clang::StaticAssertMessageSize, clang::T, and clang::Sema::TemporaryMaterializationConversion().
Referenced by clang::Sema::EvaluateAsString(), and clang::Sema::EvaluateAsString().
|
static |
Definition at line 12001 of file SemaDeclCXX.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::SourceRange::isInvalid().
Referenced by clang::Sema::CheckConversionDeclarator().
|
static |
Definition at line 12009 of file SemaDeclCXX.cpp.
Referenced by clang::Sema::CheckConversionDeclarator().
|
static |
Find the direct and/or virtual base specifiers that correspond to the given base type, for use in base initialization within a constructor.
Definition at line 4307 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::Context, clang::ASTContext::getCanonicalTagType(), clang::Decl::getLocation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Sema::IsDerivedFrom(), and clang::CXXBaseSpecifier::isVirtual().
Referenced by clang::Sema::BuildBaseInitializer(), and clang::Sema::BuildMemInitializer().
|
static |
Find the base class to decompose in a built-in decomposition of a class type.
This base class search is, unfortunately, not quite like any other that we perform anywhere else in C++.
Definition at line 1479 of file SemaDeclCXX.cpp.
References clang::CXXBasePath::Access, clang::AS_public, clang::Sema::BuildBasePathArray(), clang::Sema::CheckBaseClassAccess(), clang::Sema::Context, clang::SemaBase::Diag(), clang::CXXBasePaths::front(), clang::Sema::getAmbiguousPathsDisplayString(), clang::ASTContext::getCanonicalTagType(), clang::ASTContext::getCanonicalType(), clang::CXXRecordDecl::hasDirectFields(), clang::ASTContext::hasSameType(), clang::CXXBasePaths::isAmbiguous(), clang::CXXRecordDecl::lookupInBases(), clang::DeclAccessPair::make(), and clang::CXXBasePaths::setOrigin().
Referenced by checkMemberDecomposition(), and clang::Sema::GetDecompositionElementCount().
|
static |
Find the base specifier for a base class with the given type.
Definition at line 13677 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), and clang::Type::getCanonicalTypeUnqualified().
Referenced by clang::Sema::CheckInheritingConstructorUsingDecl().
|
static |
Find the equality comparison functions that should be implicitly declared in a given class definition, per C++2a [class.compare.default]p3.
Definition at line 11404 of file SemaDeclCXX.cpp.
References Cmp, clang::ASTContext::DeclarationNames, clang::DeclContextLookupResult::empty(), clang::Friend, clang::CXXRecordDecl::friends(), clang::DeclarationNameTable::getCXXOperatorName(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::isExplicitlyDefaulted(), and clang::DeclContext::lookup().
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass().
|
static |
Perform lookup for a special member of the specified kind, and determine whether it is trivial.
If the triviality can be determined without the lookup, skip it. This is intended for use when determining whether a special member of a containing object is trivial, and thus does not ever perform overload resolution for default constructors.
If Selected is not NULL, *Selected will be filled in with the member that was most likely to be intended to be trivial, if any.
If ForCall is true, look at CXXRecord::HasTrivialSpecialMembersForCall to determine whether the special member is trivial.
Definition at line 10711 of file SemaDeclCXX.cpp.
References clang::Sema::SpecialMemberOverloadResult::Ambiguous, clang::ConsiderTrivialABI, clang::Qualifiers::Const, clang::CopyAssignment, clang::CopyConstructor, clang::CXXRecordDecl::ctors(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::DefaultConstructor, clang::Destructor, clang::CXXRecordDecl::getDestructor(), clang::Sema::SpecialMemberOverloadResult::getKind(), clang::Sema::SpecialMemberOverloadResult::getMethod(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialCopyConstructorForCall(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::hasTrivialDestructorForCall(), clang::Invalid, clang::FunctionDecl::isTrivial(), clang::FunctionDecl::isTrivialForCall(), clang::FunctionDecl::isUserProvided(), lookupCallFromSpecialMember(), clang::MoveAssignment, clang::MoveConstructor, clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), and clang::Sema::SpecialMemberOverloadResult::NoMemberOrDeleted.
Referenced by checkTrivialSubobjectCall().
|
static |
Definition at line 10838 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::ctors(), clang::DeclContext::decls_begin(), and clang::DeclContext::decls_end().
Referenced by checkTrivialSubobjectCall().
|
static |
Definition at line 473 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::parameters().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), and clang::Sema::MergeCXXFunctionDecl().
|
static |
Definition at line 18730 of file SemaDeclCXX.cpp.
References IgnorePackIndexing(), clang::isa(), and clang::T.
Referenced by clang::Sema::CheckDependentFriend().
|
static |
Definition at line 7838 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::ASTContext::getDefaultCallingConvention(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::FunctionType::ExtInfo::withCallingConv().
|
static |
Definition at line 5712 of file SemaDeclCXX.cpp.
Referenced by DiagnoseBaseOrMemInitializerOrder(), and GetKeyForMember().
|
static |
Definition at line 5716 of file SemaDeclCXX.cpp.
References GetKeyForBase(), and clang::Member.
Referenced by clang::Sema::ActOnMemInitializers(), and DiagnoseBaseOrMemInitializerOrder().
|
inlinestatic |
getNamespaceDecl - Returns the namespace a decl represents.
If the decl is a namespace alias, returns the namespace it points to.
Definition at line 12710 of file SemaDeclCXX.cpp.
References clang::NamespaceBaseDecl::getNamespace().
Referenced by clang::Sema::ActOnNamespaceAliasDef().
|
static |
Get the type of the first parameter of a postfix increment or decrement operator function, where the implicit object parameter (if any) is considered to be the first parameter.
Definition at line 9525 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::getParamDecl(), and clang::ValueDecl::getType().
Referenced by clang::Sema::CheckExplicitlyDefaultedPostfixOperator(), and clang::Sema::DiagnoseDeletedDefaultedFunction().
|
static |
Get diagnostic select index for tag kind for record diagnostic message.
WARNING: Indexes apply to particular diagnostics only!
Definition at line 1963 of file SemaDeclCXX.cpp.
References clang::Class, clang::Interface, and clang::Struct.
Referenced by clang::Sema::AttachBaseSpecifiers(), and clang::Sema::CheckConstexprFunctionDefinition().
|
static |
Definition at line 1146 of file SemaDeclCXX.cpp.
References clang::Sema::CheckTemplateIdType(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Found, clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::ASTContext::getPrintingPolicy(), clang::Sema::getStdNamespace(), clang::TemplateDecl::getTemplateParameters(), clang::Sema::isCompleteType(), clang::QualType::isNull(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::None, clang::Sema::PP, printTemplateArgs(), clang::Sema::RequireCompleteType(), and clang::TemplateName.
Referenced by getTupleLikeElementType(), and isTupleLike().
|
static |
Definition at line 1207 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTContext::MakeIntValue(), and clang::T.
Referenced by checkTupleLikeDecomposition(), and getTupleLikeElementType().
|
static |
Definition at line 1214 of file SemaDeclCXX.cpp.
References clang::Sema::getTrivialTemplateArgumentLoc(), and clang::T.
Referenced by getTupleLikeElementType(), and isTupleLike().
|
static |
Definition at line 1284 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Type::getAsCXXRecordDecl(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getPrintingPolicy(), clang::ASTContext::getSizeType(), getStdTrait(), getTrivialIntegralTemplateArgument(), getTrivialTypeTemplateArgument(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::QualType::isNull(), lookupMember(), clang::Sema::LookupOrdinaryName, clang::None, clang::Sema::PP, printTemplateArgs(), and clang::T.
Referenced by checkTupleLikeDecomposition().
Definition at line 3471 of file SemaDeclCXX.cpp.
References clang::T.
Referenced by IsUnusedPrivateField().
|
static |
Determine whether the given list arguments contains exactly one "real" (non-default) argument.
Definition at line 16992 of file SemaDeclCXX.cpp.
Referenced by clang::Sema::BuildCXXConstructExpr().
Definition at line 18723 of file SemaDeclCXX.cpp.
References clang::T.
Referenced by DiagnoseDependentFriendNotMember(), and GetClassTemplateSpecializationType().
Definition at line 3410 of file SemaDeclCXX.cpp.
References clang::Type::getBaseElementTypeUnsafe(), clang::ValueDecl::getType(), and clang::T.
Referenced by IsUnusedPrivateField().
Definition at line 17305 of file SemaDeclCXX.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::isInStdNamespace(), and clang::IdentifierInfo::isStr().
Referenced by CheckOperatorDeleteDeclaration(), and IsPotentiallyDestroyingOperatorDelete().
|
static |
Determine whether a using declaration considers the given declarations as "equivalent", e.g., if they are redeclarations of the same entity or are both typedefs of the same type.
Definition at line 13413 of file SemaDeclCXX.cpp.
References clang::Decl::getCanonicalDecl(), and clang::isa().
Referenced by clang::Sema::CheckUsingShadowDecl().
|
static |
Determine whether the given type is an incomplete or zero-lenfgth array type.
Definition at line 5313 of file SemaDeclCXX.cpp.
References clang::T.
Referenced by CollectFieldInitializer(), and MarkFieldDestructorReferenced().
|
static |
Definition at line 17311 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::isa(), isDestroyingDeleteT(), and IsPotentiallyTypeAwareOperatorNewOrDelete().
Referenced by CheckOperatorDeleteDeclaration(), and CheckOperatorNewDeleteTypes().
|
static |
Definition at line 17287 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), and clang::Sema::isStdTypeIdentity().
Referenced by CheckOperatorDeleteDeclaration(), CheckOperatorNewDeleteTypes(), and IsPotentiallyDestroyingOperatorDelete().
|
static |
Definition at line 12899 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::IdentifierTable::get(), clang::Type::getAs(), clang::Type::getAsNonAliasTemplateSpecializationType(), clang::Type::getAsTagDecl(), clang::NamedDecl::getIdentifier(), clang::Preprocessor::getIdentifierTable(), clang::Sema::getLangOpts(), clang::TemplateParameterList::getMinRequiredArguments(), clang::Decl::getNonTransparentDeclContext(), clang::TemplateParameterList::getParam(), clang::ASTContext::getQualifiedType(), clang::Sema::getStdNamespace(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::isa(), clang::Decl::isInStdNamespace(), clang::Decl::isTemplateParameterPack(), clang::Qualifiers::OCL_Strong, clang::Sema::PP, clang::Qualifiers::setObjCLifetime(), clang::Sema::StdNamespace, and clang::Template.
Referenced by clang::Sema::isStdInitializerList(), and clang::Sema::isStdTypeIdentity().
|
static |
Definition at line 1220 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsCXXRecordDecl(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getPrintingPolicy(), getStdTrait(), getTrivialTypeTemplateArgument(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), lookupMember(), clang::Sema::LookupOrdinaryName, clang::Sema::PP, printTemplateArgs(), clang::T, UINT_MAX, and clang::Sema::VerifyIntegerConstantExpression().
Referenced by clang::Sema::CheckCompleteDecompositionDeclaration(), and clang::Sema::GetDecompositionElementCount().
Definition at line 3479 of file SemaDeclCXX.cpp.
References clang::AS_private, clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), HasAttribute(), InitializationHasSideEffects(), clang::DeclContext::isDependentContext(), and clang::Decl::isImplicit().
Referenced by clang::Sema::ActOnCXXMemberDeclarator().
|
static |
Determine whether a using statement is in a context where it will be apply in all contexts.
Definition at line 13104 of file SemaDeclCXX.cpp.
References clang::DeclContext::getDeclKind(), clang::DeclContext::getParent(), and IsUsingDirectiveInToplevelContext().
Referenced by clang::Sema::ActOnUsingDirective(), and IsUsingDirectiveInToplevelContext().
|
static |
Determine whether a direct base class is a virtual base class.
Definition at line 13603 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), and clang::CXXRecordDecl::getNumVBases().
Referenced by clang::Sema::BuildUsingShadowDecl().
|
static |
Look up the special member function that would be called by a special member function for a subobject of class type.
| Class | The class type of the subobject. |
| CSM | The kind of special member function. |
| FieldQuals | If the subobject is a field, its cv-qualifiers. |
| ConstRHS | True if this is a copy operation with a const object on its RHS, that is, if the argument to the outer special member function is 'const' and this is not a field marked 'mutable'. |
Definition at line 7527 of file SemaDeclCXX.cpp.
References clang::Qualifiers::Const, clang::CopyAssignment, clang::DefaultConstructor, clang::Destructor, clang::Sema::LookupSpecialMember(), clang::MoveAssignment, and clang::Qualifiers::Volatile.
Referenced by findTrivialSpecialMember(), and specialMemberIsConstexpr().
|
static |
Definition at line 5417 of file SemaDeclCXX.cpp.
References clang::Sema::LookupDestructor().
Referenced by MarkBaseDestructorsReferenced(), MarkFieldDestructorReferenced(), and clang::Sema::MarkVirtualBaseDestructorsReferenced().
|
static |
Definition at line 1199 of file SemaDeclCXX.cpp.
References clang::LookupResult::isAmbiguous(), and clang::Sema::LookupQualifiedName().
|
static |
Perform the unqualified lookups that might be needed to form a defaulted comparison function for the given operator.
Definition at line 9029 of file SemaDeclCXX.cpp.
References clang::getRewrittenOverloadedOperator(), and clang::Self.
Referenced by clang::Sema::CheckExplicitlyDefaultedComparison().
|
static |
Definition at line 13012 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::Found, clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::TemplateParameterList::getMinRequiredArguments(), clang::TemplateParameterList::getParam(), clang::Sema::getStdNamespace(), clang::isa(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::PP, clang::Sema::StdNamespace, and clang::Template.
Referenced by clang::Sema::BuildStdInitializerList(), and clang::Sema::tryBuildStdTypeIdentity().
|
static |
Definition at line 5459 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::CheckDestructorAccess(), clang::Sema::Context, clang::Sema::DiagnoseUseOfDecl(), clang::ASTContext::getCanonicalTagType(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getDestructor(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::isAbstract(), clang::DeclContext::isDependentContext(), clang::TargetCXXABI::isMicrosoft(), LookupDestructorIfRelevant(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), and clang::SemaBase::PDiag().
Referenced by clang::Sema::MarkBaseAndMemberDestructorsReferenced(), and clang::Sema::SetCtorInitializers().
|
static |
Definition at line 5428 of file SemaDeclCXX.cpp.
References clang::Sema::CheckDestructorAccess(), clang::Sema::Context, clang::Sema::DiagnoseUseOfDecl(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), isIncompleteOrZeroLengthArrayType(), LookupDestructorIfRelevant(), clang::Sema::MarkFunctionReferenced(), and clang::SemaBase::PDiag().
Referenced by clang::Sema::MarkBaseAndMemberDestructorsReferenced(), and clang::Sema::SetCtorInitializers().
|
static |
Recursively add the bases of Type. Don't add Type itself.
Definition at line 2971 of file SemaDeclCXX.cpp.
References clang::Type::getAsCXXRecordDecl(), NoteIndirectBases(), and clang::Set.
Referenced by clang::Sema::AttachBaseSpecifiers(), and NoteIndirectBases().
|
static |
Definition at line 5700 of file SemaDeclCXX.cpp.
References clang::RecordDecl::fields(), clang::RecordDecl::getDefinitionOrSelf(), clang::RecordDecl::isAnonymousStructOrUnion(), and PopulateKeysForFields().
Referenced by DiagnoseBaseOrMemInitializerOrder(), and PopulateKeysForFields().
|
static |
Definition at line 1127 of file SemaDeclCXX.cpp.
References clang::TemplateArgumentListInfo::arguments(), clang::First, and clang::TemplateParameterList::shouldIncludeTypeForArgument().
Referenced by getStdTrait(), getTupleLikeElementType(), and isTupleLike().
|
static |
Definition at line 6321 of file SemaDeclCXX.cpp.
References clang::Sema::BuildCtorClosureDefaultArgs(), clang::Sema::Consumer, clang::Sema::Context, clang::Sema::CodeSynthesisContext::Entity, clang::TargetInfo::getCXXABI(), clang::getDLLAttr(), clang::Attr::getKind(), clang::Attr::getLocation(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTConsumer::HandleTopLevelDecl(), clang::Attr::isInherited(), clang::TargetCXXABI::isMicrosoft(), clang::Sema::CodeSynthesisContext::Kind, clang::Sema::MarkFunctionReferenced(), clang::Sema::CodeSynthesisContext::MarkingClassDllexported, clang::Sema::MarkVariableReferenced(), clang::Sema::MarkVTableUsed(), clang::Member, clang::Sema::CodeSynthesisContext::PointOfInstantiation, clang::Sema::popCodeSynthesisContext(), clang::Sema::pushCodeSynthesisContext(), clang::SC_Static, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by clang::Sema::referenceDLLExportedClassMethods().
Definition at line 5062 of file SemaDeclCXX.cpp.
References clang::cast(), clang::ValueDecl::getType(), and clang::Type::isRValueReferenceType().
Referenced by BuildImplicitMemberInitializer().
|
static |
Definition at line 17276 of file SemaDeclCXX.cpp.
References clang::Sema::Context, clang::ASTContext::getCanonicalType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), and clang::Qualifiers::removeAddressSpace().
Referenced by CheckOperatorNewDeleteTypes().
|
static |
Report an error regarding overriding, along with any relevant overridden methods.
| DiagID | the primary error to report. |
| MD | the overriding method. |
Definition at line 7081 of file SemaDeclCXX.cpp.
References clang::SemaBase::Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CXXMethodDecl::overridden_methods(), and clang::sema::Report.
Referenced by clang::Sema::CheckCompletedCXXClass().
Definition at line 19649 of file SemaDeclCXX.cpp.
References clang::Stmt::children(), clang::isa(), SearchForReturnInStmt(), and clang::Self.
Referenced by clang::Sema::DiagnoseReturnInConstructorExceptionHandler(), and SearchForReturnInStmt().
|
static |
Is the special member function which would be selected to perform the specified operation on the specified class type a constexpr constructor?
Definition at line 7633 of file SemaDeclCXX.cpp.
References clang::DefaultConstructor, clang::Destructor, clang::Sema::SpecialMemberOverloadResult::getMethod(), clang::CXXRecordDecl::hasConstexprDefaultConstructor(), clang::CXXRecordDecl::hasConstexprDestructor(), clang::FunctionDecl::isConstexpr(), and lookupCallFromSpecialMember().
Referenced by defaultedSpecialMemberIsConstexpr().
|
static |
Definition at line 13151 of file SemaDeclCXX.cpp.
References clang::Sema::computeDeclContext(), clang::Sema::CorrectTypo(), DiagnoseInvisibleNamespace(), clang::Sema::diagnoseTypo(), clang::ErrorRecovery, clang::Sema::getLangOpts(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getRange(), and clang::SemaBase::PDiag().
Referenced by clang::Sema::ActOnNamespaceAliasDef(), and clang::Sema::ActOnUsingDirective().
Some Expression types are not useful to print notes about, e.g.
literals and values that have already been expanded before such as int-valued template parameters.
Definition at line 18400 of file SemaDeclCXX.cpp.
References clang::Expr::IgnoreParenImpCasts(), clang::isa(), and UsefulToPrintExpr().
Referenced by clang::Sema::DiagnoseStaticAssertDetails(), and UsefulToPrintExpr().
|
static |
Definition at line 18243 of file SemaDeclCXX.cpp.
Referenced by ConvertAPValueToString().
|
static |
Convert character's value, interpreted as a code unit, to a string.
The value needs to be zero-extended to 32-bits. FIXME: This assumes Unicode literal encodings
Definition at line 18269 of file SemaDeclCXX.cpp.
References clang::escapeCStyle(), clang::EscapeStringForDiagnostic(), clang::BuiltinType::getKind(), and uint32_t.
Referenced by ConvertAPValueToString().