reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
43 LangOpts.Sanitize.has(SanitizerKind::Leak)) 47 FEATURE(memtag_sanitizer, LangOpts.Sanitize.has(SanitizerKind::MemTag)) 90 FEATURE(thread_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Thread)) 91 FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow)) 220 FEATURE(safe_stack, LangOpts.Sanitize.has(SanitizerKind::SafeStack)) 222 LangOpts.Sanitize.has(SanitizerKind::ShadowCallStack))tools/clang/include/clang/Driver/SanitizerArgs.h
63 bool needsAsanRt() const { return Sanitizers.has(SanitizerKind::Address); } 65 return Sanitizers.has(SanitizerKind::HWAddress); 67 bool needsTsanRt() const { return Sanitizers.has(SanitizerKind::Thread); } 68 bool needsMsanRt() const { return Sanitizers.has(SanitizerKind::Memory); } 69 bool needsFuzzer() const { return Sanitizers.has(SanitizerKind::Fuzzer); } 71 return Sanitizers.has(SanitizerKind::Leak) && 72 !Sanitizers.has(SanitizerKind::Address) && 73 !Sanitizers.has(SanitizerKind::HWAddress); 77 bool needsDfsanRt() const { return Sanitizers.has(SanitizerKind::DataFlow); } 82 bool needsScudoRt() const { return Sanitizers.has(SanitizerKind::Scudo); }tools/clang/lib/Basic/Targets/OSTargets.cpp
31 if (Opts.Sanitize.has(SanitizerKind::Address))
tools/clang/lib/CodeGen/BackendUtil.cpp257 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Address); 281 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::HWAddress); 299 bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory); 541 Options.Atomic = LangOpts.Sanitize.has(SanitizerKind::Thread); 615 if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds)) { 631 if (LangOpts.Sanitize.has(SanitizerKind::Address)) { 638 if (LangOpts.Sanitize.has(SanitizerKind::KernelAddress)) { 645 if (LangOpts.Sanitize.has(SanitizerKind::HWAddress)) { 652 if (LangOpts.Sanitize.has(SanitizerKind::KernelHWAddress)) { 659 if (LangOpts.Sanitize.has(SanitizerKind::Memory)) { 666 if (LangOpts.Sanitize.has(SanitizerKind::KernelMemory)) { 673 if (LangOpts.Sanitize.has(SanitizerKind::Thread)) { 680 if (LangOpts.Sanitize.has(SanitizerKind::DataFlow)) { 959 bool Recover = CodeGenOpts.SanitizeRecover.has(Mask); 968 if (LangOpts.Sanitize.has(SanitizerKind::Address)) { 972 if (LangOpts.Sanitize.has(SanitizerKind::KernelAddress)) { 976 if (LangOpts.Sanitize.has(SanitizerKind::Memory)) { 981 if (LangOpts.Sanitize.has(SanitizerKind::KernelMemory)) { 986 if (LangOpts.Sanitize.has(SanitizerKind::Thread)) { 1141 if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds)) 1162 if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds)) 1167 if (LangOpts.Sanitize.has(SanitizerKind::Memory)) { 1176 if (LangOpts.Sanitize.has(SanitizerKind::Thread)) { 1184 if (LangOpts.Sanitize.has(SanitizerKind::Address)) { 1189 bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address); 1240 if (LangOpts.Sanitize.has(SanitizerKind::HWAddress)) { 1241 bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::HWAddress); 1245 if (LangOpts.Sanitize.has(SanitizerKind::KernelHWAddress)) {tools/clang/lib/CodeGen/CGBuiltin.cpp
1098 if (!SanOpts.has(SanitizerKind::Builtin) || !getTarget().isCLZForZeroUndef())
tools/clang/lib/CodeGen/CGCall.cpp2401 if (AVAttr && !SanOpts.has(SanitizerKind::Alignment)) { 2975 if (SanOpts.has(SanitizerKind::ReturnsNonnullAttribute)) 3354 if (!AC.getDecl() || !(SanOpts.has(SanitizerKind::NonnullAttribute) || 3355 SanOpts.has(SanitizerKind::NullabilityArg))) 3364 if (SanOpts.has(SanitizerKind::NonnullAttribute)) 3368 if (SanOpts.has(SanitizerKind::NullabilityArg) && !NNAttr && PVD) { 4417 if (SanOpts.has(SanitizerKind::Unreachable)) {tools/clang/lib/CodeGen/CGClass.cpp
1813 SanOpts.has(SanitizerKind::Memory) && ClassDecl->getNumVBases() && 1839 SanOpts.has(SanitizerKind::Memory) && !ClassDecl->getNumVBases() && 1863 SanOpts.has(SanitizerKind::Memory)) 2641 if (SanOpts.has(SanitizerKind::CFIVCall)) 2662 if (!SanOpts.has(SanitizerKind::CFICastStrict)) 2685 if (!SanOpts.has(SanitizerKind::CFICastStrict)) 2774 if (CGM.getCodeGenOpts().SanitizeTrap.has(M)) { 2796 if (!SanOpts.has(SanitizerKind::CFIVCall) || 2797 !CGM.getCodeGenOpts().SanitizeTrap.has(SanitizerKind::CFIVCall)) 2823 if (SanOpts.has(SanitizerKind::CFIVCall) &&tools/clang/lib/CodeGen/CGDecl.cpp
721 if (!SanOpts.has(SanitizerKind::NullabilityAssign))
tools/clang/lib/CodeGen/CGDeclCXX.cpp353 if (getLangOpts().Sanitize.has(SanitizerKind::Address) && 357 if (getLangOpts().Sanitize.has(SanitizerKind::KernelAddress) && 361 if (getLangOpts().Sanitize.has(SanitizerKind::HWAddress) && 365 if (getLangOpts().Sanitize.has(SanitizerKind::KernelHWAddress) && 369 if (getLangOpts().Sanitize.has(SanitizerKind::MemTag) && 373 if (getLangOpts().Sanitize.has(SanitizerKind::Thread) && 377 if (getLangOpts().Sanitize.has(SanitizerKind::Memory) && 381 if (getLangOpts().Sanitize.has(SanitizerKind::KernelMemory) && 385 if (getLangOpts().Sanitize.has(SanitizerKind::SafeStack) && 389 if (getLangOpts().Sanitize.has(SanitizerKind::ShadowCallStack) &&tools/clang/lib/CodeGen/CGExpr.cpp
524 !SanOpts.has(SanitizerKind::HWAddress) && 525 !SanOpts.has(SanitizerKind::Memory) && 647 return SanOpts.has(SanitizerKind::Null) | 648 SanOpts.has(SanitizerKind::Alignment) | 649 SanOpts.has(SanitizerKind::ObjectSize) | 650 SanOpts.has(SanitizerKind::Vptr); 685 SkippedChecks.has(SanitizerKind::Null) || PtrToAlloca; 687 if ((SanOpts.has(SanitizerKind::Null) || AllowNullPointers) && 711 if (SanOpts.has(SanitizerKind::ObjectSize) && 712 !SkippedChecks.has(SanitizerKind::ObjectSize) && 741 if (SanOpts.has(SanitizerKind::Alignment) && 742 !SkippedChecks.has(SanitizerKind::Alignment)) { 780 if (SanOpts.has(SanitizerKind::Vptr) && 781 !SkippedChecks.has(SanitizerKind::Vptr) && isVptrCheckRequired(TCK, Ty)) { 962 assert(SanOpts.has(SanitizerKind::ArrayBounds) && 1084 if (SanOpts.has(SanitizerKind::CFIUnrelatedCast) && 1209 if (SanOpts.has(SanitizerKind::ArrayBounds) && isa<ArraySubscriptExpr>(E)) 1589 bool HasBoolCheck = SanOpts.has(SanitizerKind::Bool); 1590 bool HasEnumCheck = SanOpts.has(SanitizerKind::Enum); 3022 CGM.getCodeGenOpts().SanitizeTrap.has(Checked[i].second) 3024 : CGM.getCodeGenOpts().SanitizeRecover.has(Checked[i].second) 3043 assert(SanOpts.has(Checked[0].second)); 3048 assert(SanOpts.has(Checked[i].second)); 3129 bool WithDiag = !CGM.getCodeGenOpts().SanitizeTrap.has(Kind); 3258 if (CGM.getLangOpts().Sanitize.has(Mask)) 3272 if (SanOpts.has(SanitizerKind::Unreachable)) { 3467 if (SanOpts.has(SanitizerKind::ArrayBounds)) 4403 if (SanOpts.has(SanitizerKind::CFIDerivedCast)) 4420 if (SanOpts.has(SanitizerKind::CFIUnrelatedCast)) 4789 if (getLangOpts().CPlusPlus && SanOpts.has(SanitizerKind::Function) && 4842 if (SanOpts.has(SanitizerKind::CFIICall) &&tools/clang/lib/CodeGen/CGExprCXX.cpp
379 if (SanOpts.has(SanitizerKind::CFINVCall) &&
tools/clang/lib/CodeGen/CGExprScalar.cpp280 if (isa<ParmVarDecl>(VD) && !CGF.SanOpts.has(SanitizerKind::Alignment)) 359 SanOpts.has(SanitizerKind::ImplicitIntegerSignChange)) {} 718 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) 729 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow) && 1003 if (CGF.SanOpts.has(SanitizerKind::ImplicitIntegerSignChange) && 1016 if (!CGF.SanOpts.has(Check.second.second)) 1090 if (!CGF.SanOpts.has(SanitizerKind::ImplicitIntegerSignChange)) 1122 if (CGF.SanOpts.has(SanitizerKind::ImplicitSignedIntegerTruncation) && 1147 if (CGF.SanOpts.has(SanitizerKind::ImplicitSignedIntegerTruncation) && 1340 if (CGF.SanOpts.has(SanitizerKind::FloatCastOverflow) && 1751 if (CGF.SanOpts.has(SanitizerKind::ArrayBounds)) 2003 if (CGF.SanOpts.has(SanitizerKind::CFIUnrelatedCast)) { 2077 if (CGF.SanOpts.has(SanitizerKind::CFIDerivedCast)) 2338 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) 2381 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow)) && 2427 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow)) { 2849 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow)) && 2966 if (CGF.SanOpts.has(SanitizerKind::IntegerDivideByZero)) { 2972 if (CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow) && 2996 if ((CGF.SanOpts.has(SanitizerKind::IntegerDivideByZero) || 2997 CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) && 3002 } else if (CGF.SanOpts.has(SanitizerKind::FloatDivideByZero) && 3037 if ((CGF.SanOpts.has(SanitizerKind::IntegerDivideByZero) || 3038 CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) && 3098 if (!isSigned || CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) { 3215 if (CGF.SanOpts.has(SanitizerKind::ArrayBounds)) 3350 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) 3361 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow) && 3495 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) 3506 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow) && 3597 bool SanitizeBase = CGF.SanOpts.has(SanitizerKind::ShiftBase) && 3601 bool SanitizeExponent = CGF.SanOpts.has(SanitizerKind::ShiftExponent); 3669 else if (CGF.SanOpts.has(SanitizerKind::ShiftExponent) && 4658 if (!SanOpts.has(SanitizerKind::PointerOverflow))tools/clang/lib/CodeGen/CodeGenFunction.cpp
52 LangOpts.Sanitize.has(SanitizerKind::HWAddress) || 53 LangOpts.Sanitize.has(SanitizerKind::Memory)) 603 if (SanOpts.has(SanitizerKind::Thread)) { 696 if (SanOpts.has(SanitizerKind::MemTag)) 698 if (SanOpts.has(SanitizerKind::Thread)) 702 if (SanOpts.has(SanitizerKind::SafeStack)) 704 if (SanOpts.has(SanitizerKind::ShadowCallStack)) 713 if (SanOpts.has(SanitizerKind::Thread)) { 727 if (D && SanOpts.has(SanitizerKind::CFIUnrelatedCast)) { 735 if (D && SanOpts.has(SanitizerKind::Null)) 782 if (getLangOpts().CPlusPlus && SanOpts.has(SanitizerKind::Function)) { 805 if (SanOpts.has(SanitizerKind::NullabilityReturn)) { 808 if (!(SanOpts.has(SanitizerKind::ReturnsNonnullAttribute) && 1222 if (SanOpts.has(SanitizerKind::Return)) { 1232 if (SanOpts.has(SanitizerKind::Return) || ShouldEmitUnreachable) { 1940 if (SanOpts.has(SanitizerKind::VLABound) && 2053 if (SanOpts.has(SanitizerKind::Alignment)) { 2353 if (!SanOpts.has(SanitizerKind::Alignment))tools/clang/lib/CodeGen/CodeGenFunction.h
1589 (SanOpts.has(SanitizerKind::ReturnsNonnullAttribute) &&
tools/clang/lib/CodeGen/CodeGenModule.cpp140 if (LangOpts.Sanitize.has(SanitizerKind::Thread) || 536 if (LangOpts.Sanitize.has(SanitizerKind::CFIICall)) { 1773 if (!LangOpts.Sanitize.has(SanitizerKind::CFIICall)) 5835 return ((LangOpts.Sanitize.has(SanitizerKind::CFIVCall) && 5836 !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIVCall)) || 5837 (LangOpts.Sanitize.has(SanitizerKind::CFINVCall) && 5838 !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFINVCall)) || 5839 (LangOpts.Sanitize.has(SanitizerKind::CFIDerivedCast) && 5840 !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIDerivedCast)) || 5841 (LangOpts.Sanitize.has(SanitizerKind::CFIUnrelatedCast) && 5842 !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIUnrelatedCast)));tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
652 bool ShouldEmitCFICheck = CGF.SanOpts.has(SanitizerKind::CFIMFCall) && 712 if (CGM.getCodeGenOpts().SanitizeTrap.has(SanitizerKind::CFIMFCall)) { 2022 if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0 && 2051 if (!CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) || AS != 0)tools/clang/lib/Driver/SanitizerArgs.cpp
1035 if (Sanitizers.has(SanitizerKind::HWAddress)) { 1045 if (Sanitizers.has(SanitizerKind::Memory) || 1046 Sanitizers.has(SanitizerKind::Address)) 1059 if (Sanitizers.has(SanitizerKind::MemTag) && !hasTargetFeatureMTE(CmdArgs))tools/clang/lib/Frontend/CompilerInvocation.cpp
3529 !LangOpts.Sanitize.has(SanitizerKind::Address) && 3530 !LangOpts.Sanitize.has(SanitizerKind::KernelAddress) && 3531 !LangOpts.Sanitize.has(SanitizerKind::Memory) && 3532 !LangOpts.Sanitize.has(SanitizerKind::KernelMemory);