Home | History | Annotate | Download | only in Sema

Lines Matching refs:decl

54 Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType) {
56 Decl *Group[2] = { OwnedType, Ptr };
144 /// type decl, \a FoundType if only type decls are found.
424 assert(IIDecl && "Didn't find decl");
435 // will be attached to the enclosing Expr or Decl node).
465 // Builds a fake NNS for the given decl context.
750 // Replace lookup results with just the tag decl.
1051 // Check for a tag type hidden by a non-type decl in a few cases where it
1128 Decl *D) {
1190 void Sema::ActOnReenterFunctionContext(Scope* S, Decl *D) {
1243 /// Add this decl to the scope shadowed decl chains.
1278 // Should only need to replace one decl.
1375 // the decl here.
1641 assert(TmpD && "This decl didn't get pushed??");
1643 assert(isa<NamedDecl>(TmpD) && "Decl isn't NamedDecl?");
1777 /// file scope. lazily create a decl for it. ForRedeclaration is true
1825 // Create Decl objects for each parameter, adding them to the
1859 TypedefNameDecl *Decl,
1881 Decl->getUnderlyingType()))
1888 Decl->getAnonDeclWithTypedefName())
1939 // If the new decl is known invalid already, don't bother doing any
1984 // Verify the old decl was also a type.
2106 /// DeclhasAttr - returns true if decl Declaration already has the target
2108 static bool DeclHasAttr(const Decl *D, const Attr *A) {
2127 static bool isAttributeTargetADefinition(Decl *D) {
2139 static bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {
2321 static const Decl *getDefinition(const Decl *D) {
2335 static bool hasAttribute(const Decl *D, attr::Kind Kind) {
2344 static void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {
2348 const Decl *Def = getDefinition(Old);
2426 /// mergeDeclAttributes - Copy attributes from the Old decl to the New one.
2427 void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old,
2569 Decl::OBJC_TQ_CSNullability)
2573 ((OldParam->getObjCDeclQualifier() & Decl::OBJC_TQ_CSNullability)
2741 // Verify the old decl was also a function.
2809 // To test if either decl has an explicit calling convention, we look for
2843 // Put the note on the first decl, since it is the one that matters.
3093 if (New->getFriendObjectKind() != Decl::FOK_None) {
3290 // and argument types. Per C11 6.2.7/4, only update the type if the old decl
3341 /// Declarations using the auto type specifier (C++ [decl.spec.auto]) call back
3469 // If the new decl is already invalid, don't do any other checking.
3478 // Verify the old decl was also a variable or variable template.
3563 // [dcl.stc]p8: Check if we have a non-static decl followed by a static.
3713 Decl *
3750 Decl *ManglingContextDecl;
3780 // adding a typedef name for the anonymous decl can change that
3799 // Otherwise, set this is the anon-decl typedef for the tag.
3823 Decl *
3828 Decl *TagD = nullptr;
3841 // type rep is a Decl, whereas in many of the others
3892 // If we're dealing with a decl but not a TagDecl, assume that
3918 // Track whether this decl-specifier declares anything.
4014 // unnamed bit-field, the decl-specifier-seq shall introduce one or more
4025 // If a storage-class-specifier appears in a decl-specifier-seq, [...] the
4028 // If a cv-qualifier appears in a decl-specifier-seq, the
4100 assert(PrevDecl && "Expected a non-null Decl");
4247 Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
4484 Decl *ManglingContextDecl;
4514 Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
4717 /// consideration here. That's specifically the type in the decl spec
4749 // Store the new type back in the decl spec.
4765 // Nothing to do for these decl specs.
4788 Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) {
4790 Decl *Dcl = HandleDeclarator(S, D, MultiTemplateParamsArg());
4933 // The scope passed in may not be a decl scope. Zip up the scope tree until
5357 // Note that variably modified types must be fixed before merging the decl so
5396 // Merge the decl with the existing one if appropriate. If the decl is
5487 bool Sema::inferObjCARCLifetime(ValueDecl *decl) {
5488 QualType type = decl->getType();
5493 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
5498 } else if (isa<ObjCIvarDecl>(decl)) {
5500 } else if (isa<FieldDecl>(decl)) {
5505 Diag(decl->getLocation(), diag::err_arc_autoreleasing_var)
5515 decl->setType(type);
5518 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
5532 // Ensure that an auto decl is deduced otherwise the checks below might cache
5671 FD->getFriendObjectKind() == Decl::FOK_Declared;
5799 // Check decl attributes on the DeclSpec.
5803 // Walk the declarator structure, checking decl attributes that were in a type
5804 // position to the decl itself.
5810 // Finally, check attributes on the decl itself.
5839 static bool isDeclExternC(const Decl *D) {
5845 llvm_unreachable("Unknown type of decl!");
6083 "should have a 'template<>' for this decl");
6110 // If this decl has an auto type in need of deduction, make a note of the
6111 // Decl so we can diagnose uses of it in its own initializer.
6391 // Merge the decl with the existing one if appropriate.
6469 Decl *ManglingContextDecl;
6636 // Avoid issuing multiple warnings about the same decl.
6758 // If the decl is already known invalid, don't check it.
6779 // Emit an error if an address space was applied to decl with local storage.
6981 // If the decl is already known invalid, don't check it.
7110 // Also only accept corrections that have the same parent decl.
7242 Decl *Canonical = Result->getCanonicalDecl();
7569 SmallVector<const Decl *, 4> VisitStack;
7579 assert(VisitStack.back() && "First decl null?");
7582 const Decl *Next = VisitStack.pop_back_val();
7803 // the friend declaration will refer to an untemplated decl,
8283 "should have a 'template<>' for this decl");
8284 // "friend void foo<>(int);" is an implicit specialization decl.
8386 PrincipalDecl->isInIdentifierNamespace(Decl::IDNS_Ordinary))
8940 assert(T->isFunctionType() && "function decl is not of function type");
9053 assert(T->isFunctionType() && "function decl is not of function type");
9094 Decl *OrigDecl;
9105 SelfReferenceChecker(Sema &S, Decl *OrigDecl) : Inherited(S.Context),
9156 // Keep checking only if the base Decl is the same.
9374 Decl* ReferenceDecl = DRE->getDecl();
9399 static void CheckSelfReference(Sema &S, Decl* OrigDecl, Expr *E,
9514 void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
9539 // C++11 [decl.spec.auto]p6. Deduce the type which 'auto' stands in for.
9789 // Attach the initializer to the decl.
9948 void Sema::ActOnInitializerError(Decl *D) {
9985 void Sema::ActOnUninitializedDecl(Decl *RealDecl,
10219 void Sema::ActOnCXXForRangeDecl(Decl *D) {
10285 Decl *Var = ActOnDeclarator(S, D);
10488 Sema::FinalizeDeclaration(Decl *ThisDecl) {
10667 ArrayRef<Decl *> Group) {
10668 SmallVector<Decl*, 8> Decls;
10675 if (Decl *D = Group[i]) {
10697 Sema::BuildDeclaratorGroup(MutableArrayRef<Decl *> Group,
10745 void Sema::ActOnDocumentableDecl(Decl *D) {
10749 void Sema::ActOnDocumentableDecls(ArrayRef<Decl *> Group) {
10761 // This is a decl group. Normally it will contain only declarations
10768 Decl *MaybeTagDecl = Group[0];
10774 // See if there are any new comments that are not attached to a decl.
10778 // There is at least one comment that not attached to a decl.
10792 Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
11071 Decl *
11080 Decl *DP = HandleDeclarator(ParentScope, D, TemplateParameterLists);
11232 Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D,
11324 // Is the decl actually in the context?
11327 // Either way, reassign the lexical decl context to our FunctionDecl.
11331 // If the decl has a non-null name, make accessible in the current scope.
11356 // We want to attach documentation to original Decl (which might be
11360 getCurLexicalContext()->getDeclKind() != Decl::ObjCCategoryImpl &&
11361 getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation)
11414 bool Sema::canSkipFunctionBody(Decl *D) {
11426 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) {
11427 if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Decl))
11429 else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(Decl))
11431 return Decl;
11434 Decl *Sema::ActOnFinishFunctionBody(Decl *D, Stmt *BodyArg) {
11438 Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
11714 /// relevant Decl.
11715 void Sema::ActOnFinishDelayedAttribute(Scope *S, Decl *D,
11717 // Always attach attributes to the underlying decl.
11771 assert(!Error && "Error setting up implicit decl!");
12173 // While the decl is in a namespace, do repeated lookup of that name and see
12206 /// found a declaration in \p OldDC as a previous decl, perhaps through a
12257 Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
12376 // context, don't try to make a decl for it.
12529 // there's a shadow friend decl.
12542 // decl-specifier-seq or parameter-declaration-clause of a
12600 // It's okay to have a tag decl in the same scope as a typedef
12601 // which hides a tag decl in the same scope. Finding this
12648 // rementions the tag), reuse the decl.
12726 Decl::FOK_Undeclared ||
12808 // tag. We're going to create a new Decl for it.
12820 // have a definition. Just create a new decl.
12825 // new decl/type. We set PrevDecl to NULL so that the entities
12829 // If we get here, we're going to create a new Decl. If PrevDecl
12898 // location of the decl, otherwise use the location of the struct/union
13002 // happen here (in act on tag decl). The #pragma pack stack is
13059 // Mark this as a friend decl if applicable.
13114 void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) {
13128 Decl *Sema::ActOnObjCContainerStartDefinition(Decl *IDecl) {
13138 void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD,
13175 void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD,
13215 ActOnObjCContainerStartDefinition(cast<Decl>(DC));
13219 void Sema::ActOnTagDefinitionError(Scope *S, Decl *TagD) {
13331 Decl *Sema::ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
13703 Decl *Sema::ActOnIvar(Scope *S,
13770 // Construct the decl.
13818 SmallVectorImpl<Decl *> &AllIvarDecls) {
13822 Decl *ivarDecl = AllIvarDecls[AllIvarDecls.size()-1];
13851 void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl,
13852 ArrayRef<Decl *> Fields, SourceLocation LBrac,
13854 assert(EnclosingDecl && "missing record or interface decl");
13863 case Decl::ObjCCategory:
13866 case Decl::ObjCImplementation:
13890 for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end();
14505 Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst,
14513 // The scope passed in may not be a decl scope. Zip up the scope tree until
14561 // Register this decl in the current scope stack.
14638 static void CheckForDuplicateEnumValues(Sema &S, ArrayRef<Decl *> Elements,
14776 SourceLocation RBraceLoc, Decl *EnumDeclX,
14777 ArrayRef<Decl *> Elements,
14935 // same as the enumerator decl itself. This means that in "enum { X = 1U }"
14942 // the enum decl type.
14994 for (Decl *D : Elements) {
15011 Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
15048 S.Diag(cast<Decl>(DC)->getLocStart(),
15205 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc, LookupOrdinaryName);
15221 Decl *PrevDecl = LookupSingleName(TUScope, AliasName, AliasNameLoc,
15235 Decl *Sema::getObjCDeclContext() const {
15240 const Decl *D = cast_or_null<Decl>(getCurObjCLexicalContext());