Home
last modified time | relevance | path

Searched refs:SanitizerKind (Results 1 – 24 of 24) sorted by relevance

/external/clang/include/clang/Driver/
DSanitizerArgs.h40 bool needsAsanRt() const { return Sanitizers.has(SanitizerKind::Address); } in needsAsanRt()
42 bool needsTsanRt() const { return Sanitizers.has(SanitizerKind::Thread); } in needsTsanRt()
43 bool needsMsanRt() const { return Sanitizers.has(SanitizerKind::Memory); } in needsMsanRt()
45 return Sanitizers.has(SanitizerKind::Leak) && in needsLsanRt()
46 !Sanitizers.has(SanitizerKind::Address); in needsLsanRt()
49 bool needsDfsanRt() const { return Sanitizers.has(SanitizerKind::DataFlow); } in needsDfsanRt()
/external/clang/include/clang/Basic/
DSanitizers.h20 enum class SanitizerKind { enum
33 bool has(SanitizerKind K) const;
36 void set(SanitizerKind K, bool Value);
/external/clang/lib/Basic/
DSanitizers.cpp19 bool SanitizerSet::has(SanitizerKind K) const { in has()
24 void SanitizerSet::set(SanitizerKind K, bool Value) { in set()
DTargets.cpp96 if (Opts.Sanitize.has(SanitizerKind::Address)) in getDarwinDefines()
/external/clang/lib/Driver/
DSanitizerArgs.cpp59 if (Sanitizers.has(clang::SanitizerKind::ID) && (Kinds & ID)) \ in hasOneOf()
69 Sanitizers.set(clang::SanitizerKind::ID, true); in addAllOf()
73 static uint64_t toSanitizeKind(clang::SanitizerKind K) { in toSanitizeKind()
75 if (K == clang::SanitizerKind::ID) \ in toSanitizeKind()
101 clang::SanitizerKind K) { in lastArgumentForKind()
163 !Sanitizers.has(SanitizerKind::Address); in needsUbsanRt()
433 << lastArgumentForKind(D, Args, SanitizerKind::Address); in SanitizerArgs()
451 if (Sanitizers.has(clang::SanitizerKind::ID)) { \ in toString()
493 if (Sanitizers.has(SanitizerKind::Memory) || in addArgs()
494 Sanitizers.has(SanitizerKind::Address)) in addArgs()
/external/clang/lib/CodeGen/
DSanitizerMetadata.cpp28 if (!CGM.getLangOpts().Sanitize.has(SanitizerKind::Address)) in reportGlobalToASan()
59 if (!CGM.getLangOpts().Sanitize.has(SanitizerKind::Address)) in reportGlobalToASan()
70 if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address)) in disableSanitizerForGlobal()
DCGExprScalar.cpp88 void EmitBinOpCheck(ArrayRef<std::pair<Value *, SanitizerKind>> Checks,
457 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) in EmitMul()
466 CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow)) in EmitMul()
730 CGF.EmitCheck(std::make_pair(Check, SanitizerKind::FloatCastOverflow), in EmitFloatConversionCheck()
830 if (CGF.SanOpts.has(SanitizerKind::FloatCastOverflow) && in EmitScalarConversion()
920 ArrayRef<std::pair<Value *, SanitizerKind>> Checks, const BinOpInfo &Info) { in EmitBinOpCheck()
1155 if (CGF.SanOpts.has(SanitizerKind::ArrayBounds)) in VisitArraySubscriptExpr()
1387 if (CGF.SanOpts.has(SanitizerKind::CFIUnrelatedCast)) { in VisitCastExpr()
1422 if (CGF.SanOpts.has(SanitizerKind::CFIDerivedCast)) in VisitCastExpr()
1621 if (!CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) in EmitAddConsiderOverflowBehavior()
[all …]
DCGExpr.cpp482 return SanOpts.has(SanitizerKind::Null) | in sanitizePerformTypeCheck()
483 SanOpts.has(SanitizerKind::Alignment) | in sanitizePerformTypeCheck()
484 SanOpts.has(SanitizerKind::ObjectSize) | in sanitizePerformTypeCheck()
485 SanOpts.has(SanitizerKind::Vptr); in sanitizePerformTypeCheck()
502 SmallVector<std::pair<llvm::Value *, SanitizerKind>, 3> Checks; in EmitTypeCheck()
507 if ((SanOpts.has(SanitizerKind::Null) || AllowNullPointers) && in EmitTypeCheck()
521 Checks.push_back(std::make_pair(IsNonNull, SanitizerKind::Null)); in EmitTypeCheck()
525 if (SanOpts.has(SanitizerKind::ObjectSize) && !Ty->isIncompleteType()) { in EmitTypeCheck()
539 Checks.push_back(std::make_pair(LargeEnough, SanitizerKind::ObjectSize)); in EmitTypeCheck()
544 if (SanOpts.has(SanitizerKind::Alignment)) { in EmitTypeCheck()
[all …]
DBackendUtil.cpp302 if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds)) { in CreatePasses()
316 if (LangOpts.Sanitize.has(SanitizerKind::Address)) { in CreatePasses()
323 if (LangOpts.Sanitize.has(SanitizerKind::Memory)) { in CreatePasses()
330 if (LangOpts.Sanitize.has(SanitizerKind::Thread)) { in CreatePasses()
337 if (LangOpts.Sanitize.has(SanitizerKind::DataFlow)) { in CreatePasses()
DCGDeclCXX.cpp268 if (getLangOpts().Sanitize.has(SanitizerKind::Address)) in CreateGlobalInitOrDestructFunction()
270 if (getLangOpts().Sanitize.has(SanitizerKind::Thread)) in CreateGlobalInitOrDestructFunction()
272 if (getLangOpts().Sanitize.has(SanitizerKind::Memory)) in CreateGlobalInitOrDestructFunction()
DCGVTables.cpp845 if (!LangOpts.Sanitize.has(SanitizerKind::CFIVCall) && in EmitVTableBitSetEntries()
846 !LangOpts.Sanitize.has(SanitizerKind::CFINVCall) && in EmitVTableBitSetEntries()
847 !LangOpts.Sanitize.has(SanitizerKind::CFIDerivedCast) && in EmitVTableBitSetEntries()
848 !LangOpts.Sanitize.has(SanitizerKind::CFIUnrelatedCast)) in EmitVTableBitSetEntries()
DCodeGenFunction.cpp631 if (getLangOpts().CPlusPlus && SanOpts.has(SanitizerKind::Function)) { in StartFunction()
908 if (SanOpts.has(SanitizerKind::Return)) { in GenerateCode()
911 EmitCheck(std::make_pair(IsFalse, SanitizerKind::Return), in GenerateCode()
1575 if (SanOpts.has(SanitizerKind::VLABound) && in EmitVariablyModifiedType()
1584 SanitizerKind::VLABound), in EmitVariablyModifiedType()
DCGClass.cpp837 CGF.SanOpts.set(SanitizerKind::Bool, false); in CopyingValueRepresentation()
838 CGF.SanOpts.set(SanitizerKind::Enum, false); in CopyingValueRepresentation()
2129 if (!SanOpts.has(SanitizerKind::CFICastStrict)) in EmitVTablePtrCheckForCall()
2159 if (!SanOpts.has(SanitizerKind::CFICastStrict)) in EmitVTablePtrCheckForCast()
DCodeGenModule.cpp125 if (LangOpts.Sanitize.has(SanitizerKind::Thread) || in CodeGenModule()
752 if (LangOpts.Sanitize.has(SanitizerKind::Address) && in SetLLVMFunctionAttributesForDefinition()
756 if (LangOpts.Sanitize.has(SanitizerKind::Thread) && in SetLLVMFunctionAttributesForDefinition()
760 if (LangOpts.Sanitize.has(SanitizerKind::Memory) && in SetLLVMFunctionAttributesForDefinition()
1234 if (!LangOpts.Sanitize.has(SanitizerKind::Address)) in isInSanitizerBlacklist()
2952 !LangOpts.Sanitize.has(SanitizerKind::Address) && in GetAddrOfConstantStringFromLiteral()
DCGCall.cpp2370 if (SanOpts.has(SanitizerKind::ReturnsNonnullAttribute)) { in EmitFunctionEpilog()
2379 EmitCheck(std::make_pair(Cond, SanitizerKind::ReturnsNonnullAttribute), in EmitFunctionEpilog()
2698 if (!CGF.SanOpts.has(SanitizerKind::NonnullAttribute) || !FD) in emitNonNullArgCheck()
2715 CGF.EmitCheck(std::make_pair(Cond, SanitizerKind::NonnullAttribute), in emitNonNullArgCheck()
DItaniumCXXABI.cpp1447 if (CGF.SanOpts.has(SanitizerKind::CFIVCall)) in getVirtualFunctionPointer()
1593 if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0 && in InitializeArrayCookie()
1625 if (!CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) || AS != 0) in readArrayCookieImpl()
DCGExprCXX.cpp259 if (SanOpts.has(SanitizerKind::CFINVCall) && in EmitCXXMemberOrOperatorMemberCallExpr()
DCodeGenFunction.h2796 void EmitCheck(ArrayRef<std::pair<llvm::Value *, SanitizerKind>> Checked,
DCGBuiltin.cpp508 if (SanOpts.has(SanitizerKind::Unreachable)) { in EmitBuiltinExpr()
511 SanitizerKind::Unreachable), in EmitBuiltinExpr()
/external/clang/lib/Lex/
DPPMacroExpansion.cpp867 .Case("address_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Address)) in HasFeature()
891 .Case("memory_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Memory)) in HasFeature()
892 .Case("thread_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Thread)) in HasFeature()
893 .Case("dataflow_sanitizer", LangOpts.Sanitize.has(SanitizerKind::DataFlow)) in HasFeature()
/external/clang/lib/Frontend/
DCompilerInvocation.cpp332 SanitizerKind K = llvm::StringSwitch<SanitizerKind>(Sanitizer) in parseSanitizerKinds()
333 #define SANITIZER(NAME, ID) .Case(NAME, SanitizerKind::ID) in parseSanitizerKinds()
335 .Default(SanitizerKind::Unknown); in parseSanitizerKinds()
336 if (K == SanitizerKind::Unknown) in parseSanitizerKinds()
/external/clang/lib/AST/
DDecl.cpp3673 if (!Context.getLangOpts().Sanitize.has(SanitizerKind::Address) || in mayInsertExtraPadding()
/external/clang/lib/Serialization/
DASTWriter.cpp1263 Record.push_back(LangOpts.Sanitize.has(SanitizerKind::ID)); in WriteControlBlock()
DASTReader.cpp4732 LangOpts.Sanitize.set(SanitizerKind::ID, Record[Idx++]); in ParseLanguageOptions()