Home
last modified time | relevance | path

Searched refs:PrevDecl (Results 1 – 25 of 27) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaTemplate.cpp861 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl, in DiagnoseTemplateParameterShadow() argument
863 assert(PrevDecl->isTemplateParameter() && "Not a template parameter"); in DiagnoseTemplateParameterShadow()
878 const auto *ND = cast<NamedDecl>(PrevDecl); in DiagnoseTemplateParameterShadow()
946 NamedDecl *PrevDecl = in maybeDiagnoseTemplateParameterShadow() local
949 if (PrevDecl && PrevDecl->isTemplateParameter()) in maybeDiagnoseTemplateParameterShadow()
950 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow()
1922 NamedDecl *PrevDecl = nullptr; in CheckClassTemplate() local
1924 PrevDecl = (*Previous.begin())->getUnderlyingDecl(); in CheckClassTemplate()
1926 if (PrevDecl && PrevDecl->isTemplateParameter()) { in CheckClassTemplate()
1928 DiagnoseTemplateParameterShadow(NameLoc, PrevDecl); in CheckClassTemplate()
[all …]
H A DSemaDeclObjC.cpp559 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in ActOnSuperClassOfClassInterface() local
562 if (!PrevDecl) { in ActOnSuperClassOfClassInterface()
571 PrevDecl = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>(); in ActOnSuperClassOfClassInterface()
575 if (declaresSameEntity(PrevDecl, IDecl)) { in ActOnSuperClassOfClassInterface()
581 dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); in ActOnSuperClassOfClassInterface()
590 if (PrevDecl && !SuperClassDecl) { in ActOnSuperClassOfClassInterface()
594 dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
618 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnSuperClassOfClassInterface()
622 if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
986 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in ActOnStartClassInterface() local
[all …]
H A DHLSLBuiltinTypeDeclBuilder.cpp538 CXXRecordDecl *PrevDecl = nullptr; in BuiltinTypeDeclBuilder() local
543 PrevDecl = TD->getTemplatedDecl(); in BuiltinTypeDeclBuilder()
546 PrevDecl = dyn_cast<CXXRecordDecl>(Found); in BuiltinTypeDeclBuilder()
547 assert(PrevDecl && "Unexpected lookup result type."); in BuiltinTypeDeclBuilder()
550 if (PrevDecl && PrevDecl->isCompleteDefinition()) { in BuiltinTypeDeclBuilder()
551 Record = PrevDecl; in BuiltinTypeDeclBuilder()
558 PrevDecl, true); in BuiltinTypeDeclBuilder()
H A DSemaDecl.cpp5383 NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl(); in CheckAnonMemberRedeclaration() local
5384 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration()
5386 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration()
5390 PrevDecl->isPlaceholderVar(SemaRef.getLangOpts()) && in CheckAnonMemberRedeclaration()
5399 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration()
6887 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument
6889 if (!PrevDecl) in isOutOfScopePreviousDeclaration()
6892 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration()
6907 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration()
7567 NamedDecl *PrevDecl = *Previous.begin(); in ActOnVariableDeclarator() local
[all …]
H A DSemaTemplateInstantiateDecl.cpp2002 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
2008 PrevDecl = cast<EnumDecl>(Prev); in VisitEnumDecl()
2013 D->getLocation(), D->getIdentifier(), PrevDecl, in VisitEnumDecl()
2099 if (PrevDecl == nullptr) { in VisitEnumDecl()
2201 CXXRecordDecl *PrevDecl = nullptr; in VisitClassTemplateDecl() local
2209 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
2240 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
2253 Pattern->getLocation(), Pattern->getIdentifier(), PrevDecl, in VisitClassTemplateDecl()
2499 CXXRecordDecl *PrevDecl = nullptr; in VisitCXXRecordDecl() local
2505 PrevDecl = cast<CXXRecordDecl>(Prev); in VisitCXXRecordDecl()
[all …]
H A DHLSLExternalSemaSource.cpp40 NamespaceDecl *PrevDecl = nullptr; in InitializeSema() local
42 PrevDecl = Result.getAsSingle<NamespaceDecl>(); in InitializeSema()
45 SourceLocation(), &HLSL, PrevDecl, /*Nested=*/false); in InitializeSema()
H A DSemaAccess.cpp1124 NamedDecl *PrevDecl = nullptr; in diagnoseBadDirectAccess() local
1126 PrevDecl = VD->getPreviousDecl(); in diagnoseBadDirectAccess()
1128 PrevDecl = FD->getPreviousDecl(); in diagnoseBadDirectAccess()
1130 PrevDecl = TND->getPreviousDecl(); in diagnoseBadDirectAccess()
1135 PrevDecl = TD->getPreviousDecl(); in diagnoseBadDirectAccess()
1137 if (!PrevDecl) break; in diagnoseBadDirectAccess()
1138 D = PrevDecl; in diagnoseBadDirectAccess()
H A DSemaDeclCXX.cpp11811 NamedDecl *PrevDecl = in ActOnStartNamespaceDef() local
11813 PrevNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl); in ActOnStartNamespaceDef()
11823 } else if (PrevDecl) { in ActOnStartNamespaceDef()
11827 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnStartNamespaceDef()
12855 UsingShadowDecl *PrevDecl) { in BuildUsingShadowDecl() argument
12885 Shadow->setPreviousDecl(PrevDecl); in BuildUsingShadowDecl()
13289 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingDeclaration() local
13290 if (!CheckUsingShadowDecl(UD, *I, Previous, PrevDecl)) in BuildUsingDeclaration()
13291 BuildUsingShadowDecl(S, UD, *I, PrevDecl); in BuildUsingDeclaration()
13339 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingEnumDeclaration() local
[all …]
H A DSema.cpp1309 Decl *PrevDecl = LookupSingleName(TUScope, WeakIDs.first, SourceLocation(), in ActOnEndOfTranslationUnit() local
1311 if (PrevDecl != nullptr && in ActOnEndOfTranslationUnit()
1312 !(isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) in ActOnEndOfTranslationUnit()
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DProgram.h146 DeclScope(Program &P) : P(P), PrevDecl(P.CurrentDeclaration) { in DeclScope()
150 ~DeclScope() { P.CurrentDeclaration = PrevDecl; } in ~DeclScope()
154 unsigned PrevDecl; variable
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DDeclObjC.cpp1542 ObjCInterfaceDecl *PrevDecl, SourceLocation ClassLoc, bool isInternal) { in Create() argument
1544 ObjCInterfaceDecl(C, DC, atLoc, Id, typeParamList, ClassLoc, PrevDecl, in Create()
1547 C.getObjCInterfaceType(Result, PrevDecl); in Create()
1563 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl, bool IsInternal) in ObjCInterfaceDecl() argument
1566 setPreviousDecl(PrevDecl); in ObjCInterfaceDecl()
1569 if (PrevDecl) in ObjCInterfaceDecl()
1570 Data = PrevDecl->Data; in ObjCInterfaceDecl()
1930 ObjCProtocolDecl *PrevDecl) in ObjCProtocolDecl() argument
1933 setPreviousDecl(PrevDecl); in ObjCProtocolDecl()
1934 if (PrevDecl) in ObjCProtocolDecl()
[all …]
H A DDeclTemplate.cpp973 bool StrictPackMatch, ClassTemplateSpecializationDecl *PrevDecl) in ClassTemplateSpecializationDecl() argument
975 SpecializedTemplate->getIdentifier(), PrevDecl), in ClassTemplateSpecializationDecl()
992 ClassTemplateSpecializationDecl *PrevDecl) { in Create() argument
995 SpecializedTemplate, Args, StrictPackMatch, PrevDecl); in Create()
1006 Context.getTypeDeclType(Result, PrevDecl); in Create()
1178 ClassTemplatePartialSpecializationDecl *PrevDecl) in ClassTemplatePartialSpecializationDecl() argument
1183 SpecializedTemplate, Args, /*StrictPackMatch=*/false, PrevDecl), in ClassTemplatePartialSpecializationDecl()
1195 ClassTemplatePartialSpecializationDecl *PrevDecl) { in Create() argument
1198 PrevDecl); in Create()
H A DDecl.cpp3666 FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) { in setPreviousDeclaration() argument
3667 redeclarable_base::setPreviousDecl(PrevDecl); in setPreviousDeclaration()
3671 = PrevDecl? PrevDecl->getDescribedFunctionTemplate() : nullptr; in setPreviousDeclaration()
3672 assert((!PrevDecl || PrevFunTmpl) && "Function/function template mismatch"); in setPreviousDeclaration()
3676 if (PrevDecl && PrevDecl->isInlined()) in setPreviousDeclaration()
4803 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, in TagDecl() argument
4809 setPreviousDecl(PrevDecl); in TagDecl()
4939 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, in EnumDecl() argument
4941 : TagDecl(Enum, TagTypeKind::Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4958 EnumDecl *PrevDecl, bool IsScoped, in Create() argument
[all …]
H A DDeclCXX.cpp127 CXXRecordDecl *PrevDecl) in CXXRecordDecl() argument
128 : RecordDecl(K, TK, C, DC, StartLoc, IdLoc, Id, PrevDecl), in CXXRecordDecl()
129 DefinitionData(PrevDecl ? PrevDecl->DefinitionData in CXXRecordDecl()
135 CXXRecordDecl *PrevDecl, in Create() argument
138 PrevDecl); in Create()
143 C.getTypeDeclType(R, PrevDecl); in Create()
3229 IdentifierInfo *Id, NamespaceDecl *PrevDecl, in NamespaceDecl() argument
3235 setPreviousDecl(PrevDecl); in NamespaceDecl()
3241 NamespaceDecl *PrevDecl, bool Nested) { in Create() argument
3243 NamespaceDecl(C, DC, Inline, StartLoc, IdLoc, Id, PrevDecl, Nested); in Create()
H A DDeclBase.cpp1570 Decl *PrevDecl = nullptr; in BuildDeclChain() local
1575 if (PrevDecl) in BuildDeclChain()
1576 PrevDecl->NextInContextAndBits.setPointer(D); in BuildDeclChain()
1580 PrevDecl = D; in BuildDeclChain()
1583 return std::make_pair(FirstNewDecl, PrevDecl); in BuildDeclChain()
H A DDeclPrinter.cpp1318 FunctionDecl *PrevDecl = D->getTemplatedDecl(); in VisitFunctionTemplateDecl() local
1320 if (PrevDecl->isDefined(Def) && Def != PrevDecl) in VisitFunctionTemplateDecl()
1324 if (!PrevDecl->isThisDeclarationADefinition()) in VisitFunctionTemplateDecl()
H A DASTImporter.cpp3205 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
3226 PrevDecl = FoundEnum->getMostRecentDecl(); in VisitEnumDecl()
3261 Loc, Name.getAsIdentifierInfo(), PrevDecl, D->isScoped(), in VisitEnumDecl()
3328 RecordDecl *PrevDecl = nullptr; in VisitRecordDecl() local
3385 PrevDecl = FoundRecord->getMostRecentDecl(); in VisitRecordDecl()
3433 cast_or_null<CXXRecordDecl>(PrevDecl), DelayTypeCreation)) in VisitRecordDecl()
3441 cast_or_null<CXXRecordDecl>(PrevDecl))) in VisitRecordDecl()
3523 Name.getAsIdentifierInfo(), PrevDecl)) in VisitRecordDecl()
6449 ClassTemplateSpecializationDecl *PrevDecl = nullptr; in VisitClassTemplateSpecializationDecl() local
6461 PrevDecl = ClassTemplate->findPartialSpecialization(TemplateArgs, in VisitClassTemplateSpecializationDecl()
[all …]
H A DASTContext.cpp5242 } else if (CXXRecordDecl *PrevDecl = Decl->getPreviousDecl()) { in getInjectedClassNameType() local
5243 assert(PrevDecl->TypeForDecl && "previous declaration has no type"); in getInjectedClassNameType()
5244 Decl->TypeForDecl = PrevDecl->TypeForDecl; in getInjectedClassNameType()
5348 if (const RecordDecl *PrevDecl = Decl->getPreviousDecl()) in getRecordType() local
5349 if (PrevDecl->TypeForDecl) in getRecordType()
5350 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getRecordType()
5361 if (const EnumDecl *PrevDecl = Decl->getPreviousDecl()) in getEnumType() local
5362 if (PrevDecl->TypeForDecl) in getEnumType()
5363 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getEnumType()
6410 ObjCInterfaceDecl *PrevDecl) const { in getObjCInterfaceType()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DDecl.h584 IdentifierInfo *Id, NamespaceDecl *PrevDecl, bool Nested);
598 IdentifierInfo *Id, NamespaceDecl *PrevDecl,
2737 void setPreviousDeclaration(FunctionDecl * PrevDecl);
3707 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl,
3995 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl,
4067 IdentifierInfo *Id, EnumDecl *PrevDecl,
4269 IdentifierInfo *Id, RecordDecl *PrevDecl);
4274 IdentifierInfo *Id, RecordDecl* PrevDecl = nullptr);
5238 void Redeclarable<decl_type>::setPreviousDecl(decl_type *PrevDecl) { in setPreviousDecl() argument
5244 if (PrevDecl) { in setPreviousDecl()
[all …]
H A DRedeclarable.h234 void setPreviousDecl(decl_type *PrevDecl);
H A DASTContext.h1754 const TypeDecl *PrevDecl = nullptr) const {
1758 if (PrevDecl) {
1759 assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
1760 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1761 return QualType(PrevDecl->TypeForDecl, 0);
1919 ObjCInterfaceDecl *PrevDecl = nullptr) const;
H A DDeclObjC.h1245 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl,
1278 ObjCInterfaceDecl *PrevDecl,
2106 ObjCProtocolDecl *PrevDecl);
2146 ObjCProtocolDecl *PrevDecl);
H A DDeclTemplate.h1863 ClassTemplateSpecializationDecl *PrevDecl);
1876 ClassTemplateSpecializationDecl *PrevDecl);
2112 ClassTemplatePartialSpecializationDecl *PrevDecl);
2129 ClassTemplatePartialSpecializationDecl *PrevDecl);
H A DDeclCXX.h513 IdentifierInfo *Id, CXXRecordDecl *PrevDecl);
574 CXXRecordDecl *PrevDecl = nullptr,
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DTemplate.h730 VarTemplateSpecializationDecl *PrevDecl = nullptr);

12