Lines Matching refs:decl
50 Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType) {
52 Decl *Group[2] = { OwnedType, Ptr };
270 assert(IIDecl && "Didn't find decl");
281 // will be attached to the enclosing Expr or Decl node).
865 void Sema::ActOnReenterFunctionContext(Scope* S, Decl *D) {
923 /// Add this decl to the scope shadowed decl chains.
959 // Should only need to replace one decl.
1059 // the decl here.
1246 Decl *TmpD = (*I);
1247 assert(TmpD && "This decl didn't get pushed??");
1249 assert(isa<NamedDecl>(TmpD) && "Decl isn't NamedDecl?");
1353 /// file scope. lazily create a decl for it. ForRedeclaration is true
1407 // Create Decl objects for each parameter, adding them to the
1476 // If the new decl is known invalid already, don't bother doing any
1511 // Verify the old decl was also a type.
1598 /// DeclhasAttr - returns true if decl Declaration already has the target
1601 DeclHasAttr(const Decl *D, const Attr *A) {
1604 for (Decl::attr_iterator i = D->attr_begin(), e = D->attr_end(); i != e; ++i)
1620 /// mergeDeclAttributes - Copy attributes from the Old decl to the New one.
1621 void Sema::mergeDeclAttributes(Decl *New, Decl *Old,
1738 bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD, Scope *S) {
1739 // Verify the old decl was also a function.
1792 // later declared or defined without one, the second decl assumes the
1795 // For the new decl, we have to look at the NON-canonical type to tell the
2166 /// Declarations using the auto type specifier (C++ [decl.spec.auto]) call back
2230 // If the new decl is already invalid, don't do any other checking.
2234 // Verify the old decl was also a variable.
2273 // C99 6.2.2p4: Check if we have a static decl followed by a non-static.
2365 Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
2374 Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
2377 Decl *TagD = 0;
2389 // type rep is a Decl, whereas in many of the others
2427 // If we're dealing with a decl but not a TagDecl, assume that
2577 assert(PrevDecl && "Expected a non-null Decl");
2712 Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
2952 Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
3152 /// consideration here. That's specifically the type in the decl spec
3185 // Store the new type back in the decl spec.
3200 // Nothing to do for these decl specs.
3223 Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) {
3225 Decl *Dcl = HandleDeclarator(S, D, MultiTemplateParamsArg(*this));
3347 Decl *Sema::HandleDeclarator(Scope *S, Declarator &D,
3364 // The scope passed in may not be a decl scope. Zip up the scope tree until
3620 "Decl is not a locally-scoped decl!");
3738 // Note that variably modified types must be fixed before merging the decl so
3776 // Merge the decl with the existing one if appropriate. If the decl is
3868 bool Sema::inferObjCARCLifetime(ValueDecl *decl) {
3869 QualType type = decl->getType();
3874 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
3879 } else if (isa<ObjCIvarDecl>(decl)) {
3881 } else if (isa<FieldDecl>(decl)) {
3886 Diag(decl->getLocation(), diag::err_arc_autoreleasing_var)
3896 decl->setType(type);
3899 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
4046 // If this decl has an auto type in need of deduction, make a note of the
4047 // Decl so we can diagnose uses of it in its own initializer.
4149 // Merge the decl with the existing one if appropriate.
4314 // If the decl is already known invalid, don't check it.
4327 // Emit an error if an address space was applied to decl with local storage.
4520 // Also only accept corrections that have the same parent decl.
5012 // the friend declaration will refer to an untemplated decl,
5387 // "friend void foo<>(int);" is an implicit specialization decl.
5488 PrincipalDecl->isInIdentifierNamespace(Decl::IDNS_Ordinary))
5914 assert(T->isFunctionType() && "function decl is not of function type");
6026 Decl *OrigDecl;
6033 SelfReferenceChecker(Sema &S, Decl *OrigDecl) : Inherited(S.Context),
6093 Decl* ReferenceDecl = DRE->getDecl();
6107 void Sema::CheckSelfReference(Decl* OrigDecl, Expr *E) {
6114 void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
6153 // C++11 [decl.spec.auto]p6. Deduce the type which 'auto' stands in for.
6336 // Attach the initializer to the decl.
6474 void Sema::ActOnInitializerError(Decl *D) {
6511 void Sema::ActOnUninitializedDecl(Decl *RealDecl,
6708 void Sema::ActOnCXXForRangeDecl(Decl *D) {
6844 Sema::FinalizeDeclaration(Decl *ThisDecl) {
6851 Decl **Group, unsigned NumDecls) {
6852 SmallVector<Decl*, 8> Decls;
6858 if (Decl *D = Group[i])
6868 Sema::BuildDeclaratorGroup(Decl **Group, unsigned NumDecls,
6915 Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
7188 Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) {
7194 Decl *DP = HandleDeclarator(ParentScope, D,
7259 Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D) {
7335 // Is the decl actually in the context?
7343 // Either way, reassign the lexical decl context to our FunctionDecl.
7347 // If the decl has a non-null name, make accessible in the current scope.
7428 Decl *Sema::ActOnFinishFunctionBody(Decl *D, Stmt *BodyArg) {
7432 Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
7563 /// relevant Decl.
7564 void Sema::ActOnFinishDelayedAttribute(Scope *S, Decl *D,
7566 // Always attach attributes to the underlying decl.
7631 assert(!Error && "Error setting up implicit decl!");
7785 // associated typedef (from an earlier typedef in this decl group).
7796 // Otherwise, set this is the anon-decl typedef for the tag.
7954 Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
8064 // context, don't try to make a decl for it.
8172 // there's a shadow friend decl.
8185 // decl-specifier-seq or parameter-declaration-clause of a
8238 // It's okay to have a tag decl in the same scope as a typedef
8239 // which hides a tag decl in the same scope. Finding this
8266 // rementions the tag), reuse the decl.
8327 // for the consumer of this Decl to know it doesn't own it.
8383 // tag PrevDecl. We're going to create a new Decl for it.
8387 // have a definition. Just create a new decl.
8392 // new decl/type. We set PrevDecl to NULL so that the entities
8396 // If we get here, we're going to create a new Decl. If PrevDecl
8466 // location of the decl, otherwise use the location of the struct/union
8564 // happen here (in act on tag decl). The #pragma pack stack is
8606 // Mark this as a friend decl if applicable.
8660 void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) {
8668 Decl *Sema::ActOnObjCContainerStartDefinition(Decl *IDecl) {
8678 void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD,
8713 void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD,
8748 ActOnObjCContainerStartDefinition(cast<Decl>(DC));
8752 void Sema::ActOnTagDefinitionError(Scope *S, Decl *TagD) {
8848 Decl *Sema::ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
9344 Decl *Sema::ActOnIvar(Scope *S,
9411 // Construct the decl.
9455 SmallVectorImpl<Decl *> &AllIvarDecls) {
9459 Decl *ivarDecl = AllIvarDecls[AllIvarDecls.size()-1];
9489 SourceLocation RecLoc, Decl *EnclosingDecl,
9490 llvm::ArrayRef<Decl *> Fields,
9493 assert(EnclosingDecl && "missing record or interface decl");
9495 // If the decl this is being inserted into is invalid, then it may be a
9518 for (llvm::ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end();
10086 Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst,
10094 // The scope passed in may not be a decl scope. Zip up the scope tree until
10142 // Register this decl in the current scope stack.
10151 SourceLocation RBraceLoc, Decl *EnumDeclX,
10152 Decl **Elements, unsigned NumElements,
10312 // same as the enumerator decl itself. This means that in "enum { X = 1U }"
10319 // the enum decl type.
10368 // If we're declaring a function, ensure this decl isn't forgotten about -
10375 Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
10421 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc,
10436 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc, LookupOrdinaryName);
10452 Decl *PrevDecl = LookupSingleName(TUScope, AliasName, AliasNameLoc,
10466 Decl *Sema::getObjCDeclContext() const {
10471 const Decl *D = cast<Decl>(getCurLexicalContext());