Lines Matching refs:decl
50 Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType) {
52 Decl *Group[2] = { OwnedType, Ptr };
308 assert(IIDecl && "Didn't find decl");
319 // will be attached to the enclosing Expr or Decl node).
562 // Replace lookup results with just the tag decl.
859 // Check for a tag type hidden by a non-type decl in a few cases where it
972 void Sema::ActOnReenterFunctionContext(Scope* S, Decl *D) {
1030 /// Add this decl to the scope shadowed decl chains.
1066 // Should only need to replace one decl.
1166 // the decl here.
1383 Decl *TmpD = (*I);
1384 assert(TmpD && "This decl didn't get pushed??");
1386 assert(isa<NamedDecl>(TmpD) && "Decl isn't NamedDecl?");
1508 /// file scope. lazily create a decl for it. ForRedeclaration is true
1564 // Create Decl objects for each parameter, adding them to the
1598 NamedDecl *decl,
1609 bool hasExternalLinkage = decl->hasExternalLinkage();
1667 // If the new decl is known invalid already, don't bother doing any
1712 // Verify the old decl was also a type.
1799 /// DeclhasAttr - returns true if decl Declaration already has the target
1802 DeclHasAttr(const Decl *D, const Attr *A) {
1803 // There can be multiple AvailabilityAttr in a Decl. Make sure we copy
1831 for (Decl::attr_iterator i = D->attr_begin(), e = D->attr_end(); i != e; ++i)
1847 static bool isAttributeTargetADefinition(Decl *D) {
1859 static bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {
2015 static const Decl *getDefinition(const Decl *D) {
2028 static bool hasAttribute(const Decl *D, attr::Kind Kind) {
2029 for (Decl::attr_iterator I = D->attr_begin(), E = D->attr_end();
2040 static void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {
2044 const Decl *Def = getDefinition(Old);
2088 /// mergeDeclAttributes - Copy attributes from the Old decl to the New one.
2089 void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old,
2270 bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD, Scope *S) {
2271 // Verify the old decl was also a function.
2324 // later declared or defined without one, the second decl assumes the
2330 // For the new decl, we have to look at the NON-canonical type to tell the
2353 // effectively the same as the explict one. Only Old decl contains correct
2773 /// Declarations using the auto type specifier (C++ [decl.spec.auto]) call back
2835 // If the new decl is already invalid, don't do any other checking.
2839 // Verify the old decl was also a variable.
2878 // C99 6.2.2p4: Check if we have a static decl followed by a non-static.
2981 Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
2989 Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
2993 Decl *TagD = 0;
3006 // type rep is a Decl, whereas in many of the others
3048 // If we're dealing with a decl but not a TagDecl, assume that
3073 // Track whether this decl-specifier declares anything.
3140 // unnamed bit-field, the decl-specifier-seq shall introduce one or more
3151 // If a storage-class-specifier appears in a decl-specifier-seq, [...] the
3154 // If a cv-qualifier appears in a decl-specifier-seq, the
3225 assert(PrevDecl && "Expected a non-null Decl");
3360 Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
3607 Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
3807 /// consideration here. That's specifically the type in the decl spec
3839 // Store the new type back in the decl spec.
3855 // Nothing to do for these decl specs.
3878 Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) {
3880 Decl *Dcl = HandleDeclarator(S, D, MultiTemplateParamsArg());
4020 // The scope passed in may not be a decl scope. Zip up the scope tree until
4327 "Decl is not a locally-scoped decl!");
4444 // Note that variably modified types must be fixed before merging the decl so
4484 // Merge the decl with the existing one if appropriate. If the decl is
4575 bool Sema::inferObjCARCLifetime(ValueDecl *decl) {
4576 QualType type = decl->getType();
4581 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
4586 } else if (isa<ObjCIvarDecl>(decl)) {
4588 } else if (isa<FieldDecl>(decl)) {
4593 Diag(decl->getLocation(), diag::err_arc_autoreleasing_var)
4603 decl->setType(type);
4606 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
4822 // If this decl has an auto type in need of deduction, make a note of the
4823 // Decl so we can diagnose uses of it in its own initializer.
4939 // Merge the decl with the existing one if appropriate.
5080 // We know that is the first decl we see, other than function local
5081 // extern C ones. If this is C++ and the decl is not in a extern C context
5114 // If the decl is already known invalid, don't check it.
5128 // Emit an error if an address space was applied to decl with local storage.
5365 // Also only accept corrections that have the same parent decl.
5914 // the friend declaration will refer to an untemplated decl,
6260 // "friend void foo<>(int);" is an implicit specialization decl.
6361 PrincipalDecl->isInIdentifierNamespace(Decl::IDNS_Ordinary))
6883 assert(T->isFunctionType() && "function decl is not of function type");
7007 Decl *OrigDecl;
7015 SelfReferenceChecker(Sema &S, Decl *OrigDecl) : Inherited(S.Context),
7114 Decl* ReferenceDecl = DRE->getDecl();
7134 static void CheckSelfReference(Sema &S, Decl* OrigDecl, Expr *E,
7159 void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
7192 // C++11 [decl.spec.auto]p6. Deduce the type which 'auto' stands in for.
7445 // Attach the initializer to the decl.
7590 void Sema::ActOnInitializerError(Decl *D) {
7627 void Sema::ActOnUninitializedDecl(Decl *RealDecl,
7829 void Sema::ActOnCXXForRangeDecl(Decl *D) {
7979 Sema::FinalizeDeclaration(Decl *ThisDecl) {
8034 Decl **Group, unsigned NumDecls) {
8035 SmallVector<Decl*, 8> Decls;
8041 if (Decl *D = Group[i])
8055 Sema::BuildDeclaratorGroup(Decl **Group, unsigned NumDecls,
8101 void Sema::ActOnDocumentableDecl(Decl *D) {
8105 void Sema::ActOnDocumentableDecls(Decl **Group, unsigned NumDecls) {
8116 // This is a decl group. Normally it will contain only declarations
8123 Decl *MaybeTagDecl = Group[0];
8130 // See if there are any new comments that are not attached to a decl.
8134 // There is at least one comment that not attached to a decl.
8148 Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
8425 Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) {
8431 Decl *DP = HandleDeclarator(ParentScope, D, MultiTemplateParamsArg());
8503 Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D) {
8593 // Is the decl actually in the context?
8601 // Either way, reassign the lexical decl context to our FunctionDecl.
8605 // If the decl has a non-null name, make accessible in the current scope.
8649 // We want to attach documentation to original Decl (which might be
8689 bool Sema::canSkipFunctionBody(Decl *D) {
8708 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) {
8709 if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Decl))
8711 else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(Decl))
8713 return ActOnFinishFunctionBody(Decl, 0);
8716 Decl *Sema::ActOnFinishFunctionBody(Decl *D, Stmt *BodyArg) {
8720 Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
8865 /// relevant Decl.
8866 void Sema::ActOnFinishDelayedAttribute(Scope *S, Decl *D,
8868 // Always attach attributes to the underlying decl.
8933 assert(!Error && "Error setting up implicit decl!");
9110 // associated typedef (from an earlier typedef in this decl group).
9121 // Otherwise, set this is the anon-decl typedef for the tag.
9306 Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
9416 // context, don't try to make a decl for it.
9524 // there's a shadow friend decl.
9537 // decl-specifier-seq or parameter-declaration-clause of a
9590 // It's okay to have a tag decl in the same scope as a typedef
9591 // which hides a tag decl in the same scope. Finding this
9618 // rementions the tag), reuse the decl.
9679 // for the consumer of this Decl to know it doesn't own it.
9735 // tag PrevDecl. We're going to create a new Decl for it.
9739 // have a definition. Just create a new decl.
9744 // new decl/type. We set PrevDecl to NULL so that the entities
9748 // If we get here, we're going to create a new Decl. If PrevDecl
9818 // location of the decl, otherwise use the location of the struct/union
9916 // happen here (in act on tag decl). The #pragma pack stack is
9959 // Mark this as a friend decl if applicable.
10022 void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) {
10036 Decl *Sema::ActOnObjCContainerStartDefinition(Decl *IDecl) {
10046 void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD,
10081 void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD,
10120 ActOnObjCContainerStartDefinition(cast<Decl>(DC));
10124 void Sema::ActOnTagDefinitionError(Scope *S, Decl *TagD) {
10220 Decl *Sema::ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
10570 Decl *Sema::ActOnIvar(Scope *S,
10637 // Construct the decl.
10685 SmallVectorImpl<Decl *> &AllIvarDecls) {
10689 Decl *ivarDecl = AllIvarDecls[AllIvarDecls.size()-1];
10719 SourceLocation RecLoc, Decl *EnclosingDecl,
10720 llvm::ArrayRef<Decl *> Fields,
10723 assert(EnclosingDecl && "missing record or interface decl");
10732 case Decl::ObjCCategory:
10735 case Decl::ObjCImplementation:
10760 for (llvm::ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end();
11283 Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst,
11291 // The scope passed in may not be a decl scope. Zip up the scope tree until
11340 // Register this decl in the current scope stack.
11416 static void CheckForDuplicateEnumValues(Sema &S, Decl **Elements,
11527 SourceLocation RBraceLoc, Decl *EnumDeclX,
11528 Decl **Elements, unsigned NumElements,
11688 // same as the enumerator decl
11695 // the enum decl type.
11744 // If we're declaring a function, ensure this decl isn't forgotten about -
11756 Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
11814 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc,
11829 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc, LookupOrdinaryName);
11845 Decl *PrevDecl = LookupSingleName(TUScope, AliasName, AliasNameLoc,
11859 Decl *Sema::getObjCDeclContext() const {
11864 const Decl *D = cast<Decl>(getCurObjCLexicalContext());