Home | History | Annotate | Download | only in Sema

Lines Matching defs:Const

136   const FunctionProtoType *Proto
586 if (const ReferenceType *R = NewType->getAs<ReferenceType>()) {
589 } else if (const PointerType *P = NewType->getAs<PointerType>()) {
592 } else if (const MemberPointerType *M = NewType->getAs<MemberPointerType>()) {
680 const FunctionDecl *FD) {
682 const FunctionProtoType *FT = FD->getType()->getAs<FunctionProtoType>();
685 const ParmVarDecl *PD = FD->getParamDecl(ArgIndex);
717 bool Sema::CheckConstexprFunctionDecl(const FunctionDecl *NewFD) {
718 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewFD);
724 const CXXRecordDecl *RD = MD->getParent();
742 const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(NewFD);
748 const CXXMethodDecl *WrittenVirtual = Method;
776 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
846 const FunctionDecl *Dcl,
864 const RecordDecl *RD = Field->getType()->castAs<RecordType>()->getDecl();
878 bool Sema::CheckConstexprFunctionBody(const FunctionDecl *Dcl, Stmt *Body) {
932 if (const CXXConstructorDecl *Constructor
934 const CXXRecordDecl *RD = Constructor->getParent();
1024 bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *,
1025 const CXXScopeSpec *SS) {
1043 static bool findCircularInheritance(const CXXRecordDecl *Class,
1044 const CXXRecordDecl *Current) {
1045 SmallVector<const CXXRecordDecl*, 8> Queue;
1272 if (const RecordType *Record = NewBaseType->getAs<RecordType>()) {
1273 const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl());
1315 if (const RecordType *RT = T->getAs<RecordType>())
1317 else if (const InjectedClassNameType *ICT = T->getAs<InjectedClassNameType>())
1358 void Sema::BuildBasePathArray(const CXXBasePaths &Paths,
1363 const CXXBasePath &Path = Paths.front();
1383 bool Sema::BasePathInvolvesVirtualBase(const CXXCastPath &BasePath) {
1528 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
1570 bool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New,
1571 const CXXMethodDecl *Old) {
1581 static bool InitializationHasSideEffects(const FieldDecl &FD) {
1582 const Type *T = FD.getType()->getBaseElementTypeUnsafe();
1584 if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
1599 Expr *BW, const VirtSpecifiers &VS,
1601 const DeclSpec &DS = D.getDeclSpec();
1664 // data members and cannot be applied to names declared const or static,
1702 B << 0 << 0 << FixItHint::CreateReplacement(ConstexprLoc, "const");
1704 const char *PrevSpec;
1709 assert(!Failed && "Making a constexpr member const shouldn't fail");
1712 const char *PrevSpec;
2031 const CXXBaseSpecifier *&DirectBaseSpec,
2032 const CXXBaseSpecifier *&VirtualBaseSpec) {
2077 const DeclSpec &DS,
2093 const DeclSpec &DS,
2115 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
2138 const DeclSpec &DS,
2245 const CXXBaseSpecifier *DirectBaseSpec;
2246 const CXXBaseSpecifier *VirtualBaseSpec;
2257 const CXXBaseSpecifier *BaseSpec = DirectBaseSpec? DirectBaseSpec
2306 const bool IsPointer = MemberTy->isPointerType();
2308 if (const UnaryOperator *Op
2329 } else if (const DeclRefExpr *DRE
2332 const ParmVarDecl *Parameter = dyn_cast<ParmVarDecl>(DRE->getDecl());
2548 const CXXBaseSpecifier *DirectBaseSpec = 0;
2549 const
2681 const CXXRecordDecl *Inherited =
2683 const CXXRecordDecl *Base = BaseSpec->getType()->getAsCXXRecordDecl();
2844 while (const ConstantArrayType *Array
3013 llvm::DenseMap<const void *, CXXCtorInitializer*> AllBaseFields;
3029 bool isImplicitCopyOrMove() const {
3074 while (const ConstantArrayType *ArrayT = Context.getAsConstantArrayType(T)) {
3309 static void PopulateKeysForFields(FieldDecl *Field, SmallVectorImpl<const void*> &IdealInits) {
3310 if (const RecordType *RT = Field->getType()->getAs<RecordType>()) {
3311 const RecordDecl *RD = RT->getDecl();
3335 Sema &SemaRef, const CXXConstructorDecl *Constructor,
3358 SmallVector<const void*, 32> IdealInitKeys;
3360 const CXXRecordDecl *ClassDecl = Constructor->getParent();
3445 const Type *BaseClass = Init->getBaseClass();
3587 const RecordType* RT = FieldType->getAs<RecordType>();
3611 llvm::SmallPtrSet<const RecordType *, 8> DirectVirtualBases;
3617 const RecordType *RT = Base->getType()->getAs<RecordType>();
3649 const RecordType *RT = VBase->getType()->castAs<RecordType>();
3710 if (const ArrayType *AT = Context.getAsArrayType(T))
3713 if (const PointerType *PT = T->getAs<PointerType>()) {
3715 while (const PointerType *T = PT->getPointeeType()->getAs<PointerType>())
3718 if (const ArrayType *AT = Context.getAsArrayType(PT->getPointeeType()))
3722 const RecordType *RT = T->getAs<RecordType>();
3726 const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
3731 const CXXRecordDecl *Def = RD->getDefinition();
3744 void Sema::DiagnoseAbstractType(const CXXRecordDecl *RD) {
3755 llvm::SmallPtrSet<const CXXMethodDecl *, 8> SeenPureMethods;
3809 void CheckType(const NamedDecl *D, TypeLoc TL, Sema::AbstractDiagSelID Sel);
3814 const NamedDecl *Ctx;
3816 CheckAbstractUsage(AbstractUsageInfo &Info, const NamedDecl *Ctx)
3899 void AbstractUsageInfo::CheckType(const NamedDecl *D, TypeLoc TL,
3969 // complain about any non-static data members of reference or const scalar
4063 // const. [...] The class of which that function is a member shall be
4176 const RecordType *BaseType = B->getType()->getAs<RecordType>();
4193 if (const RecordType *RecordTy =
4229 updateExceptionSpec(Sema &S, FunctionDecl *FD, const FunctionProtoType *FPT,
4230 const Sema::ImplicitExceptionSpecification &ExceptSpec) {
4233 const FunctionProtoType *NewFPT = cast<FunctionProtoType>(
4239 const FunctionProtoType *FPT = MD->getType()->castAs<FunctionProtoType>();
4253 const FunctionProtoType *CanonicalFPT =
4277 // copy operation can take a non-const reference) as an implicit
4296 const FunctionProtoType *Type = MD->getType()->getAs<FunctionProtoType>();
4328 // Argument must be reference to possibly-const T.
4343 // FIXME: Explain why this special member can't be const.
4423 CXXMethodDecl *MD, const FunctionProtoType *SpecifiedType) {
4427 const FunctionProtoType *ImplicitType = cast<FunctionProtoType>(
4495 bool inUnion() const { return MD->getParent()->isUnion(); }
4505 ConstArg || (Quals & Qualifiers::Const),
4508 TQ & Qualifiers::Const,
4653 // and, if a union, it must have a non-const member.
4661 // const-qualified type (or array thereof) with no
4669 << MD->getParent() << FD << FD->getType() << /*Const*/1;
4694 // -- a non-static data member of const non-class type (or array thereof)
4697 << IsMove << MD->getParent() << FD << FD->getType() << /*Const*/1;
4724 // At least one member in each anonymous union must be non-const
4749 /// X is a union and all of its variant members are of const-qualified type.
4952 if (Quals == Qualifiers::Const)
4972 if (Quals == Qualifiers::Const)
4986 Quals & Qualifiers::Const,
5142 void Sema::DiagnoseNontrivial(const CXXRecordDecl *RD, CXXSpecialMember CSM) {
5173 // Trivial copy operations always have const, non-volatile parameter types.
5175 const ParmVarDecl *Param0 = MD->getParamDecl(0);
5176 const ReferenceType *RT = Param0->getType()->getAs<ReferenceType>();
5177 if (!RT || RT->getPointeeType().getCVRQualifiers() != Qualifiers::Const) {
5191 const ParmVarDecl *Param0 = MD->getParamDecl(0);
5192 const RValueReferenceType *RT =
5305 llvm::SmallPtrSet<const CXXMethodDecl *, 8> OverridenAndUsingBaseMethods;
5311 static bool CheckMostOverridenMethods(const CXXMethodDecl *MD,
5312 const llvm::SmallPtrSet<const CXXMethodDecl *, 8>& Methods) {
5326 static bool FindHiddenVirtualMethod(const CXXBaseSpecifier *Specifier,
5366 static void AddMostOverridenMethods(const CXXMethodDecl *MD,
5367 llvm::SmallPtrSet<const CXXMethodDecl *, 8>& Methods) {
5426 for (const AttributeList* l = AttrList; l; l = l->getNext()) {
5628 // constructor can be invoked for a const, volatile or const
5629 // volatile object. A constructor shall not be declared const,
5630 // volatile, or const volatile (9.3.2).
5649 if (FTI.TypeQuals & Qualifiers::Const)
5651 << "const" << SourceRange(D.getIdentifierLoc());
5673 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5708 const char *ConstRef
5709 = Constructor->getParamDecl(0)->getIdentifier() ? "const &"
5710 : " const &";
5771 if (const TypedefType *TT = DeclaratorType->getAs<TypedefType>())
5774 else if (const TemplateSpecializationType *TST =
5785 // destructor can be invoked for a const, volatile or const
5786 // volatile object. A destructor shall not be declared const,
5787 // volatile or const volatile (9.3.2).
5813 if (FTI.TypeQuals & Qualifiers::Const)
5815 << "const" << SourceRange(D.getIdentifierLoc());
5856 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5902 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5976 if (const ReferenceType *ConvTypeRef = ConvType->getAs<ReferenceType>())
6078 const unsigned IDNS = Decl::IDNS_Ordinary | Decl::IDNS_Member |
6141 if (const VisibilityAttr *Attr = Namespc->getAttr<VisibilityAttr>())
6222 CXXRecordDecl *Sema::getStdBadAlloc() const {
6227 NamespaceDecl *Sema::getStdNamespace() const {
6260 const TemplateArgument *Arguments = 0;
6262 if (const RecordType *RT = Ty->getAs<RecordType>()) {
6271 } else if (const TemplateSpecializationType *TST =
6358 bool Sema::isInitListConstructor(const CXXConstructorDecl* Ctor) {
6369 if (const ReferenceType *RT = ArgType->getAs<ReferenceType>())
6393 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
6627 const LookupResult &Previous) {
6838 const DeclarationNameInfo &NameInfo,
6994 const Type *SourceType = UD->getQualifier()->getAsType();
7031 const CXXScopeSpec &SS,
7033 const LookupResult &Prev) {
7089 const CXXScopeSpec &SS,
7176 llvm::SmallPtrSet<const CXXRecordDecl*, 4> Bases;
7178 static bool collect(const CXXRecordDecl *Base, void *OpaqueData) {
7184 bool hasDependentBases(const CXXRecordDecl *Class) {
7190 static bool doesNotContain(const CXXRecordDecl *Base, void *OpaqueData) {
7195 bool mightShareBases(const CXXRecordDecl *Class) {
7439 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
7453 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
7486 } else if (const RecordType *RecordTy
7534 bool isAlreadyBeingDeclared() const {
7640 typedef SmallVector<const RecordType *, 4> BasesVector;
7668 llvm::SmallSet<const Type *, 8> ExistingConstructors;
7684 typedef llvm::DenseMap<const Type *, ConstructorInfo> ConstructorToSourceMap;
7689 const RecordType *Base = *BaseIt;
7719 const FunctionProtoType *BaseCtorType =
7757 const Type *CanonicalNewCtorType =
7779 const CXXConstructorDecl *PrevCtor = result.first->second.second;
7780 const CXXConstructorDecl *PrevBaseCtor =
7887 if (const RecordType *BaseType = B->getType()->getAs<RecordType>())
7896 if (const RecordType *BaseType = B->getType()->getAs<RecordType>())
7905 if (const RecordType *RecordTy
8020 const CXXDestructorDecl *Dtor =
8039 const FunctionProtoType *DtorType = Destructor->getType()->
8083 const Type *E = T->getBaseElementTypeUnsafe();
8161 if (const RecordType *RecordTy = T->getAs<RecordType>()) {
8209 const Type *CanonicalT = S.Context.getCanonicalType(T.getTypePtr());
8247 const ConstantArrayType *ArrayTy = S.Context.getAsConstantArrayType(T);
8362 const FunctionProtoType *T = MD->getType()->castAs<FunctionProtoType>();
8523 if (const LValueReferenceType *OtherRef
8608 // Check for members of const-qualified, non-class type.
9062 // Check for members of const-qualified, non-class type.
9167 const FunctionProtoType *T = MD->getType()->castAs<FunctionProtoType>();
9227 bool Const = ClassDecl->implicitCopyConstructorHasConstParam();
9228 if (Const)
9234 Const);
9343 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
9358 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
9696 void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {
9739 const FunctionProtoType *Proto
9762 llvm::makeArrayRef<const Expr *>(AllArgs.data(),
9771 const FunctionDecl *FnDecl) {
9772 const DeclContext *DC = FnDecl->getDeclContext()->getRedeclContext();
9790 CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
9838 CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
9954 static const bool OperatorUses[NUM_OVERLOADED_OPERATORS][3] = {
10018 if (const BuiltinType *BT = LastParam->getType()->getAs<BuiltinType>())
10088 // Otherwise it must be a pointer to const; let's strip those qualifiers.
10089 const PointerType *PT = T->getAs<PointerType>();
10100 // If there is no second parameter, the first must be a const char *
10107 // const char *, const wchar_t*, const char16_t*, and const char32_t*
10244 if (const PointerType *Ptr = BaseType->getAs<PointerType>()) {
10248 } else if (const ReferenceType *Ref = BaseType->getAs<ReferenceType>()) {
10268 if (const ReferenceType *RT = T->getAs<ReferenceType>())
10290 if (const RecordType *recordType = ExDeclType->getAs<RecordType>()) {
10460 if (const RecordType *RT = T->getAs<RecordType>()) {
10644 Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
10715 const DeclSpec &DS = D.getDeclSpec();
10992 if (const FunctionDecl *Prev = Fn->getPreviousDecl()) {
11027 const FunctionDecl *Primary = MD;
11028 if (const FunctionDecl *Pattern = MD->getTemplateInstantiationPattern())
11112 bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New,
11113 const CXXMethodDecl *Old) {
11114 const FunctionType *NewFT = New->getType()->getAs<FunctionType>();
11115 const FunctionType *OldFT = Old->getType()->getAs<FunctionType>();
11146 bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
11147 const CXXMethodDecl *Old) {
11159 if (const PointerType *NewPT = NewTy->getAs<PointerType>()) {
11160 if (const PointerType *OldPT = OldTy->getAs<PointerType>()) {
11164 } else if (const ReferenceType *NewRT = NewTy->getAs<ReferenceType>()) {
11165 if (const ReferenceType *OldRT = OldTy->getAs<ReferenceType>()) {
11187 if (const RecordType *RT = NewClassTy->getAs<RecordType>()) {
11412 const CXXMethodDecl *KeyFunction = Context.getCurrentKeyFunction(Class);
11471 const FunctionDecl *KeyFunctionDef = 0;
11487 const CXXRecordDecl *RD) {
11495 const CXXRecordDecl *RD) {
11521 const CXXRecordDecl *Base =
11567 if (const RecordType *RecordTy
11600 const FunctionDecl *FNTarget = 0;
11634 const FunctionDecl *FNTarget = 0;
11702 const FunctionProtoType *Proto = ProtoTL.getTypePtr();
11727 const FunctionProtoType *Proto = ProtoTL.getTypePtr();
11869 Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget(const FunctionDecl *D) {