Home
last modified time | relevance | path

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

/openbsd-src/gnu/llvm/clang/lib/Sema/
H A DHLSLExternalSemaSource.cpp49 CXXRecordDecl *PrevDecl = nullptr; in BuiltinTypeDeclBuilder() local
53 PrevDecl = TD->getTemplatedDecl(); in BuiltinTypeDeclBuilder()
56 PrevDecl = dyn_cast<CXXRecordDecl>(Found); in BuiltinTypeDeclBuilder()
57 assert(PrevDecl && "Unexpected lookup result type."); in BuiltinTypeDeclBuilder()
60 if (PrevDecl && PrevDecl->isCompleteDefinition()) { in BuiltinTypeDeclBuilder()
61 Record = PrevDecl; in BuiltinTypeDeclBuilder()
67 SourceLocation(), &II, PrevDecl, true); in BuiltinTypeDeclBuilder()
385 NamespaceDecl *PrevDecl = nullptr; in InitializeSema() local
387 PrevDecl = Result.getAsSingle<NamespaceDecl>(); in InitializeSema()
390 SourceLocation(), &HLSL, PrevDecl, /*Nested=*/false); in InitializeSema()
H A DSemaTemplate.cpp888 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) { in DiagnoseTemplateParameterShadow() argument
889 assert(PrevDecl->isTemplateParameter() && "Not a template parameter"); in DiagnoseTemplateParameterShadow()
898 Diag(Loc, DiagId) << cast<NamedDecl>(PrevDecl)->getDeclName(); in DiagnoseTemplateParameterShadow()
899 Diag(PrevDecl->getLocation(), diag::note_template_param_here); in DiagnoseTemplateParameterShadow()
970 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in maybeDiagnoseTemplateParameterShadow() local
972 if (PrevDecl && PrevDecl->isTemplateParameter()) in maybeDiagnoseTemplateParameterShadow()
973 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow()
1890 NamedDecl *PrevDecl = nullptr; in CheckClassTemplate() local
1892 PrevDecl = (*Previous.begin())->getUnderlyingDecl(); in CheckClassTemplate()
1894 if (PrevDecl && PrevDecl->isTemplateParameter()) { in CheckClassTemplate()
[all …]
H A DSemaDeclObjC.cpp552 NamedDecl *PrevDecl = LookupSingleName(TUScope, SuperName, SuperLoc, in ActOnSuperClassOfClassInterface() local
555 if (!PrevDecl) { in ActOnSuperClassOfClassInterface()
564 PrevDecl = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>(); in ActOnSuperClassOfClassInterface()
568 if (declaresSameEntity(PrevDecl, IDecl)) { in ActOnSuperClassOfClassInterface()
574 dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); in ActOnSuperClassOfClassInterface()
583 if (PrevDecl && !SuperClassDecl) { in ActOnSuperClassOfClassInterface()
587 dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
610 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnSuperClassOfClassInterface()
614 if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
985 NamedDecl *PrevDecl = in ActOnStartClassInterface() local
[all …]
H A DSemaTemplateInstantiateDecl.cpp1420 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
1426 PrevDecl = cast<EnumDecl>(Prev); in VisitEnumDecl()
1431 D->getLocation(), D->getIdentifier(), PrevDecl, in VisitEnumDecl()
1592 CXXRecordDecl *PrevDecl = nullptr; in VisitClassTemplateDecl() local
1600 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
1631 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
1664 Pattern->getLocation(), Pattern->getIdentifier(), PrevDecl, in VisitClassTemplateDecl()
1888 CXXRecordDecl *PrevDecl = nullptr; in VisitCXXRecordDecl() local
1894 PrevDecl = cast<CXXRecordDecl>(Prev); in VisitCXXRecordDecl()
1907 D->getIdentifier(), PrevDecl, in VisitCXXRecordDecl()
[all …]
H A DSemaDecl.cpp5328 NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl(); in CheckAnonMemberRedeclaration() local
5329 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration()
5331 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration()
5336 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration()
6781 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument
6783 if (!PrevDecl) in isOutOfScopePreviousDeclaration()
6786 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration()
6801 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration()
10821 bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) { in shouldLinkDependentDeclWithPrevious() argument
10842 auto *PrevVD = dyn_cast<ValueDecl>(PrevDecl); in shouldLinkDependentDeclWithPrevious()
[all …]
H A DSemaAccess.cpp1118 NamedDecl *PrevDecl = nullptr; in diagnoseBadDirectAccess() local
1120 PrevDecl = VD->getPreviousDecl(); in diagnoseBadDirectAccess()
1122 PrevDecl = FD->getPreviousDecl(); in diagnoseBadDirectAccess()
1124 PrevDecl = TND->getPreviousDecl(); in diagnoseBadDirectAccess()
1128 PrevDecl = TD->getPreviousDecl(); in diagnoseBadDirectAccess()
1130 if (!PrevDecl) break; in diagnoseBadDirectAccess()
1131 D = PrevDecl; in diagnoseBadDirectAccess()
H A DSemaDeclCXX.cpp11240 NamedDecl *PrevDecl = in ActOnStartNamespaceDef() local
11242 PrevNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl); in ActOnStartNamespaceDef()
11249 } else if (PrevDecl) { in ActOnStartNamespaceDef()
11253 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnStartNamespaceDef()
12176 UsingShadowDecl *PrevDecl) { in BuildUsingShadowDecl() argument
12206 Shadow->setPreviousDecl(PrevDecl); in BuildUsingShadowDecl()
12639 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingDeclaration() local
12640 if (!CheckUsingShadowDecl(UD, *I, Previous, PrevDecl)) in BuildUsingDeclaration()
12641 BuildUsingShadowDecl(S, UD, *I, PrevDecl); in BuildUsingDeclaration()
12689 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingEnumDeclaration() local
[all …]
H A DSema.cpp1183 Decl *PrevDecl = LookupSingleName(TUScope, WeakIDs.first, SourceLocation(), in ActOnEndOfTranslationUnit() local
1185 if (PrevDecl != nullptr && in ActOnEndOfTranslationUnit()
1186 !(isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) in ActOnEndOfTranslationUnit()
H A DSemaOpenMP.cpp22109 auto *PrevDecl = cast<OMPDeclareReductionDecl>(Filter.next()); in ActOnOpenMPDeclareReductionDirectiveStart() local
22111 auto I = UsedAsPrevious.find(PrevDecl); in ActOnOpenMPDeclareReductionDirectiveStart()
22113 UsedAsPrevious[PrevDecl] = false; in ActOnOpenMPDeclareReductionDirectiveStart()
22114 if (OMPDeclareReductionDecl *D = PrevDecl->getPrevDeclInScope()) in ActOnOpenMPDeclareReductionDirectiveStart()
22117 PreviousRedeclTypes[PrevDecl->getType().getCanonicalType()] = in ActOnOpenMPDeclareReductionDirectiveStart()
22118 PrevDecl->getLocation(); in ActOnOpenMPDeclareReductionDirectiveStart()
22361 auto *PrevDecl = cast<OMPDeclareMapperDecl>(Filter.next()); in ActOnOpenMPDeclareMapperDirective() local
22363 auto I = UsedAsPrevious.find(PrevDecl); in ActOnOpenMPDeclareMapperDirective()
22365 UsedAsPrevious[PrevDecl] = false; in ActOnOpenMPDeclareMapperDirective()
22366 if (OMPDeclareMapperDecl *D = PrevDecl->getPrevDeclInScope()) in ActOnOpenMPDeclareMapperDirective()
[all …]
/openbsd-src/gnu/llvm/clang/lib/AST/
H A DDeclObjC.cpp1547 ObjCInterfaceDecl *PrevDecl, in Create() argument
1551 ObjCInterfaceDecl(C, DC, atLoc, Id, typeParamList, ClassLoc, PrevDecl, in Create()
1554 C.getObjCInterfaceType(Result, PrevDecl); in Create()
1571 ObjCInterfaceDecl *PrevDecl, in ObjCInterfaceDecl() argument
1575 setPreviousDecl(PrevDecl); in ObjCInterfaceDecl()
1578 if (PrevDecl) in ObjCInterfaceDecl()
1579 Data = PrevDecl->Data; in ObjCInterfaceDecl()
1939 ObjCProtocolDecl *PrevDecl) in ObjCProtocolDecl() argument
1942 setPreviousDecl(PrevDecl); in ObjCProtocolDecl()
1943 if (PrevDecl) in ObjCProtocolDecl()
[all …]
H A DDeclTemplate.cpp916 ClassTemplateSpecializationDecl *PrevDecl) in ClassTemplateSpecializationDecl() argument
918 SpecializedTemplate->getIdentifier(), PrevDecl), in ClassTemplateSpecializationDecl()
937 ClassTemplateSpecializationDecl *PrevDecl) { in Create() argument
941 SpecializedTemplate, Args, PrevDecl); in Create()
952 Context.getTypeDeclType(Result, PrevDecl); in Create()
1105 ClassTemplatePartialSpecializationDecl *PrevDecl) in ClassTemplatePartialSpecializationDecl() argument
1109 SpecializedTemplate, Args, PrevDecl), in ClassTemplatePartialSpecializationDecl()
1125 ClassTemplatePartialSpecializationDecl *PrevDecl) { in Create() argument
1132 ASTArgInfos, PrevDecl); in Create()
H A DDeclCXX.cpp126 CXXRecordDecl *PrevDecl) in CXXRecordDecl() argument
127 : RecordDecl(K, TK, C, DC, StartLoc, IdLoc, Id, PrevDecl), in CXXRecordDecl()
128 DefinitionData(PrevDecl ? PrevDecl->DefinitionData in CXXRecordDecl()
134 CXXRecordDecl *PrevDecl, in Create() argument
137 PrevDecl); in Create()
142 C.getTypeDeclType(R, PrevDecl); in Create()
2897 IdentifierInfo *Id, NamespaceDecl *PrevDecl, in NamespaceDecl() argument
2907 setPreviousDecl(PrevDecl); in NamespaceDecl()
2909 if (PrevDecl) in NamespaceDecl()
2910 AnonOrFirstNamespaceAndFlags.setPointer(PrevDecl->getOriginalNamespace()); in NamespaceDecl()
[all …]
H A DDecl.cpp3392 FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) { in setPreviousDeclaration() argument
3393 redeclarable_base::setPreviousDecl(PrevDecl); in setPreviousDeclaration()
3397 = PrevDecl? PrevDecl->getDescribedFunctionTemplate() : nullptr; in setPreviousDeclaration()
3398 assert((!PrevDecl || PrevFunTmpl) && "Function/function template mismatch"); in setPreviousDeclaration()
3402 if (PrevDecl && PrevDecl->isInlined()) in setPreviousDeclaration()
4402 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, in TagDecl() argument
4408 setPreviousDecl(PrevDecl); in TagDecl()
4538 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, in EnumDecl() argument
4540 : TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4557 EnumDecl *PrevDecl, bool IsScoped, in Create() argument
[all …]
H A DDeclBase.cpp1368 Decl *PrevDecl = nullptr; in BuildDeclChain() local
1373 if (PrevDecl) in BuildDeclChain()
1374 PrevDecl->NextInContextAndBits.setPointer(D); in BuildDeclChain()
1378 PrevDecl = D; in BuildDeclChain()
1381 return std::make_pair(FirstNewDecl, PrevDecl); in BuildDeclChain()
H A DDeclPrinter.cpp1186 FunctionDecl *PrevDecl = D->getTemplatedDecl(); in VisitFunctionTemplateDecl() local
1188 if (PrevDecl->isDefined(Def) && Def != PrevDecl) in VisitFunctionTemplateDecl()
1192 if (!PrevDecl->isThisDeclarationADefinition()) in VisitFunctionTemplateDecl()
H A DASTImporter.cpp2704 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
2725 PrevDecl = FoundEnum->getMostRecentDecl(); in VisitEnumDecl()
2755 Loc, Name.getAsIdentifierInfo(), PrevDecl, D->isScoped(), in VisitEnumDecl()
2818 RecordDecl *PrevDecl = nullptr; in VisitRecordDecl() local
2874 PrevDecl = FoundRecord->getMostRecentDecl(); in VisitRecordDecl()
2923 cast_or_null<CXXRecordDecl>(PrevDecl), DelayTypeCreation)) in VisitRecordDecl()
2931 cast_or_null<CXXRecordDecl>(PrevDecl))) in VisitRecordDecl()
3001 Name.getAsIdentifierInfo(), PrevDecl)) in VisitRecordDecl()
5842 ClassTemplateSpecializationDecl *PrevDecl = nullptr; in VisitClassTemplateSpecializationDecl() local
5854 PrevDecl = ClassTemplate->findPartialSpecialization(TemplateArgs, in VisitClassTemplateSpecializationDecl()
[all …]
H A DASTContext.cpp4623 } else if (CXXRecordDecl *PrevDecl = Decl->getPreviousDecl()) { in getInjectedClassNameType() local
4624 assert(PrevDecl->TypeForDecl && "previous declaration has no type"); in getInjectedClassNameType()
4625 Decl->TypeForDecl = PrevDecl->TypeForDecl; in getInjectedClassNameType()
4729 if (const RecordDecl *PrevDecl = Decl->getPreviousDecl()) in getRecordType() local
4730 if (PrevDecl->TypeForDecl) in getRecordType()
4731 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getRecordType()
4742 if (const EnumDecl *PrevDecl = Decl->getPreviousDecl()) in getEnumType() local
4743 if (PrevDecl->TypeForDecl) in getEnumType()
4744 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getEnumType()
5595 ObjCInterfaceDecl *PrevDecl) const { in getObjCInterfaceType()
[all …]
/openbsd-src/gnu/llvm/clang/include/clang/AST/
H A DDecl.h564 IdentifierInfo *Id, NamespaceDecl *PrevDecl, bool Nested);
578 IdentifierInfo *Id, NamespaceDecl *PrevDecl,
2574 void setPreviousDeclaration(FunctionDecl * PrevDecl);
3470 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl,
3755 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl,
3827 IdentifierInfo *Id, EnumDecl *PrevDecl,
4028 IdentifierInfo *Id, RecordDecl *PrevDecl);
4033 IdentifierInfo *Id, RecordDecl* PrevDecl = nullptr);
4832 void Redeclarable<decl_type>::setPreviousDecl(decl_type *PrevDecl) { in setPreviousDecl() argument
4838 if (PrevDecl) { in setPreviousDecl()
[all …]
H A DASTContext.h1554 const TypeDecl *PrevDecl = nullptr) const {
1558 if (PrevDecl) {
1559 assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
1560 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1561 return QualType(PrevDecl->TypeForDecl, 0);
1660 ObjCInterfaceDecl *PrevDecl = nullptr) const;
H A DRedeclarable.h237 void setPreviousDecl(decl_type *PrevDecl);
H A DDeclObjC.h1236 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl,
1270 ObjCInterfaceDecl *PrevDecl,
2093 ObjCProtocolDecl *PrevDecl);
2132 ObjCProtocolDecl *PrevDecl);
H A DDeclTemplate.h1879 ClassTemplateSpecializationDecl *PrevDecl);
1892 ClassTemplateSpecializationDecl *PrevDecl);
2123 ClassTemplatePartialSpecializationDecl *PrevDecl);
2143 ClassTemplatePartialSpecializationDecl *PrevDecl);
H A DDeclCXX.h498 IdentifierInfo *Id, CXXRecordDecl *PrevDecl);
560 CXXRecordDecl *PrevDecl = nullptr,
/openbsd-src/gnu/llvm/clang/include/clang/Sema/
H A DTemplate.h681 VarTemplateSpecializationDecl *PrevDecl = nullptr);
H A DSema.h3371 AccessSpecifier AS, NamedDecl *PrevDecl,
6167 UsingShadowDecl *PrevDecl);
8065 void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl);
8274 NamedDecl *PrevDecl,