Home | History | Annotate | Download | only in Sema

Lines Matching defs:Const

134   const FunctionProtoType *Proto
567 if (const ReferenceType *R = NewType->getAs<ReferenceType>()) {
570 } else if (const PointerType *P = NewType->getAs<PointerType>()) {
573 } else if (const MemberPointerType *M = NewType->getAs<MemberPointerType>()) {
661 const FunctionDecl *FD) {
663 const FunctionProtoType *FT = FD->getType()->getAs<FunctionProtoType>();
666 const ParmVarDecl *PD = FD->getParamDecl(ArgIndex);
684 bool Sema::CheckConstexprFunctionDecl(const FunctionDecl *NewFD) {
685 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewFD);
691 const CXXRecordDecl *RD = MD->getParent();
709 const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(NewFD);
715 const CXXMethodDecl *WrittenVirtual = Method;
743 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
813 const FunctionDecl *Dcl,
831 const RecordDecl *RD = Field->getType()->castAs<RecordType>()->getDecl();
845 bool Sema::CheckConstexprFunctionBody(const FunctionDecl *Dcl, Stmt *Body) {
899 if (const CXXConstructorDecl *Constructor
901 const CXXRecordDecl *RD = Constructor->getParent();
990 bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *,
991 const CXXScopeSpec *SS) {
1166 if (const RecordType *Record = NewBaseType->getAs<RecordType>())
1167 if (const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl()))
1198 if (const RecordType *RT = T->getAs<RecordType>())
1200 else if (const InjectedClassNameType *ICT = T->getAs<InjectedClassNameType>())
1241 void Sema::BuildBasePathArray(const CXXBasePaths &Paths,
1246 const CXXBasePath &Path = Paths.front();
1266 bool Sema::BasePathInvolvesVirtualBase(const CXXCastPath &BasePath) {
1407 void Sema::CheckOverrideControl(const Decl *D) {
1408 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
1432 bool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New,
1433 const CXXMethodDecl *Old) {
1451 Expr *BW, const VirtSpecifiers &VS,
1453 const DeclSpec &DS = D.getDeclSpec();
1472 // data members and cannot be applied to names declared const or static,
1696 const CXXBaseSpecifier *&DirectBaseSpec,
1697 const CXXBaseSpecifier *&VirtualBaseSpec) {
1742 const DeclSpec &DS,
1758 const DeclSpec &DS,
1779 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
1802 const DeclSpec &DS,
1909 const CXXBaseSpecifier *DirectBaseSpec;
1910 const CXXBaseSpecifier *VirtualBaseSpec;
1921 const CXXBaseSpecifier *BaseSpec = DirectBaseSpec? DirectBaseSpec
1970 const bool IsPointer = MemberTy->isPointerType();
1972 if (const UnaryOperator *Op
1993 } else if (const DeclRefExpr *DRE
1996 const ParmVarDecl *Parameter = dyn_cast<ParmVarDecl>(DRE->getDecl());
2017 static bool InitExprContainsUninitializedFields(const Stmt *S,
2018 const ValueDecl *LhsField,
2030 if (const MemberExpr *ME = dyn_cast<MemberExpr>(S)) {
2031 const NamedDecl *RhsField = ME->getMemberDecl();
2033 if (const VarDecl *VD = dyn_cast<VarDecl>(RhsField)) {
2050 // e.g. Foo(const Foo& rhs) : A(rhs.A) {}
2051 const Expr *base = ME->getBase();
2064 } else if (const UnaryOperator *UOE = dyn_cast<UnaryOperator>(S)) {
2281 const CXXBaseSpecifier *DirectBaseSpec = 0;
2282 const CXXBaseSpecifier *VirtualBaseSpec = 0;
2550 while (const ConstantArrayType *Array
2718 llvm::DenseMap<const void *, CXXCtorInitializer*> AllBaseFields;
2732 bool isImplicitCopyOrMove() const {
2766 while (const ConstantArrayType *ArrayT = Context.getAsConstantArrayType(T)) {
3004 if (const RecordType *RT = Field->getType()->getAs<RecordType>()) {
3044 const CXXConstructorDecl *Constructor,
3068 SmallVector<const void*, 32> IdealInitKeys;
3070 const CXXRecordDecl *ClassDecl = Constructor->getParent();
3155 const Type *BaseClass = Init->getBaseClass();
3302 const RecordType* RT = FieldType->getAs<RecordType>();
3326 llvm::SmallPtrSet<const RecordType *, 8> DirectVirtualBases;
3332 const RecordType *RT = Base->getType()->getAs<RecordType>();
3364 const RecordType *RT = VBase->getType()->castAs<RecordType>();
3407 const PartialDiagnostic &PD) {
3411 if (const ArrayType *AT = Context.getAsArrayType(T))
3414 if (const PointerType *PT = T->getAs<PointerType>()) {
3416 while (const PointerType *T = PT->getPointeeType()->getAs<PointerType>())
3419 if (const ArrayType *AT = Context.getAsArrayType(PT->getPointeeType()))
3423 const RecordType *RT = T->getAs<RecordType>();
3427 const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
3432 const CXXRecordDecl *Def = RD->getDefinition();
3445 void Sema::DiagnoseAbstractType(const CXXRecordDecl *RD) {
3456 llvm::SmallPtrSet<const CXXMethodDecl *, 8> SeenPureMethods;
3510 void CheckType(const NamedDecl *D, TypeLoc TL, Sema::AbstractDiagSelID Sel);
3515 const NamedDecl *Ctx;
3517 CheckAbstractUsage(AbstractUsageInfo &Info, const NamedDecl *Ctx)
3600 void AbstractUsageInfo::CheckType(const NamedDecl *D, TypeLoc TL,
3670 // complain about any non-static data members of reference or const scalar
3742 // const. [...] The class of which that function is a member shall be
3852 const FunctionProtoType *CtorType = CD->getType()->getAs<FunctionProtoType>(),
3930 bool Const;
3931 llvm::tie(Spec, Const) =
3935 const FunctionProtoType *CtorType = CD->getType()->getAs<FunctionProtoType>(),
3946 if (ArgType->getPointeeType().isConstQualified() && !Const) {
4039 bool Const;
4040 llvm::tie(Spec, Const) =
4044 const FunctionProtoType *OperType = MD->getType()->getAs<FunctionProtoType>(),
4057 if (ArgType->getPointeeType().isConstQualified() && !Const) {
4123 const FunctionProtoType *CtorType = CD->getType()->getAs<FunctionProtoType>(),
4230 const FunctionProtoType *OperType = MD->getType()->getAs<FunctionProtoType>(),
4301 const FunctionProtoType *DtorType = DD->getType()->getAs<FunctionProtoType>(),
4385 bool inUnion() const { return MD->getParent()->isUnion(); }
4392 TQ & Qualifiers::Const,
4536 // and, if a union, it must have a non-const member.
4544 // const-qualified type (or array thereof) with no
4552 << MD->getParent() << FD << FieldType << /*Const*/1;
4577 // -- a non-static data member of const non-class type (or array thereof)
4580 << IsMove << MD->getParent() << FD << FieldType << /*Const*/1;
4606 // At least one member in each anonymous union must be non-const
4630 /// X is a union and all of its variant members are of const-qualified type.
4753 llvm::SmallPtrSet<const CXXMethodDecl *, 8> OverridenAndUsingBaseMethods;
4761 static bool FindHiddenVirtualMethod(const CXXBaseSpecifier *Specifier,
5033 // constructor can be invoked for a const, volatile or const
5034 // volatile object. A constructor shall not be declared const,
5035 // volatile, or const volatile (9.3.2).
5054 if (FTI.TypeQuals & Qualifiers::Const)
5056 << "const" << SourceRange(D.getIdentifierLoc());
5078 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5114 const char *ConstRef
5115 = Constructor->getParamDecl(0)->getIdentifier() ? "const &"
5116 : " const &";
5177 if (const TypedefType *TT = DeclaratorType->getAs<TypedefType>())
5180 else if (const TemplateSpecializationType *TST =
5191 // destructor can be invoked for a const, volatile or const
5192 // volatile object. A destructor shall not be declared const,
5193 // volatile or const volatile (9.3.2).
5219 if (FTI.TypeQuals & Qualifiers::Const)
5221 << "const" << SourceRange(D.getIdentifierLoc());
5262 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5308 const FunctionProtoType *Proto = R->getAs<FunctionProtoType>();
5381 if (const ReferenceType *ConvTypeRef = ConvType->getAs<ReferenceType>())
5443 const unsigned IDNS = Decl::IDNS_Ordinary | Decl::IDNS_Member |
5524 if (const VisibilityAttr *Attr = Namespc->getAttr<VisibilityAttr>())
5603 CXXRecordDecl *Sema::getStdBadAlloc() const {
5608 NamespaceDecl *Sema::getStdNamespace() const {
5641 const TemplateArgument *Arguments = 0;
5643 if (const RecordType *RT = Ty->getAs<RecordType>()) {
5652 } else if (const TemplateSpecializationType *TST =
5739 bool Sema::isInitListConstructor(const CXXConstructorDecl* Ctor) {
5750 if (const ReferenceType *RT = ArgType->getAs<ReferenceType>())
5774 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
6005 const LookupResult &Previous) {
6216 const DeclarationNameInfo &NameInfo,
6372 const Type *SourceType = UD->getQualifier()->getAsType();
6409 const CXXScopeSpec &SS,
6411 const LookupResult &Prev) {
6467 const CXXScopeSpec &SS,
6554 llvm::SmallPtrSet<const CXXRecordDecl*, 4> Bases;
6556 static bool collect(const CXXRecordDecl *Base, void *OpaqueData) {
6562 bool hasDependentBases(const CXXRecordDecl *Class) {
6568 static bool doesNotContain(const CXXRecordDecl *Base, void *OpaqueData) {
6573 bool mightShareBases(const CXXRecordDecl *Class) {
6832 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
6846 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
6865 } else if (const RecordType *RecordTy
6994 const FunctionProtoType *CtorTy =
7017 typedef SmallVector<const RecordType *, 4> BasesVector;
7041 llvm::SmallSet<const Type *, 8> ExistingConstructors;
7058 typedef llvm::DenseMap<const Type *, ConstructorInfo> ConstructorToSourceMap;
7063 const RecordType *Base = *BaseIt;
7091 const FunctionProtoType *BaseCtorType =
7110 const Type *NewCtorType;
7125 const Type *CanonicalNewCtorType =
7144 const CXXConstructorDecl *PrevCtor = result.first->second.second;
7145 const CXXConstructorDecl *PrevBaseCtor =
7209 if (const RecordType *BaseType = B->getType()->getAs<RecordType>())
7218 if (const RecordType *BaseType = B->getType()->getAs<RecordType>())
7227 if (const RecordType *RecordTy
7326 const FunctionProtoType *dtorType = destructor->getType()->
7390 if (const RecordType *RecordTy = T->getAs<RecordType>()) {
7435 const Type *CanonicalT = S.Context.getCanonicalType(T.getTypePtr());
7465 const ConstantArrayType *ArrayTy = S.Context.getAsConstantArrayType(T);
7562 // X& X::operator=(const X&)
7568 // whose parameter is of type const B&, const volatile B& or B,
7580 LookupCopyingAssignment(BaseClassDecl, Qualifiers::Const, false, 0,
7592 LookupCopyingAssignment(BaseClassDecl, Qualifiers::Const, false, 0,
7599 // assignment operator whose parameter is of type const M&,
7600 // const volatile M& or M.
7607 LookupCopyingAssignment(FieldClassDecl, Qualifiers::Const, false, 0,
7628 unsigned ArgQuals = HasConstCopyAssignment ? Qualifiers::Const : 0;
7674 bool Const;
7675 llvm::tie(Spec, Const) =
7680 if (Const)
7765 if (const LValueReferenceType *OtherRef
7855 // Check for members of const-qualified, non-class type.
7905 for (const ConstantArrayType *Array
8390 // Check for members of const-qualified, non-class type.
8444 for (const ConstantArrayType *Array
8592 // X::X(const X&)
8599 // constructor whose first parameter is of type const B& or
8600 // const volatile B&, and
8611 LookupCopyingConstructor(BaseClassDecl, Qualifiers::Const,
8621 LookupCopyingConstructor(BaseClassDecl, Qualifiers::Const,
8628 // const M& or const volatile M&.
8635 LookupCopyingConstructor(FieldClassDecl, Qualifiers::Const,
8648 unsigned Quals = HasConstCopyConstructor? Qualifiers::Const : 0;
8695 bool Const;
8696 llvm::tie(Spec, Const) =
8701 if (Const)
8803 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
8817 if (const RecordType *BaseType = B->getType()->getAs<RecordType>()) {
8831 if (const RecordType *RecordTy
9137 const NonNullAttr *NonNull = *i;
9171 void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {
9213 const FunctionProtoType *Proto
9241 const FunctionDecl *FnDecl) {
9242 const DeclContext *DC = FnDecl->getDeclContext()->getRedeclContext();
9260 CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
9308 CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
9339 CheckOperatorDeleteDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
9424 static const bool OperatorUses[NUM_OVERLOADED_OPERATORS][3] = {
9488 if (const BuiltinType *BT = LastParam->getType()->getAs<BuiltinType>())
9558 // Otherwise it must be a pointer to const; let's strip those qualifiers.
9559 const PointerType *PT = T->getAs<PointerType>();
9570 // If there is no second parameter, the first must be a const char *
9577 // const char *, const wchar_t*, const char16_t*, and const char32_t*
9701 if (const PointerType *Ptr = BaseType->getAs<PointerType>()) {
9705 } else if (const ReferenceType *Ref = BaseType->getAs<ReferenceType>()) {
9725 if (const ReferenceType *RT = T->getAs<ReferenceType>())
9746 if (const RecordType *recordType = ExDeclType->getAs<RecordType>()) {
9903 if (const RecordType *RT = T->getAs<RecordType>()) {
10080 Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
10151 const DeclSpec &DS = D.getDeclSpec();
10426 if (const FunctionDecl *Prev = Fn->getPreviousDecl()) {
10485 const FunctionDecl *Primary = MD;
10569 bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
10570 const CXXMethodDecl *Old) {
10582 if (const PointerType *NewPT = NewTy->getAs<PointerType>()) {
10583 if (const PointerType *OldPT = OldTy->getAs<PointerType>()) {
10587 } else if (const ReferenceType *NewRT = NewTy->getAs<ReferenceType>()) {
10588 if (const ReferenceType *OldRT = OldTy->getAs<ReferenceType>()) {
10610 if (const RecordType *RT = NewClassTy->getAs<RecordType>()) {
10833 const CXXMethodDecl *KeyFunction = Context.getKeyFunction(Class);
10883 const FunctionDecl *KeyFunctionDef = 0;
10899 const CXXRecordDecl *RD) {
10916 const CXXRecordDecl *Base =
10962 if (const RecordType *RecordTy
10990 const FunctionDecl *FNTarget = 0;
11095 const FunctionProtoType *Proto = ProtoTL->getTypePtr();
11120 const FunctionProtoType *Proto = ProtoTL->getTypePtr();
11281 const FunctionProtoType *Proto
11322 Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget(const FunctionDecl *D) {