================ @@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.txt> +/// [{unsigned-integer-overflow,signed-integer-overflow}] +/// type:*=no_sanitize +/// type:size_t=sanitize +/// <ignorelist.txt +/// Supplying the above ignorelist.txt will disable overflow sanitizer +/// instrumentation for all types except "size_t". +bool ASTContext::isTypeIgnoredBySanitizer(const SanitizerMask &Mask, + const QualType &Ty) const { + bool sanitizeType = ---------------- vitalybuka wrote:
Each contains call is loop over regexp list, relatively expensive. Taking that into account, please: 1. use lazy eval of boolean 2. remove no_sanitize? ``` return NoSanitizeL->containsType(Mask, Ty.getAsString()) || !NoSanitizeL->containsType(Mask, Ty.getAsString(), "sanitize"); ``` Then the first call `NoSanitizeL->containsType` will be enough in most cases. https://github.com/llvm/llvm-project/pull/107332 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits