/external/clang/lib/Sema/ |
D | SemaTemplate.cpp | 463 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) { in DiagnoseTemplateParameterShadow() argument 464 assert(PrevDecl->isTemplateParameter() && "Not a template parameter"); in DiagnoseTemplateParameterShadow() 474 << cast<NamedDecl>(PrevDecl)->getDeclName(); in DiagnoseTemplateParameterShadow() 475 Diag(PrevDecl->getLocation(), diag::note_template_param_here); in DiagnoseTemplateParameterShadow() 547 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in maybeDiagnoseTemplateParameterShadow() local 549 if (PrevDecl && PrevDecl->isTemplateParameter()) in maybeDiagnoseTemplateParameterShadow() 550 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow() 929 NamedDecl *PrevDecl = nullptr; in CheckClassTemplate() local 931 PrevDecl = (*Previous.begin())->getUnderlyingDecl(); in CheckClassTemplate() 933 if (PrevDecl && PrevDecl->isTemplateParameter()) { in CheckClassTemplate() [all …]
|
D | SemaDeclObjC.cpp | 475 NamedDecl *PrevDecl = LookupSingleName(TUScope, SuperName, SuperLoc, in ActOnSuperClassOfClassInterface() local 478 if (!PrevDecl) { in ActOnSuperClassOfClassInterface() 488 PrevDecl = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>(); in ActOnSuperClassOfClassInterface() 492 if (declaresSameEntity(PrevDecl, IDecl)) { in ActOnSuperClassOfClassInterface() 498 dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); in ActOnSuperClassOfClassInterface() 507 if (PrevDecl && !SuperClassDecl) { in ActOnSuperClassOfClassInterface() 511 dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface() 534 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnSuperClassOfClassInterface() 538 if (!dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface() 912 NamedDecl *PrevDecl = LookupSingleName(TUScope, ClassName, ClassLoc, in ActOnStartClassInterface() local [all …]
|
D | SemaDecl.cpp | 4099 NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl(); in CheckAnonMemberRedeclaration() local 4100 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration() 4102 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration() 4107 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration() 5442 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument 5444 if (!PrevDecl) in isOutOfScopePreviousDeclaration() 5447 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration() 5462 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration() 10857 NamedDecl *PrevDecl = R.getFoundDecl(); in ActOnParamDeclarator() local 10858 if (PrevDecl->isTemplateParameter()) { in ActOnParamDeclarator() [all …]
|
D | SemaTemplateInstantiateDecl.cpp | 885 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local 891 PrevDecl = cast<EnumDecl>(Prev); in VisitEnumDecl() 896 PrevDecl, D->isScoped(), in VisitEnumDecl() 1061 CXXRecordDecl *PrevDecl = nullptr; in VisitClassTemplateDecl() local 1069 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl() 1099 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl() 1159 Pattern->getIdentifier(), PrevDecl, in VisitClassTemplateDecl() 1377 CXXRecordDecl *PrevDecl = nullptr; in VisitCXXRecordDecl() local 1379 PrevDecl = cast<CXXRecordDecl>(Owner); in VisitCXXRecordDecl() 1385 PrevDecl = cast<CXXRecordDecl>(Prev); in VisitCXXRecordDecl() [all …]
|
D | SemaAccess.cpp | 1105 NamedDecl *PrevDecl = nullptr; in diagnoseBadDirectAccess() local 1107 PrevDecl = VD->getPreviousDecl(); in diagnoseBadDirectAccess() 1109 PrevDecl = FD->getPreviousDecl(); in diagnoseBadDirectAccess() 1111 PrevDecl = TND->getPreviousDecl(); in diagnoseBadDirectAccess() 1115 PrevDecl = TD->getPreviousDecl(); in diagnoseBadDirectAccess() 1117 if (!PrevDecl) break; in diagnoseBadDirectAccess() 1118 D = PrevDecl; in diagnoseBadDirectAccess()
|
/external/llvm-project/clang/lib/Sema/ |
D | SemaTemplate.cpp | 882 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) { in DiagnoseTemplateParameterShadow() argument 883 assert(PrevDecl->isTemplateParameter() && "Not a template parameter"); in DiagnoseTemplateParameterShadow() 892 Diag(Loc, DiagId) << cast<NamedDecl>(PrevDecl)->getDeclName(); in DiagnoseTemplateParameterShadow() 893 Diag(PrevDecl->getLocation(), diag::note_template_param_here); in DiagnoseTemplateParameterShadow() 964 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in maybeDiagnoseTemplateParameterShadow() local 966 if (PrevDecl && PrevDecl->isTemplateParameter()) in maybeDiagnoseTemplateParameterShadow() 967 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow() 1770 NamedDecl *PrevDecl = nullptr; in CheckClassTemplate() local 1772 PrevDecl = (*Previous.begin())->getUnderlyingDecl(); in CheckClassTemplate() 1774 if (PrevDecl && PrevDecl->isTemplateParameter()) { in CheckClassTemplate() [all …]
|
D | SemaDeclObjC.cpp | 552 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 (!dyn_cast_or_null<TypedefNameDecl>(PrevDecl)) { in ActOnSuperClassOfClassInterface() 985 NamedDecl *PrevDecl = in ActOnStartClassInterface() local [all …]
|
D | SemaTemplateInstantiateDecl.cpp | 1268 EnumDecl *PrevDecl = nullptr; in VisitEnumDecl() local 1274 PrevDecl = cast<EnumDecl>(Prev); in VisitEnumDecl() 1279 D->getLocation(), D->getIdentifier(), PrevDecl, in VisitEnumDecl() 1440 CXXRecordDecl *PrevDecl = nullptr; in VisitClassTemplateDecl() local 1448 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl() 1479 PrevDecl = PrevClassTemplate->getTemplatedDecl(); in VisitClassTemplateDecl() 1538 Pattern->getLocation(), Pattern->getIdentifier(), PrevDecl, in VisitClassTemplateDecl() 1761 CXXRecordDecl *PrevDecl = nullptr; in VisitCXXRecordDecl() local 1763 PrevDecl = cast<CXXRecordDecl>(Owner); in VisitCXXRecordDecl() 1769 PrevDecl = cast<CXXRecordDecl>(Prev); in VisitCXXRecordDecl() [all …]
|
D | SemaDecl.cpp | 4822 NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl(); in CheckAnonMemberRedeclaration() local 4823 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration() 4825 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration() 4830 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration() 6235 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument 6237 if (!PrevDecl) in isOutOfScopePreviousDeclaration() 6240 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration() 6255 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration() 10018 bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) { in shouldLinkDependentDeclWithPrevious() argument 10039 auto *PrevVD = dyn_cast<ValueDecl>(PrevDecl); in shouldLinkDependentDeclWithPrevious() [all …]
|
D | SemaAccess.cpp | 1104 NamedDecl *PrevDecl = nullptr; in diagnoseBadDirectAccess() local 1106 PrevDecl = VD->getPreviousDecl(); in diagnoseBadDirectAccess() 1108 PrevDecl = FD->getPreviousDecl(); in diagnoseBadDirectAccess() 1110 PrevDecl = TND->getPreviousDecl(); in diagnoseBadDirectAccess() 1114 PrevDecl = TD->getPreviousDecl(); in diagnoseBadDirectAccess() 1116 if (!PrevDecl) break; in diagnoseBadDirectAccess() 1117 D = PrevDecl; in diagnoseBadDirectAccess()
|
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/ |
D | DefineInline.cpp | 342 auto PrevDecl = FD; in findTarget() local 343 while (PrevDecl->getPreviousDecl() != CanonDecl) { in findTarget() 344 PrevDecl = PrevDecl->getPreviousDecl(); in findTarget() 345 assert(PrevDecl && "Found specialization without template decl"); in findTarget() 347 return PrevDecl; in findTarget()
|
/external/clang/lib/AST/ |
D | DeclTemplate.cpp | 329 ClassTemplateDecl *PrevDecl) { in Create() argument 333 New->setPreviousDecl(PrevDecl); in Create() 710 ClassTemplateSpecializationDecl *PrevDecl) in ClassTemplateSpecializationDecl() argument 713 PrevDecl), in ClassTemplateSpecializationDecl() 733 ClassTemplateSpecializationDecl *PrevDecl) { in Create() argument 737 SpecializedTemplate, Args, PrevDecl); in Create() 740 Context.getTypeDeclType(Result, PrevDecl); in Create() 823 ClassTemplatePartialSpecializationDecl *PrevDecl) in ClassTemplatePartialSpecializationDecl() argument 828 Args, PrevDecl), in ClassTemplatePartialSpecializationDecl() 844 ClassTemplatePartialSpecializationDecl *PrevDecl) { in Create() argument [all …]
|
D | DeclObjC.cpp | 1389 ObjCInterfaceDecl *PrevDecl, in Create() argument 1393 ObjCInterfaceDecl(C, DC, atLoc, Id, typeParamList, ClassLoc, PrevDecl, in Create() 1396 C.getObjCInterfaceType(Result, PrevDecl); in Create() 1416 ObjCInterfaceDecl *PrevDecl, in ObjCInterfaceDecl() argument 1421 setPreviousDecl(PrevDecl); in ObjCInterfaceDecl() 1424 if (PrevDecl) in ObjCInterfaceDecl() 1425 Data = PrevDecl->Data; in ObjCInterfaceDecl() 1777 ObjCProtocolDecl *PrevDecl) in ObjCProtocolDecl() argument 1780 setPreviousDecl(PrevDecl); in ObjCProtocolDecl() 1781 if (PrevDecl) in ObjCProtocolDecl() [all …]
|
D | DeclCXX.cpp | 88 CXXRecordDecl *PrevDecl) in CXXRecordDecl() argument 89 : RecordDecl(K, TK, C, DC, StartLoc, IdLoc, Id, PrevDecl), in CXXRecordDecl() 90 DefinitionData(PrevDecl ? PrevDecl->DefinitionData in CXXRecordDecl() 97 CXXRecordDecl* PrevDecl, in Create() argument 100 IdLoc, Id, PrevDecl); in Create() 105 C.getTypeDeclType(R, PrevDecl); in Create() 2061 IdentifierInfo *Id, NamespaceDecl *PrevDecl) in NamespaceDecl() argument 2065 setPreviousDecl(PrevDecl); in NamespaceDecl() 2067 if (PrevDecl) in NamespaceDecl() 2068 AnonOrFirstNamespaceAndInline.setPointer(PrevDecl->getOriginalNamespace()); in NamespaceDecl() [all …]
|
D | Decl.cpp | 2662 FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) { in setPreviousDeclaration() argument 2663 redeclarable_base::setPreviousDecl(PrevDecl); in setPreviousDeclaration() 2667 = PrevDecl? PrevDecl->getDescribedFunctionTemplate() : nullptr; in setPreviousDeclaration() 2668 assert((!PrevDecl || PrevFunTmpl) && "Function/function template mismatch"); in setPreviousDeclaration() 2672 if (PrevDecl && PrevDecl->IsInline) in setPreviousDeclaration() 3629 EnumDecl *PrevDecl, bool IsScoped, in Create() argument 3631 auto *Enum = new (C, DC) EnumDecl(C, DC, StartLoc, IdLoc, Id, PrevDecl, in Create() 3634 C.getTypeDeclType(Enum, PrevDecl); in Create() 3718 RecordDecl *PrevDecl) in RecordDecl() argument 3719 : TagDecl(DK, TK, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in RecordDecl() [all …]
|
D | DeclBase.cpp | 1077 Decl *PrevDecl = nullptr; in BuildDeclChain() local 1083 if (PrevDecl) in BuildDeclChain() 1084 PrevDecl->NextInContextAndBits.setPointer(D); in BuildDeclChain() 1088 PrevDecl = D; in BuildDeclChain() 1091 return std::make_pair(FirstNewDecl, PrevDecl); in BuildDeclChain()
|
/external/llvm-project/clang-tools-extra/clang-tidy/misc/ |
D | NoRecursionCheck.cpp | 242 Decl *PrevDecl = PrevNode.Callee->getDecl(); in handleSCC() local 247 << CurFrame << cast<NamedDecl>(PrevDecl) << cast<NamedDecl>(CurrDecl); in handleSCC()
|
/external/llvm-project/clang/lib/AST/ |
D | DeclObjC.cpp | 1497 ObjCInterfaceDecl *PrevDecl, in Create() argument 1501 ObjCInterfaceDecl(C, DC, atLoc, Id, typeParamList, ClassLoc, PrevDecl, in Create() 1504 C.getObjCInterfaceType(Result, PrevDecl); in Create() 1521 ObjCInterfaceDecl *PrevDecl, in ObjCInterfaceDecl() argument 1525 setPreviousDecl(PrevDecl); in ObjCInterfaceDecl() 1528 if (PrevDecl) in ObjCInterfaceDecl() 1529 Data = PrevDecl->Data; in ObjCInterfaceDecl() 1884 ObjCProtocolDecl *PrevDecl) in ObjCProtocolDecl() argument 1887 setPreviousDecl(PrevDecl); in ObjCProtocolDecl() 1888 if (PrevDecl) in ObjCProtocolDecl() [all …]
|
D | DeclTemplate.cpp | 869 ClassTemplateSpecializationDecl *PrevDecl) in ClassTemplateSpecializationDecl() argument 871 SpecializedTemplate->getIdentifier(), PrevDecl), in ClassTemplateSpecializationDecl() 890 ClassTemplateSpecializationDecl *PrevDecl) { in Create() argument 894 SpecializedTemplate, Args, PrevDecl); in Create() 897 Context.getTypeDeclType(Result, PrevDecl); in Create() 1009 ClassTemplatePartialSpecializationDecl *PrevDecl) in ClassTemplatePartialSpecializationDecl() argument 1013 SpecializedTemplate, Args, PrevDecl), in ClassTemplatePartialSpecializationDecl() 1028 ClassTemplatePartialSpecializationDecl *PrevDecl) { in Create() argument 1035 ASTArgInfos, PrevDecl); in Create()
|
D | Decl.cpp | 3224 FunctionDecl::setPreviousDeclaration(FunctionDecl *PrevDecl) { in setPreviousDeclaration() argument 3225 redeclarable_base::setPreviousDecl(PrevDecl); in setPreviousDeclaration() 3229 = PrevDecl? PrevDecl->getDescribedFunctionTemplate() : nullptr; in setPreviousDeclaration() 3230 assert((!PrevDecl || PrevFunTmpl) && "Function/function template mismatch"); in setPreviousDeclaration() 3234 if (PrevDecl && PrevDecl->isInlined()) in setPreviousDeclaration() 4216 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, in TagDecl() argument 4222 setPreviousDecl(PrevDecl); in TagDecl() 4334 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, in EnumDecl() argument 4336 : TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl() 4353 EnumDecl *PrevDecl, bool IsScoped, in Create() argument [all …]
|
D | DeclCXX.cpp | 124 CXXRecordDecl *PrevDecl) in CXXRecordDecl() argument 125 : RecordDecl(K, TK, C, DC, StartLoc, IdLoc, Id, PrevDecl), in CXXRecordDecl() 126 DefinitionData(PrevDecl ? PrevDecl->DefinitionData in CXXRecordDecl() 132 CXXRecordDecl *PrevDecl, in Create() argument 135 PrevDecl); in Create() 140 C.getTypeDeclType(R, PrevDecl); in Create() 2847 IdentifierInfo *Id, NamespaceDecl *PrevDecl) in NamespaceDecl() argument 2851 setPreviousDecl(PrevDecl); in NamespaceDecl() 2853 if (PrevDecl) in NamespaceDecl() 2854 AnonOrFirstNamespaceAndInline.setPointer(PrevDecl->getOriginalNamespace()); in NamespaceDecl() [all …]
|
D | DeclBase.cpp | 1311 Decl *PrevDecl = nullptr; in BuildDeclChain() local 1316 if (PrevDecl) in BuildDeclChain() 1317 PrevDecl->NextInContextAndBits.setPointer(D); in BuildDeclChain() 1321 PrevDecl = D; in BuildDeclChain() 1324 return std::make_pair(FirstNewDecl, PrevDecl); in BuildDeclChain()
|
/external/clang/include/clang/AST/ |
D | Decl.h | 488 IdentifierInfo *Id, NamespaceDecl *PrevDecl); 499 NamespaceDecl *PrevDecl); 1979 void setPreviousDeclaration(FunctionDecl * PrevDecl); 2808 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, in TagDecl() argument 2817 setPreviousDecl(PrevDecl); in TagDecl() 3044 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, in EnumDecl() argument 3046 : TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc), in EnumDecl() 3088 IdentifierInfo *Id, EnumDecl *PrevDecl, 3282 IdentifierInfo *Id, RecordDecl *PrevDecl); 3287 IdentifierInfo *Id, RecordDecl* PrevDecl = nullptr); [all …]
|
D | ASTContext.h | 1200 const TypeDecl *PrevDecl = nullptr) const { 1204 if (PrevDecl) { 1205 assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl"); 1206 Decl->TypeForDecl = PrevDecl->TypeForDecl; 1207 return QualType(PrevDecl->TypeForDecl, 0); 1278 ObjCInterfaceDecl *PrevDecl = nullptr) const;
|
/external/llvm-project/clang/include/clang/AST/ |
D | Decl.h | 530 IdentifierInfo *Id, NamespaceDecl *PrevDecl); 545 NamespaceDecl *PrevDecl); 2422 void setPreviousDeclaration(FunctionDecl * PrevDecl); 3303 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, 3568 SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl, 3640 IdentifierInfo *Id, EnumDecl *PrevDecl, 3831 IdentifierInfo *Id, RecordDecl *PrevDecl); 3836 IdentifierInfo *Id, RecordDecl* PrevDecl = nullptr); 4539 void Redeclarable<decl_type>::setPreviousDecl(decl_type *PrevDecl) { in setPreviousDecl() argument 4545 if (PrevDecl) { in setPreviousDecl() [all …]
|