Home
last modified time | relevance | path

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

12345678910

/external/llvm-project/clang/lib/Sema/
DSemaCUDA.cpp100 static bool hasAttr(const FunctionDecl *D, bool IgnoreImplicitAttr) { in hasAttr() function
114 if (D->hasAttr<CUDAInvalidTargetAttr>()) in IdentifyCUDATarget()
117 if (D->hasAttr<CUDAGlobalAttr>()) in IdentifyCUDATarget()
120 if (hasAttr<CUDADeviceAttr>(D, IgnoreImplicitHDAttr)) { in IdentifyCUDATarget()
121 if (hasAttr<CUDAHostAttr>(D, IgnoreImplicitHDAttr)) in IdentifyCUDATarget()
124 } else if (hasAttr<CUDAHostAttr>(D, IgnoreImplicitHDAttr)) { in IdentifyCUDATarget()
290 bool HasH = MemberDecl->hasAttr<CUDAHostAttr>(); in inferCUDATargetForImplicitSpecialMember()
291 bool HasD = MemberDecl->hasAttr<CUDADeviceAttr>(); in inferCUDATargetForImplicitSpecialMember()
518 if (VD->hasAttr<CUDADeviceAttr>() || VD->hasAttr<CUDAConstantAttr>() || in checkAllowedCUDAInitializer()
519 VD->hasAttr<CUDASharedAttr>()) { in checkAllowedCUDAInitializer()
[all …]
DSemaAttr.cpp91 if (Record->hasAttr<OwnerAttr>() || Record->hasAttr<PointerAttr>()) in addGslOwnerPointerAttributeIfNotExisting()
190 if (Record->hasAttr<OwnerAttr>() || Record->hasAttr<PointerAttr>()) in inferGslOwnerPointerAttribute()
616 if (D->hasAttr<CFAuditedTransferAttr>() || in AddCFAuditedAttribute()
617 D->hasAttr<CFUnknownTransferAttr>()) in AddCFAuditedAttribute()
893 if (FD->hasAttr<MinSizeAttr>() || FD->hasAttr<AlwaysInlineAttr>()) in AddOptnoneAttributeIfNoConflicts()
898 if (!FD->hasAttr<OptimizeNoneAttr>()) in AddOptnoneAttributeIfNoConflicts()
900 if (!FD->hasAttr<NoInlineAttr>()) in AddOptnoneAttributeIfNoConflicts()
DSemaDeclObjC.cpp116 if (OldD->hasAttr<NoEscapeAttr>() && !NewD->hasAttr<NoEscapeAttr>()) { in diagnoseNoescape()
184 if ((NewMethod->hasAttr<NSReturnsRetainedAttr>() != in CheckObjCMethodOverride()
185 Overridden->hasAttr<NSReturnsRetainedAttr>())) { in CheckObjCMethodOverride()
193 if ((NewMethod->hasAttr<NSReturnsNotRetainedAttr>() != in CheckObjCMethodOverride()
194 Overridden->hasAttr<NSReturnsNotRetainedAttr>())) { in CheckObjCMethodOverride()
210 if (newDecl->hasAttr<NSConsumedAttr>() != in CheckObjCMethodOverride()
211 oldDecl->hasAttr<NSConsumedAttr>()) { in CheckObjCMethodOverride()
263 if (method->hasAttr<NSReturnsRetainedAttr>()) in CheckARCMethodDecl()
271 if (method->hasAttr<NSReturnsRetainedAttr>() || in CheckARCMethodDecl()
272 method->hasAttr<NSReturnsNotRetainedAttr>() || in CheckARCMethodDecl()
[all …]
/external/llvm-project/clang/include/clang/AST/
DGlobalDecl.h62 assert(!D->hasAttr<CUDAGlobalAttr>() && "Use other ctor with GPU kernels!"); in Init()
72 if (!D->hasAttr<CUDAGlobalAttr>()) { in MultiVersionIndex()
80 assert(D->hasAttr<CUDAGlobalAttr>() && "Decl is not a GPU kernel!"); in GlobalDecl()
124 !cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getMultiVersionIndex()
133 cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getKernelReferenceKind()
180 !cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getWithMultiVersionIndex()
191 cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getWithKernelReferenceKind()
/external/llvm-project/clang/unittests/Sema/
DGslOwnerPointerInference.cpp25 hasName("C"), hasAttr(clang::attr::Owner)))); in TEST()
37 hasName("C"), hasAttr(clang::attr::Owner)))); in TEST()
52 hasName("C"), hasAttr(clang::attr::Owner)))); in TEST()
/external/clang/lib/Sema/
DSemaCUDA.cpp45 if (D->hasAttr<CUDAInvalidTargetAttr>()) in IdentifyCUDATarget()
48 if (D->hasAttr<CUDAGlobalAttr>()) in IdentifyCUDATarget()
51 if (D->hasAttr<CUDADeviceAttr>()) { in IdentifyCUDATarget()
52 if (D->hasAttr<CUDAHostAttr>()) in IdentifyCUDATarget()
55 } else if (D->hasAttr<CUDAHostAttr>()) { in IdentifyCUDATarget()
448 NewD->isVariadic() || NewD->hasAttr<CUDAHostAttr>() || in maybeAddCUDAHostDeviceAttrs()
449 NewD->hasAttr<CUDADeviceAttr>() || NewD->hasAttr<CUDAGlobalAttr>()) in maybeAddCUDAHostDeviceAttrs()
458 return OldD && OldD->hasAttr<CUDADeviceAttr>() && in maybeAddCUDAHostDeviceAttrs()
459 !OldD->hasAttr<CUDAHostAttr>() && in maybeAddCUDAHostDeviceAttrs()
DSemaAttr.cpp363 if (D->hasAttr<CFAuditedTransferAttr>() || in AddCFAuditedAttribute()
364 D->hasAttr<CFUnknownTransferAttr>()) in AddCFAuditedAttribute()
387 if (FD->hasAttr<MinSizeAttr>() || FD->hasAttr<AlwaysInlineAttr>()) in AddOptnoneAttributeIfNoConflicts()
392 if (!FD->hasAttr<OptimizeNoneAttr>()) in AddOptnoneAttributeIfNoConflicts()
394 if (!FD->hasAttr<NoInlineAttr>()) in AddOptnoneAttributeIfNoConflicts()
/external/clang/lib/CodeGen/
DCodeGenModule.cpp286 bool IsIFunc = D->hasAttr<IFuncAttr>(); in checkAliases()
791 if (FD->hasAttr<DLLImportAttr>()) in setFunctionDLLStorageClass()
793 else if (FD->hasAttr<DLLExportAttr>()) in setFunctionDLLStorageClass()
874 if (D->hasAttr<NakedAttr>()) { in SetLLVMFunctionAttributesForDefinition()
878 } else if (D->hasAttr<NoDuplicateAttr>()) { in SetLLVMFunctionAttributesForDefinition()
880 } else if (D->hasAttr<NoInlineAttr>()) { in SetLLVMFunctionAttributesForDefinition()
882 } else if (D->hasAttr<AlwaysInlineAttr>() && in SetLLVMFunctionAttributesForDefinition()
889 if (D->hasAttr<ColdAttr>()) { in SetLLVMFunctionAttributesForDefinition()
890 if (!D->hasAttr<OptimizeNoneAttr>()) in SetLLVMFunctionAttributesForDefinition()
895 if (D->hasAttr<MinSizeAttr>()) in SetLLVMFunctionAttributesForDefinition()
[all …]
DCGVTables.cpp590 ? MD->hasAttr<CUDADeviceAttr>() in CreateVTableInitializer()
591 : (MD->hasAttr<CUDAHostAttr>() || in CreateVTableInitializer()
592 !MD->hasAttr<CUDADeviceAttr>()); in CreateVTableInitializer()
734 if (keyFunction && !RD->hasAttr<DLLImportAttr>()) { in getVTableLinkage()
781 if (RD->hasAttr<DLLExportAttr>()) { in getVTableLinkage()
784 } else if (RD->hasAttr<DLLImportAttr>()) { in getVTableLinkage()
911 if (RD->hasAttr<LTOVisibilityPublicAttr>() || RD->hasAttr<UuidAttr>()) in HasHiddenLTOVisibility()
915 if (RD->hasAttr<DLLExportAttr>() || RD->hasAttr<DLLImportAttr>()) in HasHiddenLTOVisibility()
DCGDeclCXX.cpp173 if (getLangOpts().OpenMP && D.hasAttr<OMPThreadPrivateDeclAttr>()) in EmitCXXGlobalVarDeclInit()
322 (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() || in EmitCXXGlobalVarDeclInitFunc()
323 D->hasAttr<CUDASharedAttr>())) in EmitCXXGlobalVarDeclInitFunc()
379 } else if (D->hasAttr<SelectAnyAttr>()) { in EmitCXXGlobalVarDeclInitFunc()
500 if (D->hasAttr<NoDebugAttr>()) in GenerateCXXGlobalVarDeclInitFunc()
DCGDecl.cpp200 if (D.hasAttr<AsmLabelAttr>()) in getOrCreateStaticVarDecl()
232 if (D.hasAttr<DLLImportAttr>()) in getOrCreateStaticVarDecl()
234 else if (D.hasAttr<DLLExportAttr>()) in getOrCreateStaticVarDecl()
381 D.hasAttr<CUDASharedAttr>(); in EmitStaticVarDecl()
388 if (D.hasAttr<AnnotateAttr>()) in EmitStaticVarDecl()
394 if (D.hasAttr<UsedAttr>()) in EmitStaticVarDecl()
549 (var.hasAttr<ObjCPreciseLifetimeAttr>() in EmitAutoVarWithLifetime()
958 bool isByRef = D.hasAttr<BlocksAttr>(); in EmitAutoVarAlloca()
1107 if (D.hasAttr<AnnotateAttr>()) in EmitAutoVarAlloca()
1364 if (!var->hasAttr<ObjCPreciseLifetimeAttr>()) in emitAutoVarTypeCleanup()
[all …]
/external/llvm-project/clang/lib/CodeGen/
DCodeGenModule.cpp315 bool IsIFunc = D->hasAttr<IFuncAttr>(); in checkAliases()
1008 if (D->hasAttr<DLLImportAttr>()) in setDLLImportDLLExport()
1010 else if (D->hasAttr<DLLExportAttr>() && !GV->isDeclarationForLinker()) in setDLLImportDLLExport()
1137 } else if (FD && FD->hasAttr<CUDAGlobalAttr>() && in getMangledNameImpl()
1236 assert(!isa<FunctionDecl>(ND) || !ND->hasAttr<CUDAGlobalAttr>() || in getMangledName()
1649 if (!D || !D->hasAttr<NoStackProtectorAttr>()) { in SetLLVMFunctionAttributesForDefinition()
1675 ShouldAddOptNone &= !D->hasAttr<MinSizeAttr>(); in SetLLVMFunctionAttributesForDefinition()
1676 ShouldAddOptNone &= !D->hasAttr<AlwaysInlineAttr>(); in SetLLVMFunctionAttributesForDefinition()
1679 if ((ShouldAddOptNone || D->hasAttr<OptimizeNoneAttr>()) && in SetLLVMFunctionAttributesForDefinition()
1688 if (D->hasAttr<NakedAttr>()) in SetLLVMFunctionAttributesForDefinition()
[all …]
DCGCall.cpp203 if (D->hasAttr<StdCallAttr>()) in getCallingConventionForDecl()
206 if (D->hasAttr<FastCallAttr>()) in getCallingConventionForDecl()
209 if (D->hasAttr<RegCallAttr>()) in getCallingConventionForDecl()
212 if (D->hasAttr<ThisCallAttr>()) in getCallingConventionForDecl()
215 if (D->hasAttr<VectorCallAttr>()) in getCallingConventionForDecl()
218 if (D->hasAttr<PascalAttr>()) in getCallingConventionForDecl()
224 if (D->hasAttr<AArch64VectorPcsAttr>()) in getCallingConventionForDecl()
227 if (D->hasAttr<IntelOclBiccAttr>()) in getCallingConventionForDecl()
230 if (D->hasAttr<MSABIAttr>()) in getCallingConventionForDecl()
233 if (D->hasAttr<SysVABIAttr>()) in getCallingConventionForDecl()
[all …]
/external/llvm-project/clang/include/clang/Sema/
DSemaInternal.h47 bool isDeviceSideDecl = D->hasAttr<CUDADeviceAttr>() || in DeclAttrsMatchCUDAMode()
48 D->hasAttr<CUDASharedAttr>() || in DeclAttrsMatchCUDAMode()
49 D->hasAttr<CUDAGlobalAttr>(); in DeclAttrsMatchCUDAMode()
55 assert(!(D->hasAttr<DLLImportAttr>() && D->hasAttr<DLLExportAttr>()) && in getDLLAttr()
/external/clang/include/clang/Sema/
DSemaInternal.h57 bool isDeviceSideDecl = D->hasAttr<CUDADeviceAttr>() || in DeclAttrsMatchCUDAMode()
58 D->hasAttr<CUDASharedAttr>() || in DeclAttrsMatchCUDAMode()
59 D->hasAttr<CUDAGlobalAttr>(); in DeclAttrsMatchCUDAMode()
94 assert(!(D->hasAttr<DLLImportAttr>() && D->hasAttr<DLLExportAttr>()) && in getDLLAttr()
/external/clang/lib/StaticAnalyzer/Checkers/
DObjCUnusedIVarsChecker.cpp122 Ivar->hasAttr<UnusedAttr>() || Ivar->hasAttr<IBOutletAttr>() || in checkObjCUnusedIvar()
123 Ivar->hasAttr<IBOutletCollectionAttr>() || in checkObjCUnusedIvar()
DVirtualCallChecker.cpp156 if (base->getBestDynamicClassType()->hasAttr<FinalAttr>()) in VisitCXXMemberCallExpr()
163 if (MD && MD->isVirtual() && !callIsNonVirtual && !MD->hasAttr<FinalAttr>() && in VisitCXXMemberCallExpr()
164 !MD->getParent()->hasAttr<FinalAttr>()) in VisitCXXMemberCallExpr()
DNoReturnFunctionChecker.cpp46 BuildSinks = FD->hasAttr<AnalyzerNoReturnAttr>() || FD->isNoReturn(); in checkPostCall()
93 if (MD->hasAttr<AnalyzerNoReturnAttr>()) { in checkPostObjCMessage()
DDeadStoresChecker.cpp220 !(VD->hasAttr<UnusedAttr>() || VD->hasAttr<BlocksAttr>() || in CheckVarDecl()
221 VD->hasAttr<ObjCPreciseLifetimeAttr>())) { in CheckVarDecl()
348 !V->hasAttr<UnusedAttr>() && in observeStmt()
349 !V->hasAttr<ObjCPreciseLifetimeAttr>()) { in observeStmt()
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DObjCUnusedIVarsChecker.cpp121 Ivar->hasAttr<UnusedAttr>() || Ivar->hasAttr<IBOutletAttr>() || in checkObjCUnusedIvar()
122 Ivar->hasAttr<IBOutletCollectionAttr>() || in checkObjCUnusedIvar()
DNoReturnFunctionChecker.cpp45 BuildSinks = FD->hasAttr<AnalyzerNoReturnAttr>() || FD->isNoReturn(); in checkPostCall()
92 if (MD->hasAttr<AnalyzerNoReturnAttr>()) { in checkPostObjCMessage()
DVirtualCallChecker.cpp74 if (Base->getBestDynamicClassType()->hasAttr<FinalAttr>()) in REGISTER_MAP_WITH_PROGRAMSTATE()
81 if (MD && MD->isVirtual() && !CallIsNonVirtual && !MD->hasAttr<FinalAttr>() && in REGISTER_MAP_WITH_PROGRAMSTATE()
82 !MD->getParent()->hasAttr<FinalAttr>()) in REGISTER_MAP_WITH_PROGRAMSTATE()
DDeadStoresChecker.cpp279 !(VD->hasAttr<UnusedAttr>() || VD->hasAttr<BlocksAttr>() || in CheckVarDecl()
280 VD->hasAttr<ObjCPreciseLifetimeAttr>())) { in CheckVarDecl()
406 !V->hasAttr<UnusedAttr>() && in observeStmt()
407 !V->hasAttr<ObjCPreciseLifetimeAttr>()) { in observeStmt()
/external/llvm-project/clang/lib/AST/
DDecl.cpp377 return !fn->hasAttr<VisibilityAttr>(); in shouldConsiderTemplateVisibility()
413 return (computation.isTypeVisibility() && D->hasAttr<TypeVisibilityAttr>()) || in hasDirectVisibilityAttribute()
414 D->hasAttr<VisibilityAttr>(); in hasDirectVisibilityAttribute()
556 FD->hasBody(Def) && Def->isInlined() && !Def->hasAttr<GNUInlineAttr>(); in useInlineVisibilityHidden()
1330 if (D->hasAttr<InternalLinkageAttr>()) in computeLVForDecl()
1446 if (D->hasAttr<InternalLinkageAttr>()) in getLVForDecl()
2014 if (!hasAttr<ThreadAttr>() && in getTLSKind()
2017 hasAttr<OMPThreadPrivateDeclAttr>())) in getTLSKind()
2021 hasAttr<OMPThreadPrivateDeclAttr>()) in getTLSKind()
2508 return hasAttr<BlocksAttr>() && NonParmVarDeclBits.EscapingByref; in isEscapingByref()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DUseNodiscardCheck.cpp97 returns(hasDeclaration(decl(hasAttr(clang::attr::WarnUnusedResult)))), in registerMatchers()
101 hasAttr(clang::attr::WarnUnusedResult), in registerMatchers()

12345678910