Home | History | Annotate | Download | only in AST

Lines Matching defs:Decl

57 RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
216 const Decl *adjustDeclToTemplate(const Decl *D) {
261 static_cast<const Decl*>(PU.get<ClassTemplateDecl *>()) :
262 static_cast<const Decl*>(
286 const Decl *D,
287 const Decl **OriginalDecl) const {
292 llvm::DenseMap<const Decl *, RawCommentAndCacheFlags>::iterator Pos =
306 const Decl *OriginalDeclForRC = NULL;
307 for (Decl::redecl_iterator I = D->redecls_begin(),
310 llvm::DenseMap<const Decl *, RawCommentAndCacheFlags>::iterator Pos =
347 for (Decl::redecl_iterator I = D->redecls_begin(),
358 comments::FullComment *ASTContext::getCommentForDecl(const Decl *D) const {
360 const Decl *Canonical = D->getCanonicalDecl();
361 llvm::DenseMap<const Decl *, comments::FullComment *>::iterator Pos =
366 const Decl *OriginalDecl;
371 // If the RawComment was attached to other redeclaration of this Decl, we
372 // should parse the comment in context of that other Decl. This is important
614 for (llvm::DenseMap<const Decl*, AttrVec*>::iterator A = DeclAttrs.begin(),
843 AttrVec& ASTContext::getDeclAttrs(const Decl *D) {
854 void ASTContext::eraseDeclAttrs(const Decl *D) {
855 llvm::DenseMap<const Decl*, AttrVec*>::iterator Pos = DeclAttrs.find(D);
918 "pattern decl is not a using decl");
951 assert(!Inst->getDeclName() && "Instantiated field decl is not unnamed");
952 assert(!Tmpl->getDeclName() && "Template field decl is not unnamed");
1058 /// specified decl. Note that bitfields do not have a valid alignment, so
1062 CharUnits ASTContext::getDeclAlign(const Decl *D, bool RefAsPointee) const {
1566 void ASTContext::CollectInheritedProtocols(const Decl *CDecl,
1697 /// \brief Set the copy inialization expression of a block var decl.
2587 QualType ASTContext::getInjectedClassNameType(CXXRecordDecl *Decl,
2589 Decl));
2590 if (Decl->TypeForDecl) {
2591 assert(isa<InjectedClassNameType>(Decl->TypeForDecl));
2592 } else if (CXXRecordDecl *PrevDecl = Decl->getPreviousDecl()) {
2594 Decl->TypeForDecl = PrevDecl->TypeForDecl;
2595 assert(isa<InjectedClassNameType>(Decl->TypeForDecl));
2598 new (*this, TypeAlignment) InjectedClassNameType(Decl, TST);
2599 Decl->TypeForDecl = newType;
2602 return QualType(Decl->TypeForDecl, 0);
2607 QualType ASTContext::getTypeDeclTypeSlow(const TypeDecl *Decl) const {
2608 assert(Decl && "Passed null for Decl param");
2609 assert(!Decl->TypeForDecl && "TypeForDecl present in slow case");
2611 if (const TypedefNameDecl *Typedef = dyn_cast<TypedefNameDecl>(Decl))
2614 assert(!isa<TemplateTypeParmDecl>(Decl) &&
2617 if (const RecordDecl *Record = dyn_cast<RecordDecl>(Decl)) {
2622 } else if (const EnumDecl *Enum = dyn_cast<EnumDecl>(Decl)) {
2627 dyn_cast<UnresolvedUsingTypenameDecl>(Decl)) {
2629 Decl->TypeForDecl = newType;
2634 return QualType(Decl->TypeForDecl, 0);
2638 /// specified typedef name decl.
2640 ASTContext::getTypedefType(const TypedefNameDecl *Decl,
2642 if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
2645 Canonical = getCanonicalType(Decl->getUnderlyingType());
2647 TypedefType(Type::Typedef, Decl, Canonical);
2648 Decl->TypeForDecl = newType;
2653 QualType ASTContext::getRecordType(const RecordDecl *Decl) const {
2654 if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
2656 if (const RecordDecl *PrevDecl = Decl->getPreviousDecl())
2658 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0);
2660 RecordType *newType = new (*this, TypeAlignment) RecordType(Decl);
2661 Decl->TypeForDecl = newType;
2666 QualType ASTContext::getEnumType(const EnumDecl *Decl) const {
2667 if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
2669 if (const EnumDecl *PrevDecl = Decl->getPreviousDecl())
2671 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0);
2673 EnumType *newType = new (*this, TypeAlignment) EnumType(Decl);
2674 Decl->TypeForDecl = newType;
3228 /// specified ObjC interface decl. The list of protocols is optional.
3229 QualType ASTContext::getObjCInterfaceType(const ObjCInterfaceDecl *Decl,
3231 if (Decl->TypeForDecl)
3232 return QualType(Decl->TypeForDecl, 0);
3235 assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
3236 Decl->TypeForDecl = PrevDecl->TypeForDecl;
3241 if (const ObjCInterfaceDecl *Def = Decl->getDefinition())
3242 Decl = Def;
3245 ObjCInterfaceType *T = new (Mem) ObjCInterfaceType(Decl);
3246 Decl->TypeForDecl = T;
3414 /// specified TagDecl (struct/union/class/enum) decl.
3415 QualType ASTContext::getTagDeclType(const TagDecl *Decl) const {
3416 assert (Decl);
3419 return getTypeDeclType(const_cast<TagDecl*>(Decl));
3687 if (Decl *D = Arg.getAsDecl())
3689 return TemplateArgument((Decl*)0);
4399 const BlockDecl *Decl = Expr->getBlockDecl();
4410 for (BlockDecl::param_const_iterator PI = Decl->param_begin(),
4411 E = Decl->param_end(); PI != E; ++PI) {
4426 for (BlockDecl::param_const_iterator PI = Decl->param_begin(), E =
4427 Decl->param_end(); PI != E; ++PI) {
4446 bool ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl,
4449 getObjCEncodingForType(Decl->getResultType(), S);
4452 for (FunctionDecl::param_const_iterator PI = Decl->param_begin(),
4453 E = Decl->param_end(); PI != E; ++PI) {
4467 for (FunctionDecl::param_const_iterator PI = Decl->param_begin(),
4468 E = Decl->param_end(); PI != E; ++PI) {
4490 void ASTContext::getObjCEncodingForMethodParameter(Decl::ObjCDeclQualifier QT,
4506 bool ASTContext::getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl,
4511 getObjCEncodingForMethodParameter(Decl->getObjCDeclQualifier(),
4512 Decl->getResultType(), S, Extended);
4521 for (ObjCMethodDecl::param_const_iterator PI = Decl->param_begin(),
4522 E = Decl->sel_param_end(); PI != E; ++PI) {
4538 for (ObjCMethodDecl::param_const_iterator PI = Decl->param_begin(),
4539 E = Decl->sel_param_end(); PI != E; ++PI) {
4585 const Decl *Container,
4587 // Collect information from the property implementation decl(s).
5229 void ASTContext::getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT,
5231 if (QT & Decl::OBJC_TQ_In)
5233 if (QT & Decl::OBJC_TQ_Inout)
5235 if (QT & Decl::OBJC_TQ_Out)
5237 if (QT & Decl::OBJC_TQ_Bycopy)
5239 if (QT & Decl::OBJC_TQ_Byref)
5241 if (QT & Decl::OBJC_TQ_Oneway)
5533 void ASTContext::setObjCConstantStringInterface(ObjCInterfaceDecl *Decl) {
5537 ObjCConstantStringType = getObjCInterfaceType(Decl);
7256 bool ASTContext::DeclMustBeEmitted(const Decl *D) {