Home
last modified time | relevance | path

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

/src/contrib/llvm-project/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 PrevDecl, true); in BuiltinTypeDeclBuilder()
399 NamespaceDecl *PrevDecl = nullptr; in InitializeSema() local
401 PrevDecl = Result.getAsSingle<NamespaceDecl>(); in InitializeSema()
404 SourceLocation(), &HLSL, PrevDecl, /*Nested=*/false); in InitializeSema()
H A DSemaTemplate.cpp858 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl, in DiagnoseTemplateParameterShadow() argument
860 assert(PrevDecl->isTemplateParameter() && "Not a template parameter"); in DiagnoseTemplateParameterShadow()
875 const auto *ND = cast<NamedDecl>(PrevDecl); in DiagnoseTemplateParameterShadow()
943 NamedDecl *PrevDecl = in maybeDiagnoseTemplateParameterShadow() local
946 if (PrevDecl && PrevDecl->isTemplateParameter()) in maybeDiagnoseTemplateParameterShadow()
947 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow()
1879 NamedDecl *PrevDecl = nullptr; in CheckClassTemplate() local
1881 PrevDecl = (*Previous.begin())->getUnderlyingDecl(); in CheckClassTemplate()
1883 if (PrevDecl && PrevDecl->isTemplateParameter()) { in CheckClassTemplate()
1885 DiagnoseTemplateParameterShadow(NameLoc, PrevDecl); in CheckClassTemplate()
[all …]
H A DSemaDeclObjC.cpp560 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in ActOnSuperClassOfClassInterface() local
563 if (!PrevDecl) { in ActOnSuperClassOfClassInterface()
572 PrevDecl = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>(); in ActOnSuperClassOfClassInterface()
576 if (declaresSameEntity(PrevDecl, IDecl)) { in ActOnSuperClassOfClassInterface()
582 dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); in ActOnSuperClassOfClassInterface()
591 if (PrevDecl && !SuperClassDecl) { in ActOnSuperClassOfClassInterface()
595 dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
619 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnSuperClassOfClassInterface()
623 if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface()
986 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in ActOnStartClassInterface() local
[all …]
H A DSemaTemplateInstantiateDecl.cpp1501 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
1507 PrevDecl = cast<EnumDecl>(Prev); in VisitEnumDecl()
1512 D->getLocation(), D->getIdentifier(), PrevDecl, in VisitEnumDecl()
1673 CXXRecordDecl *PrevDecl = nullptr; in VisitClassTemplateDecl() local
1681 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
1712 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl()
1725 Pattern->getLocation(), Pattern->getIdentifier(), PrevDecl, in VisitClassTemplateDecl()
1971 CXXRecordDecl *PrevDecl = nullptr; in VisitCXXRecordDecl() local
1977 PrevDecl = cast<CXXRecordDecl>(Prev); in VisitCXXRecordDecl()
1990 D->getIdentifier(), PrevDecl, in VisitCXXRecordDecl()
[all …]
H A DSemaDecl.cpp5269 NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl(); in CheckAnonMemberRedeclaration() local
5270 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration()
5272 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration()
5276 PrevDecl->isPlaceholderVar(SemaRef.getLangOpts()) && in CheckAnonMemberRedeclaration()
5285 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration()
6767 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument
6769 if (!PrevDecl) in isOutOfScopePreviousDeclaration()
6772 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration()
6787 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration()
7387 NamedDecl *PrevDecl = *Previous.begin(); in ActOnVariableDeclarator() local
[all …]
H A DSemaAccess.cpp1126 NamedDecl *PrevDecl = nullptr; in diagnoseBadDirectAccess() local
1128 PrevDecl = VD->getPreviousDecl(); in diagnoseBadDirectAccess()
1130 PrevDecl = FD->getPreviousDecl(); in diagnoseBadDirectAccess()
1132 PrevDecl = TND->getPreviousDecl(); in diagnoseBadDirectAccess()
1136 PrevDecl = TD->getPreviousDecl(); in diagnoseBadDirectAccess()
1138 if (!PrevDecl) break; in diagnoseBadDirectAccess()
1139 D = PrevDecl; in diagnoseBadDirectAccess()
H A DSemaDeclCXX.cpp11570 NamedDecl *PrevDecl = in ActOnStartNamespaceDef() local
11572 PrevNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl); in ActOnStartNamespaceDef()
11582 } else if (PrevDecl) { in ActOnStartNamespaceDef()
11586 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnStartNamespaceDef()
12528 UsingShadowDecl *PrevDecl) { in BuildUsingShadowDecl() argument
12558 Shadow->setPreviousDecl(PrevDecl); in BuildUsingShadowDecl()
12957 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingDeclaration() local
12958 if (!CheckUsingShadowDecl(UD, *I, Previous, PrevDecl)) in BuildUsingDeclaration()
12959 BuildUsingShadowDecl(S, UD, *I, PrevDecl); in BuildUsingDeclaration()
13007 UsingShadowDecl *PrevDecl = nullptr; in BuildUsingEnumDeclaration() local
[all …]
H A DSema.cpp1240 Decl *PrevDecl = LookupSingleName(TUScope, WeakIDs.first, SourceLocation(), in ActOnEndOfTranslationUnit() local
1242 if (PrevDecl != nullptr && in ActOnEndOfTranslationUnit()
1243 !(isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) in ActOnEndOfTranslationUnit()
H A DSemaOpenMP.cpp21348 auto *PrevDecl = cast<OMPDeclareReductionDecl>(Filter.next()); in ActOnOpenMPDeclareReductionDirectiveStart() local
21350 auto I = UsedAsPrevious.find(PrevDecl); in ActOnOpenMPDeclareReductionDirectiveStart()
21352 UsedAsPrevious[PrevDecl] = false; in ActOnOpenMPDeclareReductionDirectiveStart()
21353 if (OMPDeclareReductionDecl *D = PrevDecl->getPrevDeclInScope()) in ActOnOpenMPDeclareReductionDirectiveStart()
21356 PreviousRedeclTypes[PrevDecl->getType().getCanonicalType()] = in ActOnOpenMPDeclareReductionDirectiveStart()
21357 PrevDecl->getLocation(); in ActOnOpenMPDeclareReductionDirectiveStart()
21604 auto *PrevDecl = cast<OMPDeclareMapperDecl>(Filter.next()); in ActOnOpenMPDeclareMapperDirective() local
21606 auto I = UsedAsPrevious.find(PrevDecl); in ActOnOpenMPDeclareMapperDirective()
21608 UsedAsPrevious[PrevDecl] = false; in ActOnOpenMPDeclareMapperDirective()
21609 if (OMPDeclareMapperDecl *D = PrevDecl->getPrevDeclInScope()) in ActOnOpenMPDeclareMapperDirective()
[all …]
/src/contrib/llvm-project/clang/lib/AST/
H A DDeclObjC.cpp1545 ObjCInterfaceDecl *PrevDecl, SourceLocation ClassLoc, bool isInternal) { in Create() argument
1547 ObjCInterfaceDecl(C, DC, atLoc, Id, typeParamList, ClassLoc, PrevDecl, in Create()
1550 C.getObjCInterfaceType(Result, PrevDecl); in Create()
1566 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl, bool IsInternal) in ObjCInterfaceDecl() argument
1569 setPreviousDecl(PrevDecl); in ObjCInterfaceDecl()
1572 if (PrevDecl) in ObjCInterfaceDecl()
1573 Data = PrevDecl->Data; in ObjCInterfaceDecl()
1933 ObjCProtocolDecl *PrevDecl) in ObjCProtocolDecl() argument
1936 setPreviousDecl(PrevDecl); in ObjCProtocolDecl()
1937 if (PrevDecl) in ObjCProtocolDecl()
[all …]
H A DDeclTemplate.cpp926 ClassTemplateSpecializationDecl *PrevDecl) in ClassTemplateSpecializationDecl() argument
928 SpecializedTemplate->getIdentifier(), PrevDecl), in ClassTemplateSpecializationDecl()
947 ClassTemplateSpecializationDecl *PrevDecl) { in Create() argument
951 SpecializedTemplate, Args, PrevDecl); in Create()
962 Context.getTypeDeclType(Result, PrevDecl); in Create()
1135 ClassTemplatePartialSpecializationDecl *PrevDecl) in ClassTemplatePartialSpecializationDecl() argument
1138 SpecializedTemplate, Args, PrevDecl), in ClassTemplatePartialSpecializationDecl()
1150 ClassTemplatePartialSpecializationDecl *PrevDecl) { in Create() argument
1153 PrevDecl); in Create()
H A DDecl.cpp3595 FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) { in setPreviousDeclaration() argument
3596 redeclarable_base::setPreviousDecl(PrevDecl); in setPreviousDeclaration()
3600 = PrevDecl? PrevDecl->getDescribedFunctionTemplate() : nullptr; in setPreviousDeclaration()
3601 assert((!PrevDecl || PrevFunTmpl) && "Function/function template mismatch"); in setPreviousDeclaration()
3605 if (PrevDecl && PrevDecl->isInlined()) in setPreviousDeclaration()
4692 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, in TagDecl() argument
4698 setPreviousDecl(PrevDecl); in TagDecl()
4828 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, in EnumDecl() argument
4830 : TagDecl(Enum, TagTypeKind::Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4847 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()
3004 IdentifierInfo *Id, NamespaceDecl *PrevDecl, in NamespaceDecl() argument
3010 setPreviousDecl(PrevDecl); in NamespaceDecl()
3016 NamespaceDecl *PrevDecl, bool Nested) { in Create() argument
3018 NamespaceDecl(C, DC, Inline, StartLoc, IdLoc, Id, PrevDecl, Nested); in Create()
H A DDeclBase.cpp1523 Decl *PrevDecl = nullptr; in BuildDeclChain() local
1528 if (PrevDecl) in BuildDeclChain()
1529 PrevDecl->NextInContextAndBits.setPointer(D); in BuildDeclChain()
1533 PrevDecl = D; in BuildDeclChain()
1536 return std::make_pair(FirstNewDecl, PrevDecl); in BuildDeclChain()
H A DDeclPrinter.cpp1282 FunctionDecl *PrevDecl = D->getTemplatedDecl(); in VisitFunctionTemplateDecl() local
1284 if (PrevDecl->isDefined(Def) && Def != PrevDecl) in VisitFunctionTemplateDecl()
1288 if (!PrevDecl->isThisDeclarationADefinition()) in VisitFunctionTemplateDecl()
H A DASTImporter.cpp2935 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local
2956 PrevDecl = FoundEnum->getMostRecentDecl(); in VisitEnumDecl()
2991 Loc, Name.getAsIdentifierInfo(), PrevDecl, D->isScoped(), in VisitEnumDecl()
3058 RecordDecl *PrevDecl = nullptr; in VisitRecordDecl() local
3114 PrevDecl = FoundRecord->getMostRecentDecl(); in VisitRecordDecl()
3162 cast_or_null<CXXRecordDecl>(PrevDecl), DelayTypeCreation)) in VisitRecordDecl()
3170 cast_or_null<CXXRecordDecl>(PrevDecl))) in VisitRecordDecl()
3252 Name.getAsIdentifierInfo(), PrevDecl)) in VisitRecordDecl()
6165 ClassTemplateSpecializationDecl *PrevDecl = nullptr; in VisitClassTemplateSpecializationDecl() local
6177 PrevDecl = ClassTemplate->findPartialSpecialization(TemplateArgs, in VisitClassTemplateSpecializationDecl()
[all …]
H A DASTContext.cpp5016 } else if (CXXRecordDecl *PrevDecl = Decl->getPreviousDecl()) { in getInjectedClassNameType() local
5017 assert(PrevDecl->TypeForDecl && "previous declaration has no type"); in getInjectedClassNameType()
5018 Decl->TypeForDecl = PrevDecl->TypeForDecl; in getInjectedClassNameType()
5122 if (const RecordDecl *PrevDecl = Decl->getPreviousDecl()) in getRecordType() local
5123 if (PrevDecl->TypeForDecl) in getRecordType()
5124 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getRecordType()
5135 if (const EnumDecl *PrevDecl = Decl->getPreviousDecl()) in getEnumType() local
5136 if (PrevDecl->TypeForDecl) in getEnumType()
5137 return QualType(Decl->TypeForDecl = PrevDecl->TypeForDecl, 0); in getEnumType()
5991 ObjCInterfaceDecl *PrevDecl) const { in getObjCInterfaceType()
[all …]
/src/contrib/llvm-project/clang/include/clang/AST/
H A DDecl.h560 IdentifierInfo *Id, NamespaceDecl *PrevDecl, bool Nested);
574 IdentifierInfo *Id, NamespaceDecl *PrevDecl,
2636 void setPreviousDeclaration(FunctionDecl * PrevDecl);
3589 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl,
3877 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl,
3949 IdentifierInfo *Id, EnumDecl *PrevDecl,
4151 IdentifierInfo *Id, RecordDecl *PrevDecl);
4156 IdentifierInfo *Id, RecordDecl* PrevDecl = nullptr);
4974 void Redeclarable<decl_type>::setPreviousDecl(decl_type *PrevDecl) { in setPreviousDecl() argument
4980 if (PrevDecl) { in setPreviousDecl()
[all …]
H A DASTContext.h1635 const TypeDecl *PrevDecl = nullptr) const {
1639 if (PrevDecl) {
1640 assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
1641 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1642 return QualType(PrevDecl->TypeForDecl, 0);
1741 ObjCInterfaceDecl *PrevDecl = nullptr) const;
H A DRedeclarable.h237 void setPreviousDecl(decl_type *PrevDecl);
H A DDeclObjC.h1247 SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl,
1280 ObjCInterfaceDecl *PrevDecl,
2107 ObjCProtocolDecl *PrevDecl);
2146 ObjCProtocolDecl *PrevDecl);
H A DDeclTemplate.h1849 ClassTemplateSpecializationDecl *PrevDecl);
1862 ClassTemplateSpecializationDecl *PrevDecl);
2090 ClassTemplatePartialSpecializationDecl *PrevDecl);
2107 ClassTemplatePartialSpecializationDecl *PrevDecl);
H A DDeclCXX.h514 IdentifierInfo *Id, CXXRecordDecl *PrevDecl);
576 CXXRecordDecl *PrevDecl = nullptr,
/src/contrib/llvm-project/clang/include/clang/Sema/
H A DTemplate.h711 VarTemplateSpecializationDecl *PrevDecl = nullptr);
H A DSema.h3920 NamedDecl *PrevDecl, Declarator *D = nullptr);
4879 UsingShadowDecl *PrevDecl);
11187 void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl,
11534 NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK,